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

restore manager bootstrap creds for subscription ID #4784

Merged
merged 1 commit into from
May 3, 2024

Conversation

nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented Apr 26, 2024

What type of PR is this?
/kind bug

What this PR does / why we need it:

When we required AzureClusterIdentity starting in #3793, we removed the authentication environment variables from the CAPZ controller manager Pod, including AZURE_SUBSCRIPTION_ID. That value cannot be defined in an AzureClusterIdentity and is instead an optional field on AzureCluster and AzureManagedControlPlane. That "optional" qualifier requires that users are able to specify a subscription ID some other way. This PR restores the AZURE_SUBSCRIPTION_ID variable for the controller manager Pod and can be set when CAPZ is installed the same way it could have been in CAPZ v1.10 and earlier.

This is a near-term, backwards compatible fix to help us flesh out how we might want to modify the subscriptionID field longer-term in #4612.

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 #4557

Special notes for your reviewer:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

A regression making `spec.subsciptionID` required on AzureCluster and AzureManagedControlPlane has been fixed. Users can specify a global subscription ID with the `AZURE_SUBSCRIPTION_ID_B64` environment variable when CAPZ is installed as was possible in CAPZ v1.10 and earlier.

@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 Apr 26, 2024
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 26, 2024
@nojnhuh nojnhuh mentioned this pull request Apr 26, 2024
4 tasks
Copy link

codecov bot commented Apr 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.46%. Comparing base (cdf5992) to head (8c3deed).
Report is 23 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4784   +/-   ##
=======================================
  Coverage   62.46%   62.46%           
=======================================
  Files         196      196           
  Lines       16180    16180           
=======================================
  Hits        10107    10107           
  Misses       5333     5333           
  Partials      740      740           

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

Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

/lgtm

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

LGTM label has been added.

Git tree hash: a65ca719f2986fe1d318dacfdfe48d85c2e12693

@jackfrancis
Copy link
Contributor

/assign @willie-yao

@jackfrancis jackfrancis added this to the v1.15 milestone May 2, 2024
Copy link
Contributor

@willie-yao willie-yao left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

@jackfrancis jackfrancis 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: jackfrancis

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 May 3, 2024
@k8s-ci-robot k8s-ci-robot merged commit 214c107 into kubernetes-sigs:main May 3, 2024
19 checks passed
@nojnhuh nojnhuh deleted the bootstrap-sub branch May 3, 2024 18:33
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
Archived in project
5 participants