Skip to content

Commit

Permalink
add database secret create flag (#3)
Browse files Browse the repository at this point in the history
* add database secret create flag

* end line

* update readme

* fix
  • Loading branch information
maciejmacq-dev authored Dec 4, 2024
1 parent 8506d08 commit 586c361
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -68,4 +70,4 @@ Example hive-site.xml
<value>true</value>
</property>
</configuration>
```
```
2 changes: 2 additions & 0 deletions hive-metastore/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{- if .Values.databaseSecret.create -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-pgauth
data:
password: {{ .Values.postgres.password | b64enc }}
username: {{ .Values.postgres.username | b64enc }}
{{- end }}
3 changes: 3 additions & 0 deletions hive-metastore/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

databaseSecret:
create: false

postgres:
host: "postgresql"
port: 5432
Expand Down

0 comments on commit 586c361

Please sign in to comment.