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

Chores: upload credential-provider-config.yaml to artifact store in ci build #4280

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

MartinForReal
Copy link
Contributor

@MartinForReal MartinForReal commented Nov 16, 2023

What type of PR is this?
/kind failing-test
/kind cleanup

What this PR does / why we need it:

Uploading credentials-config yaml to azure blob storage and fix flaky e2e scenarios which uses oot azure credential provider.

In recent e2e build of cloud provider project, Cluster node may fail to initialize the control plane because credential provider config is invalid and kubelet crashes.

Nov 15 12:40:06.473151 capz-oh7kxt-control-plane-klvq7 kubelet[2278]: E1115 12:40:06.473135    2278 kuberuntime_manager.go:274] "Failed to register CRI auth plugins" err="error decoding config /var/lib/kubelet/credential-provider-config.yaml: Object 'Kind' is missing in '404: Not Found'"

The config is downloaded from git repo when the node is provisioned.

curl --retry 10 --retry-delay 5 -Lo /var/lib/kubelet/credential-provider-config.yaml https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/${IMAGE_TAG_ACR_CREDENTIAL_PROVIDER}/examples/out-of-tree/credential-provider-config.yaml

But the commit may reside in forked repo. And provision script will get 404 when it tries to download config file in this scenario.
The config file may be a part of changes. We should upload it to blob store to make sure config file is validated too.

Also, status code of http response is sent to stdout for debug purpose.

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:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 16, 2023
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 16, 2023
@lzhecheng
Copy link
Contributor

/lgtm

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

LGTM label has been added.

Git tree hash: 23fe5c0f4a99e5fc9cfcfd6b80725b0b18ad1e33

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c6c977e) 59.55% compared to head (7731499) 59.55%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4280   +/-   ##
=======================================
  Coverage   59.55%   59.55%           
=======================================
  Files         185      185           
  Lines       18782    18782           
=======================================
  Hits        11186    11186           
  Misses       6981     6981           
  Partials      615      615           

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

@MartinForReal
Copy link
Contributor Author

/assign @nojnhuh

@lzhecheng
Copy link
Contributor

/cherrypick release-1.11

@k8s-infra-cherrypick-robot

@lzhecheng: once the present PR merges, I will cherry-pick it on top of release-1.11 in a new PR and assign it to you.

In response to this:

/cherrypick release-1.11

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/test-infra repository.

@@ -8,7 +8,7 @@
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
cp C:\var\lib\kubelet\credential-provider\acr-credential-provider.exe C:\var\lib\kubelet\credential-provider\acr-credential-provider
curl.exe --retry 10 --retry-delay 5 -L https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/${IMAGE_TAG_ACR_CREDENTIAL_PROVIDER}/examples/out-of-tree/credential-provider-config-win.yaml --output C:\var\lib\kubelet\credential-provider-config.yaml
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}/credential-provider-config-win.yaml" --output C:\var\lib\kubelet\credential-provider-config.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Is there any way we can also print the http code like we do for linux? No need to block the PR on this -- but was just curious.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no for now..

Copy link
Contributor

Choose a reason for hiding this comment

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

sure.

Copy link
Contributor

@sonasingh46 sonasingh46 left a comment

Choose a reason for hiding this comment

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

/lgtm

@sonasingh46
Copy link
Contributor

/retest

@sonasingh46
Copy link
Contributor

@MartinForReal -- Can you please write a PR description for record, something on the lines of why this change is needed so that folks can get some context who may be seeing for the first time?

Something on lines -- uploading credentials-config yaml to azure blob storage and using that in CI from azure blob storage and not from the github repository so that the downloads are fast and not flaky and hence stable CI ??

@sonasingh46
Copy link
Contributor

Also Netlify deploy is failing? I did not get an option to re trigger this. Does anyone know the root issue or how to re trigger this? cc @mboersma

@MartinForReal MartinForReal changed the title Chores: upload credential-provider-config.yaml to artifact store in ci build [draft]Chores: upload credential-provider-config.yaml to artifact store in ci build Nov 16, 2023
@MartinForReal
Copy link
Contributor Author

/hold

@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 Nov 16, 2023
@MartinForReal
Copy link
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 16, 2023
@MartinForReal MartinForReal changed the title [draft]Chores: upload credential-provider-config.yaml to artifact store in ci build Chores: upload credential-provider-config.yaml to artifact store in ci build Nov 16, 2023
@MartinForReal
Copy link
Contributor Author

/unhold

@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 Nov 16, 2023
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
/cherry-pick release-1.11

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

LGTM label has been added.

Git tree hash: 3aee7b5fe2cee70b4bc00adf471fc15761ec5d94

@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 Nov 16, 2023
@k8s-ci-robot k8s-ci-robot merged commit 3973bb6 into kubernetes-sigs:main Nov 16, 2023
28 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.12 milestone Nov 16, 2023
@k8s-infra-cherrypick-robot

@lzhecheng: #4280 failed to apply on top of branch "release-1.11":

Applying: chores: upload credential-provider-config.yaml to artifact store in ci build
Using index info to reconstruct a base tree...
A	templates/test/ci/cluster-template-prow-ci-version-dual-stack.yaml
A	templates/test/ci/cluster-template-prow-ci-version-ipv6.yaml
M	templates/test/ci/cluster-template-prow-ci-version.yaml
M	templates/test/ci/cluster-template-prow-machine-pool-ci-version.yaml
M	templates/test/ci/prow-machine-pool-ci-version/patches/kubeadm-bootstrap-windows-k8s-ci-binaries.yaml
M	templates/test/ci/prow-machine-pool-ci-version/patches/machine-pool-ci-version.yaml
M	templates/test/dev/cluster-template-custom-builds-machine-pool.yaml
M	templates/test/dev/cluster-template-custom-builds.yaml
M	templates/test/dev/custom-builds-machine-pool/patches/custom-builds.yaml
M	templates/test/dev/custom-builds-machine-pool/patches/kubeadm-bootstrap-machine-pool-windows-k8s-pr-binaries.yaml
M	templates/test/dev/patches/control-plane-custom-builds.yaml
Falling back to patching base and 3-way merge...
Auto-merging templates/test/dev/patches/control-plane-custom-builds.yaml
Auto-merging templates/test/dev/custom-builds-machine-pool/patches/kubeadm-bootstrap-machine-pool-windows-k8s-pr-binaries.yaml
Auto-merging templates/test/dev/custom-builds-machine-pool/patches/custom-builds.yaml
Auto-merging templates/test/dev/cluster-template-custom-builds.yaml
Auto-merging templates/test/dev/cluster-template-custom-builds-machine-pool.yaml
Auto-merging templates/test/ci/prow-machine-pool-ci-version/patches/machine-pool-ci-version.yaml
Auto-merging templates/test/ci/prow-machine-pool-ci-version/patches/kubeadm-bootstrap-windows-k8s-ci-binaries.yaml
Auto-merging templates/test/ci/cluster-template-prow-machine-pool-ci-version.yaml
Auto-merging templates/test/ci/cluster-template-prow-ci-version.yaml
CONFLICT (modify/delete): templates/test/ci/cluster-template-prow-ci-version-ipv6.yaml deleted in HEAD and modified in chores: upload credential-provider-config.yaml to artifact store in ci build. Version chores: upload credential-provider-config.yaml to artifact store in ci build of templates/test/ci/cluster-template-prow-ci-version-ipv6.yaml left in tree.
CONFLICT (modify/delete): templates/test/ci/cluster-template-prow-ci-version-dual-stack.yaml deleted in HEAD and modified in chores: upload credential-provider-config.yaml to artifact store in ci build. Version chores: upload credential-provider-config.yaml to artifact store in ci build of templates/test/ci/cluster-template-prow-ci-version-dual-stack.yaml left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 chores: upload credential-provider-config.yaml to artifact store in ci build
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.11

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/test-infra repository.

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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. 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.

7 participants