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
fix image pulling failure when IMDS is unavailable in kubelet startup #110523
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, feiskyer 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 |
if a.servicePrincipalToken == nil { | ||
token, err := auth.GetServicePrincipalToken(a.config, a.environment) | ||
if err != nil { | ||
klog.Errorf("Failed to create service principal token: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the log message has to be like Failed to get service principal token: %v", err
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aha, good catch! let me work out another typo fix.
…110523-upstream-release-1.22 Automated cherry pick of #110523: fix image pulling failure when IMDS is unavailalbe in kubelet
…110523-upstream-release-1.24 Automated cherry pick of #110523: fix image pulling failure when IMDS is unavailalbe in kubelet
…110523-upstream-release-1.23 Automated cherry pick of #110523: fix image pulling failure when IMDS is unavailalbe in kubelet
What type of PR is this?
/kind bug
What this PR does / why we need it:
fix image pulling failure when IMDS is unavailable in kubelet startup
This PR would try getting Azure token from IMDS if it failed in the beginning when kubelet startup, this PR also removes the unused
registryClient
systemctl restart kubelet
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
/kind bug
/priority important-soon
/sig cloud-provider
/area provider/azure
/triage accepted
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: