-
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
fix(values): consistent usage of postgresql.adminPasswordKey #44
base: main
Are you sure you want to change the base?
Conversation
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.
Hi @muja ! Thanks for this contribution.
Error: templates/: template: backstage/charts/upstream/charts/postgresql/templates/primary/statefulset.yaml:385:16: executing "backstage/charts/upstream/charts/postgresql/templates/primary/statefulset.yaml" at <include "common.tplvalues.render" (dict "value" .Values.primary.extraEnvVars "context" $)>: error calling include: template: backstage/charts/common/templates/_tplvalues.tpl:19:8: executing "common.tplvalues.render" at <tpl $value .context>: error calling tpl: error during tpl function execution for "- name: POSTGRESQL_ADMIN_PASSWORD\n valueFrom:\n secretKeyRef:\n key: '{{- include \"postgresql.adminPasswordKey\" }}'\n name: '{{- include \"postgresql.v1.secretName\" . }}'": template: backstage/charts/upstream/charts/postgresql/templates/primary/statefulset.yaml:4:16: executing "backstage/charts/upstream/charts/postgresql/templates/primary/statefulset.yaml" at <include>: wrong number of args for include: want 2 got 1
Could you look into the lint issues reported?
https://github.com/redhat-developer/rhdh-chart/actions/runs/10955059451/job/30920518609?pr=44
Thanks.
Quality Gate passedIssues Measures |
Hi @rm3l I believe I was missing a |
It seems that the context differs for the two invocations. The invocations on line 111/112 happen from the {
"auth": {
"backend": {
"enabled": true,
"existingSecret": "",
"value": ""
}
},
"clusterRouterBase": "apps.example.com",
"dynamic": {
"includes": [
"dynamic-plugins.default.yaml"
],
"plugins": []
},
"host": "",
"imagePullSecrets": [],
"imageRegistry": ""
} while the invocation in line 239/240 happens from the {
"auth": {
"backend": {
"enabled": true,
"existingSecret": "",
"value": ""
}
},
"clusterRouterBase": "apps.example.com",
"dynamic": {
"includes": [
"dynamic-plugins.default.yaml"
],
"plugins": []
},
"host": "",
"imagePullSecrets": [],
"imageRegistry": "",
"postgresql": {
"auth": {
"database": "",
"existingSecret": "",
"password": "",
"postgresPassword": "",
"secretKeys": {
"adminPasswordKey": "",
"replicationPasswordKey": "",
"userPasswordKey": ""
},
"username": ""
},
"service": {
"ports": {
"postgresql": ""
}
}
},
"storageClass": ""
} This causes the error. Any idea how to resolve this? |
That missing section is defined in the global:
postgresql:
auth: {}
upstream:
auth: {} |
key: postgres-password | ||
name: '{{- include "janus-idp.postgresql.secretName" . }}' | ||
key: '{{- include "postgresql.adminPasswordKey" . }}' | ||
name: '{{- include "postgresql.v1.secretName" . }}' |
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.
using this helper here changes the name
property from rhdh-chart-postgresql
to rhdh-chart-backstage
. Is that a breaking change / problem?
Quality Gate passedIssues Measures |
Description of the change
Consistently use adminPasswordKey. Overriding this value currently leads to buggy behavior because it is not consistently used everywhere. Specifically the hard-coded
postgres-password
in one of theextraEnvVars
is causing issues and downstream values files cannot override that easily.Additional Information
Since
janus-idp.postgresql.secretName
is not used anymore, could be considered to delete it, but it might break downstream charts which use that helper.Checklist
Chart.yaml
according to semver.values.yaml
and added to the README.md. The pre-commit utility can be used to generate the necessary content. Usepre-commit run -a
to apply changes.pre-commit
hook.ct lint
command.