apiVersion: apps/v1
kind: Deployment
metadata:
  name: stt
  labels:
    app: stt
spec:
  replicas: 1
  selector:
    matchLabels:
      app: stt
  template:
    metadata:
      labels:
        app: stt
    spec:
      containers:
      - name: stt
        image: acrdigitalgarage02.azurecr.io/hgzero/stt:latest
        ports:
        - containerPort: 8080
          protocol: TCP
        envFrom:
        - configMapRef:
            name: cm-common
        - secretRef:
            name: secret-common
        env:
        - name: DB_URL
          valueFrom:
            secretKeyRef:
              name: secret-stt
              key: DB_URL
        - name: DB_USERNAME
          valueFrom:
            secretKeyRef:
              name: secret-stt
              key: DB_USERNAME
        - name: DB_PASSWORD
          valueFrom:
            secretKeyRef:
              name: secret-stt
              key: DB_PASSWORD
        resources:
          requests:
            cpu: 256m
            memory: 256Mi
          limits:
            cpu: 1024m
            memory: 1024Mi
        livenessProbe:
          httpGet:
            path: /actuator/health
            port: 8080
          initialDelaySeconds: 30
          periodSeconds: 10
          timeoutSeconds: 5
          failureThreshold: 3
        readinessProbe:
          httpGet:
            path: /actuator/health
            port: 8080
          initialDelaySeconds: 20
          periodSeconds: 10
          timeoutSeconds: 5
          failureThreshold: 3
