apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-app4
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      com.ovai.application: test4
      com.ovai.service: test-app4-svc
  template:
    metadata:
      annotations:
        ovai.asaintsever.org/inject: "true"
        ovai.asaintsever.org/role: "test"
        # This is the default template so no need to use 'secrets-template' annotation (only for regression testing here)
        ovai.asaintsever.org/secrets-template: |
          {{ with secret "secret/test/test-app-svc" }}{{ range \$k, \$v := .Data }}
          {{ \$k }}={{ \$v }}
          {{ end }}{{ end }}
      labels:
        com.ovai.application: test4
        com.ovai.service: test-app4-svc
    spec:
      serviceAccountName: default
      containers:
        - name: test-app4-container
          image: busybox:1.28
          command:
            - "sh"
            - "-c"
            - >
              while true;do echo "My secrets are: $(cat /opt/ovai/secrets/secrets.properties)"; sleep 5; done
