apiVersion: apps/v1
kind: Deployment
metadata:
  name: ${CI_K8S_SERVICE_NAME}
spec:
  selector:
    matchLabels:
      component: ${CI_K8S_SERVICE_NAME}
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: "50%"
      maxSurge: "100%"
  template:
    metadata:
      labels:
        component: ${CI_K8S_SERVICE_NAME}
    spec:
      containers:
        - name: ${CI_K8S_SERVICE_NAME}
          image: ${CI_REPOSITORY_IMAGE_PATH_NO_TAG}
          resources:
            requests:
              memory: "16Mi"
              cpu: "1m"
            limits:
              memory: "32Mi"
              cpu: "5m"
          livenessProbe:
            httpGet:
              path: "/"
              port: http
              scheme: "HTTP"
            initialDelaySeconds: 10
            periodSeconds: 30
            failureThreshold: 3
          ports:
            - name: http
              containerPort: 80
