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

CI: workload-identity native #4765

Merged

Conversation

jackfrancis
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR updates E2E CI automation and underlying cluster templates to use workload-identity, with the required Azure infra installed on-demand as part of CI automation.

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:

CI: workload-identity native

@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/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 23, 2024
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Apr 23, 2024
@jackfrancis
Copy link
Contributor Author

@aramase @nilekhc @sozercan this PR borrows heavily from this azure-workload-identity project-approved script:

https://github.com/Azure/azure-workload-identity/blob/main/scripts/wi-kind-setup.sh

Could you do a high level sanity check of the approach here to automate kind + azwi?

Thank you!

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.04%. Comparing base (2df965a) to head (ceebc0b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4765   +/-   ##
=======================================
  Coverage   62.04%   62.04%           
=======================================
  Files         201      201           
  Lines       16878    16878           
=======================================
  Hits        10472    10472           
  Misses       5623     5623           
  Partials      783      783           

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

@jackfrancis jackfrancis force-pushed the capz-e2e-workload-identity branch from d34b2ce to 09623fe Compare April 23, 2024 19:16
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 23, 2024
@jackfrancis jackfrancis force-pushed the capz-e2e-workload-identity branch from 09623fe to 32a2727 Compare April 24, 2024 01:35
@jackfrancis
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e

3 similar comments
@jackfrancis
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e

@jackfrancis
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e

@jackfrancis
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e

@jackfrancis jackfrancis force-pushed the capz-e2e-workload-identity branch 5 times, most recently from fb14c3f to a47b364 Compare April 25, 2024 17:37
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 25, 2024
@jackfrancis jackfrancis force-pushed the capz-e2e-workload-identity branch from a47b364 to 8dbd041 Compare April 25, 2024 17:46
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 25, 2024
@jackfrancis
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e

@jackfrancis jackfrancis force-pushed the capz-e2e-workload-identity branch 2 times, most recently from 444de0d to bab1915 Compare April 26, 2024 00:00
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 10, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 6f27826c951ffc7c748f37eebc5f98f63d7af819

@Jont828
Copy link
Contributor

Jont828 commented Jun 10, 2024

Looks like you got a failure with the e2e-optional test. Seems like the control plane wasn't initialized.

/test pull-cluster-api-provider-azure-e2e-optional

@nojnhuh
Copy link
Contributor

nojnhuh commented Jun 10, 2024

spot test should be fixed by #4910 once that merges.

@nojnhuh
Copy link
Contributor

nojnhuh commented Jun 10, 2024

/test pull-cluster-api-provider-azure-e2e-optional

@jackfrancis
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 10, 2024
@jackfrancis
Copy link
Contributor Author

/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 Jun 10, 2024
@nojnhuh
Copy link
Contributor

nojnhuh commented Jun 10, 2024

@jackfrancis Do you intend to squash?

@jackfrancis
Copy link
Contributor Author

/hold

for squash!

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 10, 2024
Signed-off-by: Jack Francis <[email protected]>
@jackfrancis jackfrancis force-pushed the capz-e2e-workload-identity branch from de9c64b to 5e6ede0 Compare June 10, 2024 23:44
@jackfrancis
Copy link
Contributor Author

/hold cancel

Thank you @nojnhuh !

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 10, 2024
@k8s-ci-robot
Copy link
Contributor

@jackfrancis: 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-cluster-api-provider-azure-windows-containerd-upstream-with-ci-artifacts-serial-slow ccd17cf link false /test pull-cluster-api-provider-azure-windows-containerd-upstream-with-ci-artifacts-serial-slow
pull-cluster-api-provider-azure-windows-with-ci-artifacts 5e6ede0 link false /test pull-cluster-api-provider-azure-windows-with-ci-artifacts

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.

@willie-yao
Copy link
Contributor

/retest

@k8s-ci-robot k8s-ci-robot merged commit de31bcc into kubernetes-sigs:main Jun 11, 2024
25 of 29 checks passed
@jackfrancis jackfrancis deleted the capz-e2e-workload-identity branch June 11, 2024 14:28
@lzhecheng
Copy link
Contributor

@jackfrancis is it required recently to switch to workload-identity for all upstream CI? We are maintaining some own templates with sp.

@jackfrancis
Copy link
Contributor Author

@lzhecheng those templates will eventually need to be converted when we migrate to prow community k8s infra, as we will no longer be maintaining sp secrets in prow

@jsturtevant and @nawazkh and I are working on a model for that, it will look like this:

https://github.com/kubernetes/test-infra/pull/32837/files

@lzhecheng
Copy link
Contributor

@lzhecheng those templates will eventually need to be converted when we migrate to prow community k8s infra, as we will no longer be maintaining sp secrets in prow

@jsturtevant and @nawazkh and I are working on a model for that, it will look like this:

https://github.com/kubernetes/test-infra/pull/32837/files

I'm curious if it is ok to put tenant id, sub id into a public file. Is it actually a common practice? Or it actually does no harm.

@jackfrancis
Copy link
Contributor Author

@lzhecheng client id, subscription id, and tenant id are not secret data

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/feature Categorizes issue or PR as related to a new feature. 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Automate kind + workload identity