apiVersion: apps/v1
kind: Deployment
metadata:
  name: app8
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      com.ovai.application: test3
      com.ovai.service: test-app3-svc
  template:
    metadata:
      annotations:
        ovai.asaintsever.org/inject: "true"
        ovai.asaintsever.org/secrets-injection-method: "env"  # Secrets from env vars ('file' by default)
        ovai.asaintsever.org/secrets-type: "static" # env vars injection only support static secrets (no annotation or set to 'dynamic' will raise an error)
        ovai.asaintsever.org/secrets-destination: "svc1.sec,svc2.sec"
        ovai.asaintsever.org/secrets-template: |
          {{ with secret "secret/test3/test-app3-svc1" }}
          {{ range $k, $v := .Data }}
          SVC1_{{ $k }}={{ $v }}
          {{ end }}
          {{ end }}
          ---
          {{ with secret "secret/test3/test-app3-svc2" }}
          {{ range $k, $v := .Data }}
          SVC2_{{ $k }}={{ $v }}
          {{ end }}
          {{ end }}
      labels:
        com.ovai.application: test3
        com.ovai.service: test-app3-svc
    spec:
      serviceAccountName: default
      containers:
        - name: app8-container
          image: busybox:1.28
          command:
            - "sh"
            - "-c"
            - |
              set -e
              echo "My secrets are:"
              env|grep SECRET
              while true;do
                sleep 5
              done
