apiVersion: apps/v1
kind: Deployment
metadata:
  name: camunda-bpm
spec:
  #replicas: 2
  selector: {}
  strategy:
    rollingUpdate:
      maxUnavailable: 1
  template:
    metadata:
      labels:
        app.kubernetes.io/app: camunda-bpm
    spec:
      volumes:
        - name: config
          configMap:
            name: config
            defaultMode: 0744
      containers:
        - name: camunda-bpm
          image: camunda-bpm
          securityContext:
            runAsUser: 1000
            allowPrivilegeEscalation: false
          ports:
            - containerPort: 8080
              name: http
            - containerPort: 9404
              name: metrics
          volumeMounts:
            - mountPath: /etc/config/
              name: config
          livenessProbe:
            initialDelaySeconds: 60
            periodSeconds: 15
            httpGet:
              path: /camunda
              port: http
          readinessProbe:
            initialDelaySeconds: 10
            periodSeconds: 15
            httpGet:
              path: /camunda
              port: http
          resources:
            requests:
              cpu: 300m
              memory: 512Mi
            limits:
              memory: 512Mi
