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

Allow override of registry and tag for Calico images #10316

Merged
merged 1 commit into from
Dec 11, 2020

Conversation

hakman
Copy link
Member

@hakman hakman commented Nov 25, 2020

/hold for feedback
/cc @johngmyers @olemarkus @rifelpet

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 25, 2020
@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 area/addons approved Indicates a PR has been approved by an approver from all required OWNERS files. area/api labels Nov 25, 2020
@seh
Copy link
Contributor

seh commented Nov 30, 2020

I've tested this patch atop the "release-1.19" branch, and found that it works well.

@seh
Copy link
Contributor

seh commented Dec 9, 2020

Do any of the nominated reviewers have any suggestions or objections here?

@rifelpet
Copy link
Member

I'm not a huge fan of the inconsistency we're introducing between other CNIs and addons, though after looking into it the other CNIs are already inconsistent in their API field naming:

AWS VPC: .ImageName
Cilium:  .Version
Weave:   .Version

I know we've been waiting for addon operators for a long time now, but I think as long as we have a clear transition path from this to addon operators then it should be okay.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 11, 2020
@hakman
Copy link
Member Author

hakman commented Dec 11, 2020

/hold

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 11, 2020
@hakman
Copy link
Member Author

hakman commented Dec 11, 2020

Thanks @rifelpet. You were right, I should have used .Version.
/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 Dec 11, 2020
@rifelpet
Copy link
Member

👍🏻 I'm not a huge fan of Version because it suggests that kops will install the entire manifest associated with the requested version, when in reality it will use the manifest associated with kops' default version (for the k8s version) and then only override the image tags with the requested version. This could lead to RBAC issues or anything else that could stem from mismatched manifests and images.

but I think consistency is key here

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 11, 2020
@hakman
Copy link
Member Author

hakman commented Dec 11, 2020

Yes, will have to add some docs for this later and explain that version should be used with "care". :)

@olemarkus
Copy link
Member

FWIW with Cilium we do try to apply the best manifest for the version given.

@hakman
Copy link
Member Author

hakman commented Dec 11, 2020

Could try that at some point I guess :). It is not a bad idea, just much more to maintain. Also, Calico releases much more versions.

@hakman
Copy link
Member Author

hakman commented Dec 11, 2020

/retest

@k8s-ci-robot k8s-ci-robot merged commit 6f05c0b into kubernetes:master Dec 11, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Dec 11, 2020
@hakman hakman deleted the override-tag branch December 11, 2020 16:15
k8s-ci-robot added a commit that referenced this pull request Dec 12, 2020
…10408-upstream-release-1.19

Automated cherry pick of #10316: Allow override of registry and tag for Calico images #10408: Update Calico to v3.17.1
@seh
Copy link
Contributor

seh commented Feb 22, 2021

Trying to use this feature today, I once again left the leading 'v' character off the value I supplied to the "spec.networking.calico.version" field. Had the field been called "tag" or something other than "version," I probably would stop making that mistake.

@olemarkus
Copy link
Member

You can copy the validation we have for the same thing in cilium :p

@hakman
Copy link
Member Author

hakman commented Feb 22, 2021

The idea was to not limit it to tags starting with v. Let's not add any extra validation :).

@seh
Copy link
Contributor

seh commented Feb 22, 2021

Yes, the same problem comes up in many places that deal with semantic versions, and debate whether or not the leading 'v' is part of the version. Here, I think of the version as "3.17.3," and I know that the container image tag is the prefixed "v3.17.3."

The problem for me is the field name, not the values it accepts. I like that it accepts anything, because there's a lot of freedom for image tags. It's just misleading to suggest that it's asking for a version.

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/addons area/api 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants