Skip to content

Introduce GLK version check#227

Open
timuthy wants to merge 4 commits intomainfrom
enh/glk-version-check
Open

Introduce GLK version check#227
timuthy wants to merge 4 commits intomainfrom
enh/glk-version-check

Conversation

@timuthy
Copy link
Copy Markdown
Member

@timuthy timuthy commented Apr 8, 2026

How to categorize this PR?

/area delivery
/kind enhancement

What this PR does / why we need it:
This PR adds GL as a self-managed component within its own component vector, enabling version validation and lifecycle management through external workflows or OCM component descriptors. The tool now validates that its own version matches the GLK component version defined in components.yaml, preventing version mismatches between the tool and the managed components.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

GLK now includes itself in the component vector, enabling lifecycle management through external workflows or OCM component descriptors. The tool validates that its version matches the `github.com/gardener/gardener-landscape-kit` component version in `components.yaml` to prevent mismatches. Version check behavior can be configured via `versionConfig.checkMode`:                                                                                                    
  - `Strict` (default): Version mismatches cause errors and block generation                                                                                                                                                               
  - `Warning`: Version mismatches are logged but don't block generation    

@gardener-prow gardener-prow bot added area/delivery Delivery related kind/enhancement Enhancement, improvement, extension labels Apr 8, 2026
@gardener-prow
Copy link
Copy Markdown

gardener-prow bot commented Apr 8, 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 lucabernstein 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 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 8, 2026
@timuthy
Copy link
Copy Markdown
Member Author

timuthy commented Apr 8, 2026

/hold
Until #206 is merged.

@gardener-prow gardener-prow bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 8, 2026
timuthy added 3 commits April 9, 2026 16:04
Introduces hack/sync-glk-version.sh to automatically sync the
gardener-landscape-kit component version in componentvector/components.yaml
with the VERSION file during code generation.

Integrated into the generate target in Makefile to run automatically.
@timuthy timuthy force-pushed the enh/glk-version-check branch from b958109 to 26799e6 Compare April 9, 2026 14:05
@gardener-prow gardener-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 9, 2026
Copy link
Copy Markdown
Member

@LucaBernstein LucaBernstein left a comment

Choose a reason for hiding this comment

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

Thank you very much for adding this check. I only have two minor questions.

}

if checkMode == configv1alpha1.VersionCheckModeWarning {
log.Info("WARNING: version mismatch - tool version does not match gardener-landscape-kit component version in component vector - obtain the matching gardener-landscape-kit version or adjust the component vector", "toolVersion", toolVersion, "componentVersion", componentVersion)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we really want to keep the WARNING: prefix in the log message here or adapt a more generic approach and add .V(1) to lower-level info logs?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I changed it to log.Error. WDYT?

@gardener-prow
Copy link
Copy Markdown

gardener-prow bot commented Apr 13, 2026

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@gardener-prow gardener-prow bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/delivery Delivery related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/enhancement Enhancement, improvement, extension needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants