apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend
  namespace: food-app
spec:
  minReadySeconds: 3
  revisionHistoryLimit: 5
  progressDeadlineSeconds: 60
  strategy:
    rollingUpdate:
      maxUnavailable: 0
    type: RollingUpdate
  selector:
    matchLabels:
      app: frontend
  template:
    metadata:
      labels:
        app: frontend
    spec:
      imagePullSecrets:
      - name: ghcr
      containers:
      - name: frontend
        image: ghcr.io/sijoma/food-app/food-app-frontend:0.0.33 # {"$imagepolicy": "flux-system:food-app-frontend"}
        imagePullPolicy: Always
        ports:
        - name: http
          containerPort: 80
        livenessProbe:
          httpGet:
            scheme: HTTP
            path: /
            port: 80
          initialDelaySeconds: 30
          timeoutSeconds: 30
        resources:
          limits:
            cpu: 400m
            memory: 128Mi
          requests:
            cpu: 100m
            memory: 64Mi
        volumeMounts:
        - name: config
          mountPath: /etc/nginx/conf.d
      volumes:
      - name: config
        configMap:
          name: nginx-conf
