apiVersion: apps/v1
kind: Deployment
metadata:
  name: kt-event-marketing-frontend
  namespace: kt-event-marketing
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kt-event-marketing-frontend
  template:
    metadata:
      labels:
        app: kt-event-marketing-frontend
    spec:
      imagePullSecrets:
      - name: kt-event-marketing-frontend
      containers:
      - name: kt-event-marketing-frontend
        image: acrdigitalgarage01.azurecr.io/kt-event-marketing/kt-event-marketing-frontend:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
        resources:
          requests:
            cpu: "256m"
            memory: "256Mi"
          limits:
            cpu: "1024m"
            memory: "1024Mi"
        startupProbe:
          httpGet:
            path: /health
            port: 8080
          initialDelaySeconds: 10
          periodSeconds: 10
          failureThreshold: 30
        readinessProbe:
          httpGet:
            path: /health
            port: 8080
          initialDelaySeconds: 5
          periodSeconds: 10
          failureThreshold: 3
        livenessProbe:
          httpGet:
            path: /health
            port: 8080
          initialDelaySeconds: 15
          periodSeconds: 20
          failureThreshold: 3
        volumeMounts:
        - name: runtime-config
          mountPath: /usr/share/nginx/html/runtime-env.js
          subPath: runtime-env.js
      volumes:
      - name: runtime-config
        configMap:
          name: cm-kt-event-marketing-frontend
