[helm chart] add checksum annotations for schema and userProfile configmaps#1006
Open
[helm chart] add checksum annotations for schema and userProfile configmaps#1006
Conversation
|
Contributor
|
@olevitt we are two in favor of checksum annotations now 😄 |
ddecrulle
requested changes
Jul 16, 2025
Contributor
ddecrulle
left a comment
There was a problem hiding this comment.
Hello @Gaspi,
I agree that using a checksum is very convenient. However, the current PR introduces an implicit dependency on the file system.
I suggest defining the ConfigMap as a named template and including it both for rendering and for computing the checksum.
This makes the logic more robust and avoids relying on file path resolution.
{{- define "onyxia.XXXXX.configmap" }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "onyxia.XXXXX.name" . }}
labels:
app: {{ template "onyxia.XXXXX.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
# ...
{{- end }}
# Include once to render the resource
{{- include "onyxia.XXXXX.configmap" . }}Then in the Deployment:
annotations:
checksum/config: {{ include "onyxia.XXXXX.configmap" . | sha256sum }}Let me know what you think!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.