#@ load("@ytt:data", "data")

#@ ns = data.values.application.namespace

#@ secrets = [
#@   ("ocis-admin-user", "password"),
#@   ("ocis-jwt-secret", "jwt-secret"),
#@   ("ocis-machine-auth-api-key", "machine-auth-api-key"),
#@   ("ocis-storage-system-jwt-secret", "storage-system-jwt-secret"),
#@   ("ocis-storage-system", "api-key,user-id"),
#@   ("ocis-transfer-secret", "transfer-secret"),
#@   ("ocis-thumbnails-transfer-secret", "thumbnails-transfer-secret"),
#@   ("ocis-service-account-secret", "service-account-secret"),
#@   ("ocis-collaboration-wopi-secret", "wopi-secret"),
#@   ("ocis-ldap-bind-secrets", "reva-ldap-bind-password,idp-ldap-bind-password,graph-ldap-bind-password"),
#@   ("ocis-idp-encryption", "encryption.key"),
#@ ]

#@ for name, fields in secrets:
---
apiVersion: v1
kind: Secret
metadata:
  name: #@ name
  namespace: #@ ns
  annotations:
    secret-generator.v1.mittwald.de/autogenerate: #@ fields
    secret-generator.v1.mittwald.de/length: "32"
type: Opaque
#@ end
