-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for existing K8s secret for Database #107
base: main
Are you sure you want to change the base?
Add support for existing K8s secret for Database #107
Conversation
Signed-off-by: Liviu Banita <[email protected]>
Sorry, I am a bit confused at the error. As evidenced by following line ( and the Files changed), I did run helm-docs and helm-charts/ztka/README.MD has been updated helm-charts/charts/ztka/README.md Line 117 in 2879a26
helm-charts/charts/ztka/README.md Line 178 in 2879a26
Could someone clarify what I am missing in the process so I can do it correctly? Thank you. |
@lbanita - thanks for creating this PR. I'd love to see this get merged. In regards to the helm-docs CI issue, I notice the GitHub action uses an older version of helm-docs. You might want to try downgrade to v1.11.0 to match, and re-run the When I run the following command against your PR branch:
helm-docs removes the |
Signed-off-by: Liviu Banita <[email protected]>
@sl1pm4t thanks for the clarification The issue seems to come from inconsistency in the helm-docs Go version ( that the CI action uses ) and the one you can install via brew or asdf. Even if I use version 1.11.0 from brew or asdf, I still get the version footer line because this is what the template says: helm-charts/charts/ztka/README.md.gotmpl Line 79 in e48754b
Apparently the Go version ignores the version footer line in the template. |
Signed-off-by: Liviu Banita <[email protected]>
Oh that's interesting. I didn't know there were alternative helm-docs implementations. I'm not a maintainer on this project so can't help merge, but hope it is merged soon. |
any news on this feature ? tks |
See paralus/helm-charts#107 Signed-off-by: Nicolas Lamirault <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@lbanita thanks for your contribution, we will get this in for our next release. |
@@ -103,6 +103,8 @@ Get DB Address. | |||
{{- define "ztka.dbAddr" -}} | |||
{{- if .Values.deploy.postgresql.enable -}} | |||
{{.Release.Name}}-postgresql.{{.Release.Namespace}}.svc.cluster.local | |||
{{- else if .Values.deploy.postgresql.existingSecret -}} | |||
{{- printf "%s" (tpl .Values.deploy.postgresql.existingSecret $) -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is returning existing secret name, but instead we are expecting db address.
Need to fetch db address from k8s secret.
@@ -114,6 +116,8 @@ Get DB Username. | |||
{{- define "ztka.dbUser" -}} | |||
{{- if .Values.deploy.postgresql.enable -}} | |||
{{.Values.postgresql.auth.username}} | |||
{{- else if .Values.deploy.postgresql.existingSecret -}} | |||
{{- printf "%s" (tpl .Values.deploy.postgresql.existingSecret $) -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
@@ -125,6 +129,8 @@ Get DB Password. | |||
{{- define "ztka.dbPassword" -}} | |||
{{- if .Values.deploy.postgresql.enable -}} | |||
{{.Values.postgresql.auth.password}} | |||
{{- else if .Values.deploy.postgresql.existingSecret -}} | |||
{{- printf "%s" (tpl .Values.deploy.postgresql.existingSecret $) -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
@@ -136,6 +142,8 @@ Get DB Name. | |||
{{- define "ztka.dbName" -}} | |||
{{- if .Values.deploy.postgresql.enable -}} | |||
{{.Values.postgresql.auth.database}} | |||
{{- else if .Values.deploy.postgresql.existingSecret -}} | |||
{{- printf "%s" (tpl .Values.deploy.postgresql.existingSecret $) -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
@@ -149,6 +157,8 @@ Get DSN | |||
postgres://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{.Release.Name}}-postgresql.{{.Release.Namespace}}.svc.cluster.local:5432/{{ .Values.postgresql.auth.database }}?sslmode=disable | |||
{{- else if .Values.deploy.postgresql.dsn -}} | |||
{{ .Values.deploy.postgresql.dsn }} | |||
{{- else if .Values.deploy.postgresql.existingSecret -}} | |||
{{- printf "%s" (tpl .Values.deploy.postgresql.existingSecret $) -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
@akshay196 Can I create an alternative PR for this ? We can't use this without keeping secrets secure at rest and plaintext passwords, etc is a big no no. |
What does this PR change?
Does the PR depend on any other PRs or Issues? If yes, please list them.
Checklist
I confirm, that I have...
CONTRIBUTING.md
CHANGELOG.md
helm-docs
to update docs for chart (if values.yaml file was changed)