apiVersion: apps/v1
kind: Deployment
metadata:
  name: ditool
  namespace: ditools
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ditool
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  minReadySeconds: 60
  template:
    metadata:
      labels:
        app: ditool
    spec:
      containers:
        - name: ditool
          image: my_image:latest
          #image: asia-east2-docker.pkg.dev/gcp-digital-infra/cicd-repo/ditool:506d26cb757ed049622ca88d578c8994dcdf3214
          env:
            - name: ditool_ENV
              value: "prod"
          volumeMounts:
            - name: config-prod
              mountPath: "/apps/config"
              readOnly: true
          ports:
            - containerPort: 8867
          resources:
            requests:
              cpu: 25m
              memory: 25Mi
            limits:
              cpu: 50m
              memory: 50Mi
      volumes:
        - name: config-prod
          secret:
            secretName: my-secret