Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-1.28] Fix : Enable system tag support prefix match #8151

Open
wants to merge 1 commit into
base: release-1.28
Choose a base branch
from

Conversation

nilo19
Copy link
Contributor

@nilo19 nilo19 commented Jan 25, 2025

What type of PR is this?

/kind bug

What this PR does / why we need it:

In the logic for updating tags, if we define systemTags, any tags not included in systemTags will be deleted. However, this behavior can cause some AKS-managed tags to be mistakenly deleted. Adding all AKS-managed tags individually to systemTags would make systemTags excessively long and difficult to maintain.

This PR enhances the comparison logic between tags and systemTags by introducing prefix matching. With this change, we can add a prefix like aks-managed to systemTags, and any tags starting with aks-managed, such as aks-managed-cluster-name or aks-managed-cluster-rg, will be successfully matched and retained, preventing accidental deletion.

This approach reduces the size of systemTags while maintaining flexibility and ensuring that AKS-managed tags are preserved.

Which issue(s) this PR fixes:

Fixes #8053

Special notes for your reviewer:

Does this PR introduce a user-facing change?

- Introduced **prefix-based matching** for `systemTags` during tag reconciliation.
- Tags starting with a prefix defined in `systemTags` (e.g., `aks-managed`) will now be matched and retained.
- For example:  Adding `aks-managed` to `systemTags` ensures tags like `aks-managed-cluster-name` and `aks-managed-cluster-rg` are preserved.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 25, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nilo19

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

The pull request process is described here

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

@nilo19 nilo19 changed the title Fix : Enable system tag support prefix match [release-1.28] Fix : Enable system tag support prefix match Jan 25, 2025
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 25, 2025
@k8s-ci-robot
Copy link
Contributor

@nilo19: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cloud-provider-azure-e2e-ccm-vmss-capz-1-28 b3d6ce5 link true /test pull-cloud-provider-azure-e2e-ccm-vmss-capz-1-28
pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz-1-28 b3d6ce5 link true /test pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz-1-28
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz-1-28 b3d6ce5 link true /test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz-1-28
pull-cloud-provider-azure-e2e-ccm-capz-1-28 b3d6ce5 link true /test pull-cloud-provider-azure-e2e-ccm-capz-1-28
pull-cloud-provider-azure-e2e-capz-1-28 b3d6ce5 link true /test pull-cloud-provider-azure-e2e-capz-1-28

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants