apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
  labels:
    app: sample-dotnet-app
  name: sample-dotnet-app
  namespace: "$APP_NAMESPACE"
spec:
  selector:
    matchLabels:
      app: sample-dotnet-app
  template:
    metadata:
      labels:
        app: sample-dotnet-app
    spec:
      containers:
      - image: "$APP_IMAGE"
        name: sample-dotnet-app
        ports:
        - name: http
          containerPort: 8080
          protocol: TCP
        env:
        - name: VALUES_SERVICE_TYPE
          value: "$APP_ENV_VALUES_SERVICE_TYPE"
        volumeMounts:
        - name: app-config
          mountPath: /app/config
          readOnly: true
        livenessProbe:
          httpGet:
            path: /health
            port: 8080
          initialDelaySeconds: 5
          periodSeconds: 10
      volumes:
      - name: app-config
        secret:
          secretName: sample-dotnet-app-config
          items:
          - key: appusers.json
            path: appusers.json
