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

swap curl for az storage blob download for credential provider #4961

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jeremyrickard
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

This PR makes a change to templates/test/dev/cluster-template-custom-builds.yaml to replace the use of curl to get the acr credential provider with the az storage download call to be consistent with the rest of the template. In cases where the test is using a storage account with anon blob access disabled, az storage blob download is required.

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:

Uses az storage blob download to fetch acr credential provider in cluster-template-custom-builds.yaml

@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 Jul 3, 2024
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 3, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mboersma for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.25%. Comparing base (5493e53) to head (d1a15e4).
Report is 85 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4961   +/-   ##
=======================================
  Coverage   62.25%   62.25%           
=======================================
  Files         201      201           
  Lines       16912    16912           
=======================================
  Hits        10529    10529           
  Misses       5590     5590           
  Partials      793      793           

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

@k8s-ci-robot
Copy link
Contributor

@jeremyrickard: 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-e2e-with-wi-optional d1a15e4 link false /test pull-cluster-api-provider-azure-e2e-with-wi-optional
pull-cluster-api-provider-azure-verify d1a15e4 link true /test pull-cluster-api-provider-azure-verify
pull-cluster-api-provider-azure-conformance-custom-builds d1a15e4 link false /test pull-cluster-api-provider-azure-conformance-custom-builds
pull-cluster-api-provider-azure-windows-custom-builds d1a15e4 link false /test pull-cluster-api-provider-azure-windows-custom-builds

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.

echo "Use OOT credential provider"
mkdir C:\var\lib\kubelet\credential-provider
curl.exe --retry 10 --retry-delay 5 -L "https://${AZURE_STORAGE_ACCOUNT}.blob.core.windows.net/${AZURE_BLOB_CONTAINER_NAME}/${IMAGE_TAG_ACR_CREDENTIAL_PROVIDER}/azure-acr-credential-provider.exe" --output C:\var\lib\kubelet\credential-provider\acr-credential-provider.exe
az storage blob download --blob-url "https://${AZURE_STORAGE_ACCOUNT}.blob.core.windows.net/${AZURE_BLOB_CONTAINER_NAME}/${IMAGE_TAG_ACR_CREDENTIAL_PROVIDER}/azure-acr-credential-provider.exe" --file "C:\var\lib\kubelet\credential-provider\acr-credential-provider.exe" --auth-mode login
Copy link
Contributor

Choose a reason for hiding this comment

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

The source of truth for these scripts looks to be in the oot-credential-provider*.yaml files here: https://github.com/kubernetes-sigs/cluster-api-provider-azure/tree/5493e53d1aff013b9a093c9732559f12b51b01ca/templates/test/ci/prow-ci-version/patches

Making these changes there then running make generate should get the "Verify" CI check green.

Copy link
Member Author

@jeremyrickard jeremyrickard Jul 8, 2024

Choose a reason for hiding this comment

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

Ah thanks @nojnhuh. I think there was an attempt to do this more broadly and it didn't work so I am not sure if making this change to those files is the right thing to do?

Revert was done here:
35dfb57

Copy link
Contributor

Choose a reason for hiding this comment

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

@jackfrancis Do you remember exactly what the issue was with #4724? I can't think of any blockers there anymore. I've been doing local testing with custom builds/CI versions and have been needing to make these changes in order to run in the corp tenant. I can open a PR unless you know of some reason that obviously still won't work.

@nawazkh
Copy link
Member

nawazkh commented Sep 5, 2024

I am working on something similar, posting here for reference #5109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
Status: Wait-On-Author
Development

Successfully merging this pull request may close these issues.

4 participants