feat(pod): add switch to enable checksum annotation
All checks were successful
Generate README / generate-parameters (push) Successful in 9s
Helm / helm-lint (push) Successful in 10s
Helm / helm-unittest (push) Successful in 8s
Markdown linter / markdown-lint (push) Successful in 10s
Markdown linter / markdown-link-checker (push) Successful in 30s
Release / publish-chart (push) Successful in 21s

Depending on the environment or tooling in which the chart is deployed, you may
or may not want to have the checksum annotation.

In the past, these were enforced. The default remains that the checksum
annotation is added. It now only contains a switch that allows you to optionally
disable it.
This commit is contained in:
2025-11-30 15:04:35 +01:00
parent c5dcab2be1
commit 9f7b549b9b
8 changed files with 322 additions and 20 deletions

View File

@@ -41,6 +41,7 @@ tests:
- it: Rendering default with mounted gitconfig configMap
set:
config.gitConfig.enabled: true
config.gitConfig.addSHASumAnnotation: true
persistence.enabled: true
asserts:
- exists:
@@ -67,16 +68,80 @@ tests:
name: athens-proxy-unittest-gitconfig
template: templates/deployment.yaml
- it: Rendering default with mounted gitconfig configMap, but without sha sum annotation
set:
config.gitConfig.enabled: true
config.gitConfig.addSHASumAnnotation: false
persistence.enabled: true
asserts:
- notExists:
path: spec.template.metadata.annotations.checksum/config-map-athens-proxy-unittest-gitconfig
template: templates/deployment.yaml
- contains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: secrets
mountPath: /root/.gitconfig
subPath: .gitconfig
template: templates/deployment.yaml
- contains:
path: spec.template.spec.volumes
content:
name: secrets
projected:
sources:
- configMap:
items:
- key: .gitconfig
path: .gitconfig
mode: 0644
name: athens-proxy-unittest-gitconfig
template: templates/deployment.yaml
- it: Rendering with custom gitconfig configMap
set:
config.gitConfig.enabled: true
config.gitConfig.addSHASumAnnotation: true
config.gitConfig.existingConfigMap.enabled: true
config.gitConfig.existingConfigMap.configMapName: "my-custom-configmap"
config.gitConfig.existingConfigMap.gitConfigKey: "my-gitconfig-key"
persistence.enabled: true
asserts:
- exists:
path: spec.template.metadata.annotations.checksum/config-map-my-custom-configmap
template: templates/deployment.yaml
- contains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: secrets
mountPath: /root/.gitconfig
subPath: .gitconfig
template: templates/deployment.yaml
- contains:
path: spec.template.spec.volumes
content:
name: secrets
projected:
sources:
- configMap:
items:
- key: my-gitconfig-key
path: .gitconfig
mode: 0644
name: my-custom-configmap
template: templates/deployment.yaml
- it: Rendering with custom gitconfig configMap, but without sha sum annotations
set:
config.gitConfig.enabled: true
config.gitConfig.addSHASumAnnotation: false
config.gitConfig.existingConfigMap.enabled: true
config.gitConfig.existingConfigMap.configMapName: "my-custom-configmap"
config.gitConfig.existingConfigMap.gitConfigKey: "my-gitconfig-key"
persistence.enabled: true
asserts:
- notExists:
path: spec.template.metadata.annotations.checksum/config-map-athens-proxy-unittest-gitconfig
path: spec.template.metadata.annotations.checksum/config-map-my-custom-configmap
template: templates/deployment.yaml
- contains:
path: spec.template.spec.containers[0].volumeMounts