-
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
Update kubelet to be secureKubelet by default #4307
Update kubelet to be secureKubelet by default #4307
Conversation
pkg/model/components/kubelet.go
Outdated
@@ -60,6 +60,7 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error { | |||
clusterSpec.Kubelet.ClusterDNS = ip.String() | |||
clusterSpec.Kubelet.ClusterDomain = clusterSpec.ClusterDNSDomain | |||
clusterSpec.Kubelet.NonMasqueradeCIDR = clusterSpec.NonMasqueradeCIDR | |||
clusterSpec.Kubelet.anonymousAuth = fi.Bool(false) |
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.
should we check that it is not set first? The user may have set it to true already.
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.
Good catch, adding the logic
/ok-to-test CI unit tests seemed to have failed as well |
/retest |
@chrislovecnm Thanks for re-testing this, the end-to-end test has passed and in the Travis build log:
The |
docs/security.md
Outdated
@@ -48,7 +48,7 @@ By default AnonymousAuth on the kubelet is 'on' and so communication between kub | |||
# In the cluster spec | |||
spec: | |||
kubelet: | |||
anonymousAuth: false | |||
AnonymousAuth: false |
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.
pretty sure this should remain anonymousAuth not AnonymousAuth
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 hadn't looked at componentconfig.go
, will revert this change.
@@ -61,6 +61,11 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error { | |||
clusterSpec.Kubelet.ClusterDomain = clusterSpec.ClusterDNSDomain | |||
clusterSpec.Kubelet.NonMasqueradeCIDR = clusterSpec.NonMasqueradeCIDR | |||
|
|||
// Set secure kubelet on by default when the user has not set this flag | |||
if clusterSpec.Kubelet.AnonymousAuth == nil { | |||
clusterSpec.Kubelet.AnonymousAuth = fi.Bool(false) |
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.
Yes .. but this would force all clusters to suddenly use mutal tls on the kubelet api, so it would need to be highlighted vigorously not to surprise. I know @justinsb did some work on state to detect is new cluster or updating a cluster .. i'm not sure if this information is communicated here though ... @justinsb?
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.
@gambol99 to see if I understand what you are saying, and thanks for the review. We would need to determine how an update would work with this. I think this is an ok change for a new cluster, but with an existing cluster, this would cause downtime. When the masters change to using TLS first during an update, not sure how the nodes would respond. @audip have you tested an upgrade?
@gambol99 we need rolling update e2e 🙊
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 have not tested the upgrade yet.
also the TestMinimalCloudformation needs fixing .. I believe these are the files located in kops/tests/integration/create_cluster/minimal and or kops/tests/integration/update_cluster/minimal |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: audip Assign the PR to them by writing The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@chrislovecnm @justinsb can you point me to where I'm going wrong? I'm stuck on the tests not passing, @gambol99 gave me some direction, but still, the tests are failing. |
/retest Bump |
@audip: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this PR. In response to this:
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. |
Turns on secureKubelet by default based on @gambol99 's work on #3125
Towards an effort to complete issue #3998