Skip to content

Enhance update-images.py with directives and comment preservation#1572

Merged
ccwienk merged 2 commits intogardener:masterfrom
wpross:add-directives
Apr 22, 2026
Merged

Enhance update-images.py with directives and comment preservation#1572
ccwienk merged 2 commits intogardener:masterfrom
wpross:add-directives

Conversation

@wpross
Copy link
Copy Markdown
Contributor

@wpross wpross commented Apr 21, 2026

  • Add 'freeze' directive to prevent updates on specific entries
  • Add 'max-supported-k8s' directive to prevent new k8s version entries
  • Add 'version-mapping' directive for GCP CCM version format
  • Preserve custom comments in images.yaml output
  • Handle manual k8s constraints (e.g., csi-provisioner '>= 1.34')
  • Fix comment indentation in YAML output

Release note:

Add directives for update-images.py: `freeze` (prevent updates), `max-supported-k8s` (limit k8s
  version entries), `version-mapping` (GCP CCM version format). Custom comments above image entries
  are now preserved. Images with manual k8s constraints (e.g., `>= 1.34` unrelated to image version)
   are updated while preserving targetVersion.

- Add 'freeze' directive to prevent updates on specific entries
- Add 'max-supported-k8s' directive to prevent new k8s version entries
- Add 'version-mapping' directive for GCP CCM version format
- Preserve custom comments in images.yaml output
- Handle manual k8s constraints (e.g., csi-provisioner '>= 1.34')
- Fix comment indentation in YAML output
@gardener-prow
Copy link
Copy Markdown

gardener-prow Bot commented Apr 21, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ccwienk for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow Bot added do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 21, 2026
Comment thread .github/actions/update-extension-provider-images/update-images.py Outdated
Comment thread .github/actions/update-extension-provider-images/update-images.py Outdated
Comment thread .github/actions/update-extension-provider-images/update-images.py Outdated
Comment thread .github/actions/update-extension-provider-images/update-images.py Outdated
Comment thread .github/actions/update-extension-provider-images/update-images.py Outdated
Comment thread .github/actions/update-extension-provider-images/update-images.py Outdated
Comment thread .github/actions/update-extension-provider-images/update-images.py Outdated
Comment thread .github/actions/update-extension-provider-images/update-images.py Outdated
- Move directives out of ImageEntry dataclass into separate
DirectivesMap
- Replace methods with standalone helper functions
- Rename 'manual k8s constraint' to 'explicit k8s constraint'
- Use math.inf for yaml.width instead of magic number
- Add explicit check for 'images' key in YAML
- Pass yaml_content to load_and_validate instead of re-reading file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants