Skip to content

Add ConfigMap checksum annotations to pod templates in o-neko, sophora-media-finder, and sophora-schema-docs#264

Open
Copilot wants to merge 5 commits intomainfrom
copilot/update-pods-on-configmap-change
Open

Add ConfigMap checksum annotations to pod templates in o-neko, sophora-media-finder, and sophora-schema-docs#264
Copilot wants to merge 5 commits intomainfrom
copilot/update-pods-on-configmap-change

Conversation

Copy link

Copilot AI commented Mar 3, 2026

  • Explored repository structure and identified charts needing changes
  • Add checksum/config annotation to sophora-media-finder deployment pod template
  • Add checksum/config annotation to sophora-schema-docs deployment pod template
  • Add checksum/config annotation to o-neko deployment pod template
  • Bump chart versions and add changelog entries for each changed chart
  • Add tests for checksum annotations
  • Add podAnnotations: {} to sophora-media-finder values.yaml
  • Use data-only checksum (fromYaml | get "data") to avoid restarts on metadata changes, matching sophora-server pattern
  • Extend checksum tests to verify checksum is stable when ConfigMap metadata (e.g. release name) changes, and that it changes only when ConfigMap data values change
  • Validate all changes with helm unittest
Original prompt

This section details on the original issue you should resolve

<issue_title>[sophora-media-supplier] The Deployment should use a checksum of the ConfigMap data to update pods after changes</issue_title>
<issue_description>When the ConfigMap is changed due to other values the pods of the Deployments need to be recreated manually to reflect these changes to the application.yml. An annotation with the checksum should be added to the pod template so they will be recreated when the checksum changes.

This can also be improved for other charts as well.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…neko, sophora-media-finder, and sophora-schema-docs

Co-authored-by: DanielRaapDev <10845365+DanielRaapDev@users.noreply.github.com>
Copilot AI changed the title [WIP] Add checksum annotation to ConfigMap for deployment Add ConfigMap checksum annotations to pod templates in o-neko, sophora-media-finder, and sophora-schema-docs Mar 3, 2026
Co-authored-by: DanielRaapDev <10845365+DanielRaapDev@users.noreply.github.com>
Co-authored-by: DanielRaapDev <10845365+DanielRaapDev@users.noreply.github.com>
Copy link
Member

@DanielRaapDev DanielRaapDev left a comment

Choose a reason for hiding this comment

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

lgtm.

The tests could be extended to also validate that the checksum does not change when annotations of the configmap like the helm chart version changes. Only when values affecting the data of the ConfigMap the checksum value needs to be different.

@DanielRaapDev
Copy link
Member

@copilot The tests could be extended to also validate that the checksum does not change when annotations of the configmap like the helm chart version changes. Only when values affecting the data of the ConfigMap the checksum value needs to be different.

…itivity

Co-authored-by: DanielRaapDev <10845365+DanielRaapDev@users.noreply.github.com>
Copy link
Author

Copilot AI commented Mar 3, 2026

@copilot The tests could be extended to also validate that the checksum does not change when annotations of the configmap like the helm chart version changes. Only when values affect...

Extended the tests in 4ec4ae6 for all three charts. Each chart now has three additional test cases:

  1. Asserts the checksum equals a specific hash when release.name: release-a with given data values
  2. Asserts the checksum equals the same hash when release.name: release-b (different metadata, same data) — proving metadata changes don't affect the checksum
  3. Asserts the checksum equals a different hash when a data-affecting value is changed — proving data changes do affect the checksum

@DanielRaapDev DanielRaapDev marked this pull request as ready for review March 4, 2026 08:32
@DanielRaapDev DanielRaapDev requested a review from Copilot March 4, 2026 08:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates three Helm charts to automatically trigger pod rollouts when their rendered ConfigMap data changes, by adding a checksum/config annotation to the pod template. It also bumps chart versions, adds Artifact Hub changelog entries, and introduces helm-unittest coverage to ensure the checksum is stable across metadata-only changes (like release name) while still changing on data updates.

Changes:

  • Add checksum/config pod-template annotations in o-neko, sophora-media-finder, and sophora-schema-docs, hashing ConfigMap .data only.
  • Bump chart versions and update artifacthub.io/changes entries accordingly.
  • Add helm-unittest tests verifying checksum stability across release name changes and variability when ConfigMap data changes; add podAnnotations: {} to sophora-media-finder.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
charts/sophora-schema-docs/templates/deployment.yaml Adds checksum/config annotation based on ConfigMap .data to trigger rollouts on config changes.
charts/sophora-schema-docs/tests/checksum_test.yaml Adds tests for checksum presence, metadata-stability, and data-change sensitivity.
charts/sophora-schema-docs/Chart.yaml Bumps chart version and updates Artifact Hub changelog entry.
charts/sophora-media-finder/templates/deployment.yaml Adds checksum/config annotation (data-only hash) and supports podAnnotations.
charts/sophora-media-finder/tests/checksum_test.yaml Adds tests for checksum presence, metadata-stability, and data-change sensitivity.
charts/sophora-media-finder/values.yaml Introduces podAnnotations: {} default.
charts/sophora-media-finder/Chart.yaml Bumps chart version and updates Artifact Hub changelog entry.
charts/o-neko/templates/deployment.yaml Adds checksum/config annotation based on ConfigMap .data.
charts/o-neko/tests/checksum_test.yaml Adds tests for checksum presence, metadata-stability, and data-change sensitivity.
charts/o-neko/Chart.yaml Bumps chart version and updates Artifact Hub changelog entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[sophora-media-supplier] The Deployment should use a checksum of the ConfigMap data to update pods after changes

3 participants