apiVersion: v1
kind: DeploymentConfig
metadata:
  labels:
    app: accountsystem
    service: caiapi
  name: caiapi
spec:
  replicas: 1
  selector:
    deploymentconfig: caiapi
  strategy:
    activeDeadlineSeconds: 21600
    recreateParams:
      timeoutSeconds: 600
  template:
    metadata:
      labels:
        app: accountsystem
        deploymentconfig: caiapi
    spec:
      containers:
      - name: caiapi
        image: docker-registry.default.svc:5000/accountsystem/caiapi:latest
        env:
          - name: CAIAPI_SETTINGS
            value: /etc/caiapi/caiapi.cfg
        ports:
        - containerPort: 8080
        volumeMounts:
        - name: config-volume
          mountPath: /etc/caiapi
          readOnly: true
        - name: oidc
          mountPath: /etc/caiapi_oidc.json"
          readyOnly: true
        readinessProbe:
          timeoutSeconds: 1
          initialDelaySeconds: 5
          httpGet:
            path: /
            port: 8080
        livenessProbe:
          timeoutSeconds: 1
          initialDelaySeconds: 30
          httpGet:
            path: /
            port: 8080
      volumes:
      - name: config-volume
        configMap:
          name: caiapi-configmap
      - name: oidc
        secret:
          secretName: oidc
  triggers:
  - type: ConfigChange
