Commit e8e617f3 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents 7d337707 d5098c16
...@@ -128,12 +128,6 @@ func NewCmdInit(out io.Writer) *cobra.Command { ...@@ -128,12 +128,6 @@ func NewCmdInit(out io.Writer) *cobra.Command {
i, err := NewInit(cfgPath, internalcfg, skipPreFlight, skipTokenPrint, dryRun) i, err := NewInit(cfgPath, internalcfg, skipPreFlight, skipTokenPrint, dryRun)
kubeadmutil.CheckErr(err) kubeadmutil.CheckErr(err)
kubeadmutil.CheckErr(i.Validate(cmd)) 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)) kubeadmutil.CheckErr(i.Run(out))
}, },
} }
......
...@@ -110,12 +110,6 @@ func NewCmdToken(out io.Writer, errW io.Writer) *cobra.Command { ...@@ -110,12 +110,6 @@ func NewCmdToken(out io.Writer, errW io.Writer) *cobra.Command {
client, err := getClientset(kubeConfigFile, dryRun) client, err := getClientset(kubeConfigFile, dryRun)
kubeadmutil.CheckErr(err) 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) err = RunCreateToken(out, client, token, tokenDuration, usages, extraGroups, description)
kubeadmutil.CheckErr(err) kubeadmutil.CheckErr(err)
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment