apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: cloud-server
  name: cloud-server
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: cloud-server
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: cloud-server
    spec:
      containers:
        - image: cloud_server:master-a99129e3a72b0a4f73ecb4ec3aef703a41f997e0
          imagePullPolicy: IfNotPresent
          args:
            - -c=/root/config/config.yaml
            - -s=/root/secret-config/secrets.yaml
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /api/ping
              port: http
              scheme: HTTP
            initialDelaySeconds: 10
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          name: cloud-server
          resources:
            limits:
              cpu: 500m
              memory: 512Mi
            requests:
              cpu: 100m
              memory: 64Mi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          volumeMounts:
            - mountPath: /root/config
              name: cloud-config
              readOnly: true
            - mountPath: /root/secret-config
              name: secret-config
              readOnly: true
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: clinic
      serviceAccountName: clinic
      terminationGracePeriodSeconds: 30
      volumes:
        - configMap:
            defaultMode: 420
            name: cloud-server
          name: cloud-config
        - name: secret-config
          secret:
            defaultMode: 420
            secretName: clinic-cloud-server-secrets
