mirror of https://github.com/k3s-io/k3s
Merge pull request #52538 from kad/no-ttl-warning
Automatic merge from submit-queue (batch tested with PRs 52445, 52380, 52516, 52531, 52538). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.. Remove warning about changes in default token TTLs **What this PR does / why we need it**: It was planned for 1.9 cleanup to remove that warning, as change was done few release cycles ago and users should be already aware of it. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes kubernetes/kubeadm#346 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```pull/6/head
commit
e8e617f31d
|
@ -128,12 +128,6 @@ func NewCmdInit(out io.Writer) *cobra.Command {
|
|||
i, err := NewInit(cfgPath, internalcfg, skipPreFlight, skipTokenPrint, dryRun)
|
||||
kubeadmutil.CheckErr(err)
|
||||
kubeadmutil.CheckErr(i.Validate(cmd))
|
||||
|
||||
// TODO: remove this warning in 1.9
|
||||
if !cmd.Flags().Lookup("token-ttl").Changed {
|
||||
fmt.Println("[kubeadm] WARNING: starting in 1.8, tokens expire after 24 hours by default (if you require a non-expiring token use --token-ttl 0)")
|
||||
}
|
||||
|
||||
kubeadmutil.CheckErr(i.Run(out))
|
||||
},
|
||||
}
|
||||
|
|
|
@ -110,12 +110,6 @@ func NewCmdToken(out io.Writer, errW io.Writer) *cobra.Command {
|
|||
client, err := getClientset(kubeConfigFile, dryRun)
|
||||
kubeadmutil.CheckErr(err)
|
||||
|
||||
// TODO: remove this warning in 1.9
|
||||
if !tokenCmd.Flags().Lookup("ttl").Changed {
|
||||
// sending this output to stderr s
|
||||
fmt.Fprintln(errW, "[kubeadm] WARNING: starting in 1.8, tokens expire after 24 hours by default (if you require a non-expiring token use --ttl 0)")
|
||||
}
|
||||
|
||||
err = RunCreateToken(out, client, token, tokenDuration, usages, extraGroups, description)
|
||||
kubeadmutil.CheckErr(err)
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue