diff --git a/README.md b/README.md index 2d9b6fb..60744ac 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ postgres: username: admin password: pass ``` +It is possible to use an existing secret from another source. The createSecret flag in values.yaml is used for this purpose.If we are using an existing secret, its name should look like this: `{{ .Release.Name }}-pgauth`. If we want the secret to be generated from the data provided in the postgres section, the `createSecret` flag in values.yaml should be set to `true`. + The docker image is published on github repository (ghcr.io). Login to github repository to pull image: ``` docker login ghcr.io -u [github_username] @@ -68,4 +70,4 @@ Example hive-site.xml true -``` +``` \ No newline at end of file diff --git a/hive-metastore/templates/secret.yaml b/hive-metastore/templates/secret.yaml index 38daaac..e4c47b4 100644 --- a/hive-metastore/templates/secret.yaml +++ b/hive-metastore/templates/secret.yaml @@ -1,3 +1,4 @@ +{{- if .Values.databaseSecret.create -}} apiVersion: v1 kind: Secret metadata: @@ -5,3 +6,4 @@ metadata: data: password: {{ .Values.postgres.password | b64enc }} username: {{ .Values.postgres.username | b64enc }} +{{- end }} diff --git a/hive-metastore/values.yaml b/hive-metastore/values.yaml index 5db1f05..0bd2f3b 100644 --- a/hive-metastore/values.yaml +++ b/hive-metastore/values.yaml @@ -14,6 +14,9 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" +databaseSecret: + create: false + postgres: host: "postgresql" port: 5432