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

Switch to using external ECR credential provider for k8s 1.27 #15342

Merged
merged 2 commits into from
May 2, 2023

Conversation

olemarkus
Copy link
Member

No description provided.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 20, 2023
@k8s-ci-robot k8s-ci-robot added area/nodeup size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 20, 2023
@olemarkus
Copy link
Member Author

/hold for completion

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 20, 2023
@@ -413,6 +434,56 @@ func (b *KubeletBuilder) usesContainerizedMounter() bool {
}
}

// addECRCP installs the ECR credential provider
func (b *KubeletBuilder) addECCRCP(c *fi.NodeupModelBuilderContext) error {
Copy link
Member

@hakman hakman Apr 28, 2023

Choose a reason for hiding this comment

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

Seems to be a typo.

Suggested change
func (b *KubeletBuilder) addECCRCP(c *fi.NodeupModelBuilderContext) error {
func (b *KubeletBuilder) addECRCP(c *fi.NodeupModelBuilderContext) error {

@@ -220,6 +220,9 @@ type AWSSpec struct {
// Spotinst cloud-config specs
SpotinstProduct *string `json:"spotinstProduct,omitempty"`
SpotinstOrientation *string `json:"spotinstOrientation,omitempty"`

// BinaryLocation is the location of the AWS cloud provider binaries.
BinaryLocation *string `json:"binaryLocation,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

BinaryLocation seems a little vague to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I know. I hate it. But I couldn't find a good name for this.

FTR: the motivation behind this one is to use the PR/staging bucket in the AWS cloud provider e2e tests.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe BinariesLocation, in case there will be more in the future?

if c.Cluster.UsesExternalECRCredentialsProvider() {
binaryLocation := c.Cluster.Spec.CloudProvider.AWS.BinaryLocation
if binaryLocation == nil {
binaryLocation = fi.PtrTo("https://artifacts.k8s.io/binaries/cloud-provider-aws/v1.27.1")
Copy link
Member

Choose a reason for hiding this comment

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

Should v1.27.1 be something like AWS CCM version? Not sure if we have access to that here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Its a good catch. I was thinking of a helper method here where we feed in the K8s version and returns the cloud provider version. And move the case statement from CCM into that function. But I thought there wasn't a rush to do this right now.

Copy link
Member

Choose a reason for hiding this comment

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

No rush.

@hakman
Copy link
Member

hakman commented Apr 29, 2023

/retest

@olemarkus
Copy link
Member 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 May 2, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 2, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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 2, 2023
@k8s-ci-robot k8s-ci-robot merged commit 0f13866 into kubernetes:master May 2, 2023
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. area/api area/documentation area/nodeup cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants