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.10] ignore AKS user-assigned ClientID/PrincipalID in diff #3963

Merged

Conversation

nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented Sep 6, 2023

What type of PR is this?
/kind bug

What this PR does / why we need it:

Manual cherry-pick of #3962:

This fixes a bug causing an endless reconciliation of AzureManagedControlPlane with spec.identity.type set to UserAssigned because of a continuous diff like this:

&armcontainerservice.ManagedCluster{
  	Location:         nil,
  	ExtendedLocation: nil,
  	Identity: &armcontainerservice.ManagedClusterIdentity{
  		DelegatedResources: nil,
  		Type:               &"UserAssigned",
  		UserAssignedIdentities: map[string]*armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{
  			"/subscriptions/<sub>/resourcegroups/<group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<name>": &{
- 				ClientID:    nil,
+ 				ClientID:    &"00000000-0000-0000-00000-00000000000",
- 				PrincipalID: nil,
+ 				PrincipalID: &"00000000-0000-0000-00000-00000000000",
  			},
  		},
  		PrincipalID: nil,
  		TenantID:    nil,
  	},
  	Properties: &{AutoScalerProfile: &{}, IdentityProfile: {"kubeletidentity": &{ResourceID: &"/subscriptions/<sub>/resourcegrou"...}}, KubernetesVersion: &"1.26.3", NetworkProfile: &{}, ...},
  	SKU:        &{Name: &"Base", Tier: &"Free"},
  	... // 5 identical fields
  }

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Fixed a bug causing AzureManagedControlPlanes with `spec.identity.type` set to `UserAssigned` to needlessly reconcile constantly.

@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 Sep 6, 2023
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 6, 2023
@Jont828
Copy link
Contributor

Jont828 commented Sep 6, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 6, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: b5567b13055cc2329e0209885165f7e2e348e709

Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 6, 2023
@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (f000d8d) 54.26% compared to head (bc99dde) 54.27%.
Report is 1 commits behind head on release-1.10.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.10    #3963      +/-   ##
================================================
+ Coverage         54.26%   54.27%   +0.01%     
================================================
  Files               186      186              
  Lines             18855    18861       +6     
================================================
+ Hits              10231    10237       +6     
  Misses             8069     8069              
  Partials            555      555              
Files Changed Coverage Δ
azure/services/managedclusters/spec.go 49.49% <100.00%> (+0.78%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nojnhuh
Copy link
Contributor Author

nojnhuh commented Sep 6, 2023

Go modules 503:
/retest

@k8s-ci-robot k8s-ci-robot merged commit e28107b into kubernetes-sigs:release-1.10 Sep 6, 2023
19 checks passed
@nojnhuh nojnhuh deleted the fix-aks-identity branch September 7, 2023 20:21
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants