apiVersion: apps/v1
kind: Deployment
metadata:
  name: spp-be-translate
  labels:
    app: spp-be-translate
spec:
  replicas: 1
  selector:
    matchLabels:
      app: spp-be-translate
  template:
    metadata:
      labels:
        app: spp-be-translate
    spec:
      containers:
        - name: spp-be-translate
          volumeMounts:
            - mountPath: /app/keys
              name: gcs-svc
          image: gcr.io/PROJECT_ID/IMAGE:TAG
          imagePullPolicy: IfNotPresent
          env:
          - name: PORT
            value: "3000"
          envFrom:
            - secretRef:
                name: staging-translate
          ports:
            - name: express
              containerPort: 3000
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /health
              port: express
            initialDelaySeconds: 20
            periodSeconds: 3
          readinessProbe:
            httpGet:
              path: /health
              port: express
            initialDelaySeconds: 30
            periodSeconds: 2
      volumes:
        - name: gcs-svc
          configMap:
            name: spl-be-svc
