feat(gitrepo): announce GitRepoRestriction deprecation#5394
Closed
d3flex wants to merge 1 commit into
Closed
Conversation
GitRepoRestriction is being deprecated in favor of Policy. Seems already the case for `helmops`. With this commit we start deprecation on the next version (v2.16.0) pointing to the migration guide and announce removal from v2.17.0. The log is gated on at least one restriction being present, so users who already moved to Policy are not warned. Refers to #5306 Signed-off-by: Ioannis Bonatakis <ybonatakis@suse.com> (cherry picked from commit 7ea7b79)
Contributor
Author
|
wrong branch again |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a deprecation warning for GitRepoRestriction usage so operators are informed to migrate restrictions to Policy, aligning with the planned deprecation/removal timeline.
Changes:
- Emit a log message when at least one
GitRepoRestrictionexists in a namespace. - Add controller-runtime logging import to support the new warning.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+41
to
+45
| if len(restrictions.Items) > 0 { | ||
| log.FromContext(ctx).Info( | ||
| "GitRepoRestriction will be removed in the next minor release (Fleet v0.18.0 / Rancher v2.17.0); All restrictions must migrate to Policy. " + | ||
| "See https://fleet.rancher.io/next/how-tos-for-operators/tenant-setup#_migration_from_gitreporestriction") | ||
| } |
Comment on lines
+41
to
+42
| if len(restrictions.Items) > 0 { | ||
| log.FromContext(ctx).Info( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitRepoRestriction is being deprecated in favor of Policy. Seems already the case for
helmops. With this commit we start deprecation on the next version (v2.16.0) pointing to the migration guide and announce removal from v2.17.0.The log is gated on at least one restriction being present, so users who already moved to Policy are not warned.
Refers to #5306
(cherry picked from commit 7ea7b79)