Unified secret is not storing non-secret database strings if database.secrets is defined · Issue #1999 · jfrog/charts · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If anyartifactory.database.secrets.<key> is defined nothing is written to the unified secret. This means that all keys (url, user, password) needs to be specified if you want to store any key in a custom secret.
{{- if and (not .Values.database.secrets) (not .Values.postgresql.enabled) }}
{{- if or .Values.database.url .Values.database.user .Values.database.password }}
{{- with .Values.database.url }}
db-url: {{ tpl . $ | b64enc | quote }}
{{- end }}
{{- with .Values.database.user }}
db-user: {{ tpl . $ | b64enc | quote }}
{{- end }}
{{- with .Values.database.password }}
db-password: {{ tpl . $ | b64enc | quote }}
{{- end }}
{{- end }}
{{- end }}
Expected behavior
Unified secret should store all values that are not specified within the database.secrets map. I.e. if only database.secrets.password is defined, db-url and db-user should be written to the unified secret.
Naive solution for creating the unified secret:
{{- if not .Values.postgresql.enabled }}{{- if or .Values.database.url .Values.database.user .Values.database.password }}{{- if not .Values.database.secrets.url }}{{- with .Values.database.url }}db-url: {{ tpl . $ | b64enc | quote }}{{- end }}{{- end }}{{- if not .Values.database.secrets.user }}{{- with .Values.database.user }}db-user: {{ tpl . $ | b64enc | quote }}{{- end }}{{- end }}{{- if not .Values.database.secrets.password }}{{- with .Values.database.password }}db-password: {{ tpl . $ | b64enc | quote }}{{- end }}{{- end }}{{- end }}{{- end }}
Then all code places where these values are used should pick from either the unified secret or the custom secret specified in database.secrets..name. Most code already have this behavior.
The text was updated successfully, but these errors were encountered:
gangefors
changed the title
Bug: Unified secret is not storing non-secret database strings if database.secrets is defined
Unified secret is not storing non-secret database strings if database.secrets is defined
May 22, 2025
Uh oh!
There was an error while loading. Please reload this page.
Current behavior
If any
artifactory.database.secrets.<key>
is defined nothing is written to the unified secret. This means that all keys (url, user, password) needs to be specified if you want to store any key in a custom secret.charts/stable/artifactory/templates/artifactory-unified-secret.yaml
Lines 50 to 64 in ec8e134
Expected behavior
Unified secret should store all values that are not specified within the database.secrets map. I.e. if only database.secrets.password is defined, db-url and db-user should be written to the unified secret.
Naive solution for creating the unified secret:
Then all code places where these values are used should pick from either the unified secret or the custom secret specified in database.secrets..name. Most code already have this behavior.
charts/stable/insight/templates/insight-statefulset.yaml
Lines 428 to 478 in 59355c8
The text was updated successfully, but these errors were encountered: