apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-app-inject-env-dynamic-secrets
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      com.ovai.application: test
      com.ovai.service: test-app-svc
  template:
    metadata:
      annotations:
        ovai.asaintsever.org/inject: "true"
        ovai.asaintsever.org/secrets-injection-method: "env"  # Secrets from env vars ('file' by default)
        # env vars injection only support static secrets (no annotation or set to 'dynamic' will raise an error)
      labels:
        com.ovai.application: test
        com.ovai.service: test-app-svc
    spec:
      serviceAccountName: default
      containers:
        - name: test-app-inject-env-dynamic-secrets
          image: busybox:1.28
          command:
            - "sh"
            - "-c"
            - |
              set -e
              echo "My secrets are: SECRET1_FROM_ENV=${SECRET1}, SECRET2_FROM_ENV=${SECRET2}"
              while true;do
                sleep 5
              done
