-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add aws-cloud-controller-manager config to addons #9704
Conversation
/hold |
Version: fi.String(version), | ||
Manifest: fi.String(location), | ||
Selector: map[string]string{"k8s-addon": key}, | ||
KubernetesVersion: ">=1.18.0", |
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.
What is the correct behavior for k8s < 1.18? Previously it would install core.addons.k8s.io
.
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.
Yeah, we should probably keep that behavior, as we don't have any published images pre-1.18.
serviceAccountName: cloud-controller-manager | ||
containers: | ||
- name: aws-cloud-controller-manager | ||
image: gcr.io/k8s-staging-provider-aws/cloud-controller-manager:v1.18.0-alpha.1 |
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.
Does the version need to track that of Kubernetes? The cloud-provider-aws repo doesn't say what the version compatibility policy is.
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.
You can most likely just copy the OpenStackCCMTag function in template_functions.go.
Need any help to progress on this? |
281dc06
to
58926f7
Compare
@olemarkus so I ran into a ton of failures running e2e tests on clusters created with this change, and finally had a chance to dig in and discovered that the issue is that aws volumes need kubelet to start up with
Interestingly, with This issue looks like the same: kubernetes/kubernetes#71018. So possibly the options as the code stands today are either 1. use CSI or 2. run kubelet with |
I think it makes sense to use CSI. It is something that would be interesting to support anyway. |
@olemarkus I'd actually like to allow for both, as one use case for this change is testing upgrade scenarios. Right now this is configurable with:
|
The other KCM flag that I've exposed in this PR is the |
}) | ||
|
||
// Ensure ExternalCloudVolumePlugin is set to AWS | ||
b.Cluster.Spec.KubeControllerManager.ExternalCloudVolumePlugin = "aws" |
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.
This type of logic can be added in ./pkg/model/components
. That way changes done are also subject to validation and such. There is already something similar in place for openstack.
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.
Thanks, that's very helpful. Will add some validation here.
Sounds good. It may be an idea to add a flag to |
/cc @andrewsykim |
58926f7
to
7889207
Compare
|
pkg/apis/kops/cluster.go
Outdated
|
||
// CSI defines container storage interface configuration. | ||
// +optional | ||
CSI *CSIConfiguration `json:"csi,omitempty"` |
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.
For other providers we have similar types of configuration under a struct in CloudConfiguration
. AWS doesn't have its own struct here; now may be the time to add it.
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.
I thought about that, but CloudConfig seems to be tightly mapped to the actual config file that is placed on disk, which is deprecated according to documentation I found. Shouldn't we move on from that object? Also, it kindof combines/conflates various addons, like CCM, CSI, etc. (even though, yes they are cloud related, there are many combinations that users might want to use and combining all of the configuration makes it quite difficult to understand what configuration is configuring which addon).
/retest |
I think I missed the versioned v1alpha2 API, will update that now. |
And |
This looks really good. We discussed that probably the CSI fields are better in a separate PR, and that we can just leave the warning when running without CSI & without the CCM flag in the code for now but commented out (maybe just the CSI bit commented out?) until the CSI PR lands separately. There won't be much in the codepath then unless the feature-flag is set, so I'm in favor of merging and getting this under testing. Thanks @nckturner for this :-) |
fd25ec3
to
87bcdf9
Compare
Updated the PR per @justinsb's comments. I decided to leave out docs at his suggestion since its early/feature gate protected, we will add them in a follow on PR. We can start with some basic usage docs in the aws-cloud-provider repository. |
/test pull-kops-e2e-cni-weave |
/hold |
87bcdf9
to
56e6b6c
Compare
56e6b6c
to
44e9da3
Compare
/test pull-kops-e2e-cni-flannel |
/retest |
44e9da3
to
d020994
Compare
@justinsb ready for another look |
d020994
to
40da860
Compare
/hold cancel Any chance we can merge this @justinsb? It will make testing the CCM easier.. |
/retest |
40da860
to
847383c
Compare
- Config at aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml.template - AWSCCMTag function for CCM image tag
847383c
to
c9feb36
Compare
Sorry about the delay here, and thanks for doing this @nckturner ! This looks to be entirely additive and feature flagged, and I believe the current target for external cloud-controller-manager is 1.21, so I think it's important that we start to get this under testing (not least because my understanding is that it doesn't yet entirely work!). /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: justinsb, nckturner 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 |
/retest |
upup/models/cloudup/resources/addons/aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml.template
--external-cloud-volume-plugin
flag for KCM