-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
kubeadm: add a warning about the default token TTL changing in 1.8 #48838
kubeadm: add a warning about the default token TTL changing in 1.8 #48838
Conversation
Hi @mattmoyer. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. 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. |
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
/ok-to-test |
/test pull-kubernetes-federation-e2e-gce |
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.
Otherwise than the comment, LGTM
cmd/kubeadm/app/cmd/init.go
Outdated
@@ -87,6 +87,12 @@ func NewCmdInit(out io.Writer) *cobra.Command { | |||
i, err := NewInit(cfgPath, internalcfg, skipPreFlight, skipTokenPrint) | |||
kubeadmutil.CheckErr(err) | |||
kubeadmutil.CheckErr(i.Validate(cmd)) | |||
|
|||
// TODO: remove this warning in 1.9 | |||
if !cmd.PersistentFlags().Lookup("token-ttl").Changed { |
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.
Flags or PersistentFlags?
I think Flags aggregate everything, try looking at the source and see if you can come to the same conclusion...
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, I think you're right. The docs agree as well.
This adds a warning to `kubeadm init` and `kubeadm token create` if they are run without the `--token-ttl` / `--ttl` flags. In 1.7 and before, the tokens generated by these commands defaulted to an infinite TTL (no expiration) in 1.8, they will generate a token with a 24 hour TTL. The actual default change is in kubernetes#48783. This change is separate so we can cherry pick the warning into the release-1.7 branch.
88e2a24
to
06bd22e
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: luxas, mattmoyer Associated issue: 343 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 |
Automatic merge from submit-queue (batch tested with PRs 48572, 48838, 48931, 48783, 47090) |
Commit found in the "release-1.7" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
What this PR does / why we need it:
This adds a warning to
kubeadm init
andkubeadm token create
if they are run without the--token-ttl
/--ttl
flags. In 1.7 and before, the tokens generated by these commands defaulted to an infinite TTL (no expiration). In 1.8, they will generate a token with a 24 hour TTL.The actual default change is in #48783. This change is separate so we can cherry pick the warning into the
release-1.7
branch.Which issue this PR fixes: ref kubernetes/kubeadm#343
Special notes for your reviewer:
This change is blocked on kubernetes/kubeadm#343. These warnings should probably be removed in the 1.9 cycle.
Release note:
/assign @luxas