apiVersion: apps/v1
kind: Deployment
metadata:
  name: howgersay
  namespace: aotter
  labels:
    app: howgersay
spec:
  replicas: 1
  selector:
    matchLabels:
      app: howgersay
  template:
    metadata:
      labels:
        app: howgersay
    spec:
      imagePullSecrets:
        - name: pipeline-docker-registry
      containers:
        - name: howgersay
          image: ${CICD_IMAGE}:${CICD_EXECUTION_SEQUENCE}
          ports:
            - containerPort: 3000
          resources:
            requests:
              memory: "512Mi"
              cpu: "256m"
            limits:
              memory: "1Gi"
              cpu: "512m"
          livenessProbe:
            failureThreshold: 5
            httpGet:
              path: /healthcheck
              port: 3000
              scheme: HTTP
            initialDelaySeconds: 20
            periodSeconds: 5
            successThreshold: 1
            timeoutSeconds: 2
          readinessProbe:
            failureThreshold: 5
            httpGet:
              path: /healthcheck
              port: 3000
              scheme: HTTP
            initialDelaySeconds: 20
            periodSeconds: 5
            successThreshold: 2
            timeoutSeconds: 2
