Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[helm chart] add checksum annotations for schema and userProfile configmaps#1006

Open
Gaspi wants to merge 1 commit intomainfrom
checksum-all-configs
Open

[helm chart] add checksum annotations for schema and userProfile configmaps#1006
Gaspi wants to merge 1 commit intomainfrom
checksum-all-configs

Conversation

Copy link
Contributor

Gaspi commented Jul 11, 2025

No description provided.

ihiverlet reacted with heart emoji
Gaspi requested a review from ddecrulle July 11, 2025 12:58
Gaspi self-assigned this Jul 11, 2025
Copy link

sonarqubecloud bot commented Jul 11, 2025

Copy link
Contributor

ihiverlet commented Jul 11, 2025

@olevitt we are two in favor of checksum annotations now

ddecrulle requested changes Jul 16, 2025
Copy link
Contributor

ddecrulle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

ddecrulle ddecrulle requested changes

Assignees

Gaspi

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants