apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    app.openshift.io/vcs-uri: https://github.com/kokoji/speech-to-text-code-pattern.git
  labels:
    app: kokoji-stt-code-app
    app.kubernetes.io/instance: kokoji-stt-code-app
    app.kubernetes.io/name: kokoji-stt-code-app
    app.openshift.io/runtime: js
  name: kokoji-stt-code-app
spec:
  progressDeadlineSeconds: 600
  replicas: 2
  selector:
    matchLabels:
      app.kubernetes.io/instance: kokoji-stt-code-app
      app.kubernetes.io/name: kokoji-stt-code-app
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: kokoji-stt-code-app
        app.kubernetes.io/name: kokoji-stt-code-app
    spec:
      containers:
        - env:
          - name: INGRESS_HOST
          - name: PROTOCOLS
          - name: LOG_LEVEL
            value: debug
          name: kokoji-stt-code-app
          image: quay.io/kokoji/stt-code-app
          imagePullPolicy: IfNotPresent
          envFrom:
          - configMapRef:
              name: kokoji-app-config
            prefix: SPEECH_TO_TEXT_
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /
              port: 5000
              scheme: HTTP
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          ports:
            - containerPort: 5000
              name: http
              protocol: TCP
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /health
              port: http
              scheme: HTTP
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          resources: {}
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30