apiVersion: apps/v1
kind: Deployment
metadata:
  name: user-service
  labels:
    app: user-service
spec:
  replicas: 1
  selector:
    matchLabels:
      app: user-service
  template:
    metadata:
      labels:
        app: user-service
    spec:
      imagePullSecrets:
        - name: kt-event-marketing
      containers:
        - name: user-service
          image: acrdigitalgarage01.azurecr.io/kt-event-marketing/user-service:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 8081
              name: http
          envFrom:
            - configMapRef:
                name: cm-common
            - configMapRef:
                name: cm-user-service
            - secretRef:
                name: secret-common
            - secretRef:
                name: secret-user-service
          resources:
            requests:
              cpu: "256m"
              memory: "256Mi"
            limits:
              cpu: "1024m"
              memory: "1024Mi"
          startupProbe:
            httpGet:
              path: /actuator/health
              port: 8081
            initialDelaySeconds: 30
            periodSeconds: 10
            failureThreshold: 30
          readinessProbe:
            httpGet:
              path: /actuator/health/readiness
              port: 8081
            initialDelaySeconds: 10
            periodSeconds: 5
            failureThreshold: 3
          livenessProbe:
            httpGet:
              path: /actuator/health/liveness
              port: 8081
            initialDelaySeconds: 30
            periodSeconds: 10
            failureThreshold: 3
