apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Release.Name }}-frontend-deployment
  labels:
    app: frontend
  namespace: {{ .Values.namespace }}
spec:
  replicas: {{ .Values.frontend.replicaCount }}
  selector:
    matchLabels:
      app: frontend 
  template:
    metadata: 
      labels:
        app: frontend 
    spec:
      containers:
      - name: frontend 
        image: infisical/frontend
        imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
        ports: 
        - containerPort: 4000
---
apiVersion: v1
kind: Service 
metadata:
  name: infisical-frontend-service 
  namespace: {{ .Values.namespace }}
spec:
  selector:
    app: frontend 
  ports:
    - protocol: TCP
      port: 3000 # service
      targetPort: 3000 # container port 
