---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: airm-rabbitmq-admin
  namespace: airm
spec:
  data:
    - remoteRef:
        key: airm-rabbitmq-user-username
      secretKey: username
    - remoteRef:
        key: airm-rabbitmq-user-password
      secretKey: password
  secretStoreRef:
    kind: ClusterSecretStore
    name: airm-secret-store
  target:
    name: airm-rabbitmq-admin
    template:
      data:
        default_user.conf: |
          default_user = {{ .username }}
          default_pass = {{ .password }}
        password: '{{ .password }}'
        username: '{{ .username }}'
      type: Opaque
