diff --git a/k8s/applications/nextcloud/templates/secret-db.yaml b/k8s/applications/nextcloud/templates/secret-db.yaml new file mode 100644 index 0000000..50176b2 --- /dev/null +++ b/k8s/applications/nextcloud/templates/secret-db.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: "{{ .Values.nextcloud.externalDatabase.existingSecret.secretName }}" +spec: + refreshInterval: 1h + secretStoreRef: + kind: ClusterSecretStore + name: database + target: + name: "{{ .Values.nextcloud.externalDatabase.existingSecret.secretName }}" # name of the k8s Secret to be created + data: + - secretKey: username + remoteRef: + key: "{{ .Values.nextcloud.externalDatabase.existingSecret.secretName }}" + property: username + + - secretKey: password + remoteRef: + key: "{{ .Values.nextcloud.externalDatabase.existingSecret.secretName }}" + property: password diff --git a/k8s/applications/nextcloud/templates/secret-redis .yaml b/k8s/applications/nextcloud/templates/secret-redis .yaml new file mode 100644 index 0000000..ad7ea19 --- /dev/null +++ b/k8s/applications/nextcloud/templates/secret-redis .yaml @@ -0,0 +1,17 @@ +--- +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: "{{ .Values.nextcloud.externalRedis.existingSecret }}" +spec: + refreshInterval: 1h + secretStoreRef: + kind: ClusterSecretStore + name: redis + target: + name: "{{ .Values.nextcloud.externalRedis.existingSecret }}" # name of the k8s Secret to be created + data: + - secretKey: password + remoteRef: + key: "{{ .Values.nextcloud.externalRedis.existingSecretPasswordKey }}" + property: password diff --git a/k8s/infra/redis/templates/secret-store.yaml b/k8s/infra/redis/templates/secret-store.yaml new file mode 100644 index 0000000..7a3bfb5 --- /dev/null +++ b/k8s/infra/redis/templates/secret-store.yaml @@ -0,0 +1,19 @@ +--- +apiVersion: external-secrets.io/v1beta1 +kind: ClusterSecretStore +metadata: + name: redis +spec: + provider: + kubernetes: + remoteNamespace: "{{ .Release.Namespace }}" + server: + caProvider: + type: ConfigMap + name: kube-root-ca.crt + key: ca.crt + namespace: "{{ .Release.Namespace }}" + auth: + serviceAccount: + name: "{{ .Release.Namespace }}" + namespace: "{{ .Release.Namespace }}"