Skip to content

feat(gitrepo): announce GitRepoRestriction deprecation#5394

Closed
d3flex wants to merge 1 commit into
mainfrom
backport016/feat/GitRepoRestriction_announcement
Closed

feat(gitrepo): announce GitRepoRestriction deprecation#5394
d3flex wants to merge 1 commit into
mainfrom
backport016/feat/GitRepoRestriction_announcement

Conversation

@d3flex

@d3flex d3flex commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

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)

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)
Copilot AI review requested due to automatic review settings July 3, 2026 12:09
@d3flex d3flex requested a review from a team as a code owner July 3, 2026 12:09
@d3flex

d3flex commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

wrong branch again

@d3flex d3flex closed this Jul 3, 2026
@d3flex d3flex deleted the backport016/feat/GitRepoRestriction_announcement branch July 3, 2026 12:10
@d3flex d3flex restored the backport016/feat/GitRepoRestriction_announcement branch July 3, 2026 12:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 GitRepoRestriction exists 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(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants