Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
48d52a30
Commit
48d52a30
authored
Sep 19, 2018
by
Lubomir I. Ivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kubeadm: include the 'certs renew' sub-command in the CLI
The command seems to be missing in the CLI. Add it as sub-command under 'kubeadm alpha phase certs'.
parent
4924bd53
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
80 additions
and
3 deletions
+80
-3
BUILD
cmd/kubeadm/app/cmd/phases/BUILD
+1
-0
certs.go
cmd/kubeadm/app/cmd/phases/certs.go
+5
-1
renew.go
cmd/kubeadm/app/cmd/phases/certs/renew.go
+2
-2
.generated_docs
docs/.generated_docs
+18
-0
kubeadm_alpha_phase_certs_renew.md
docs/admin/kubeadm_alpha_phase_certs_renew.md
+3
-0
kubeadm_alpha_phase_certs_renew_all.md
docs/admin/kubeadm_alpha_phase_certs_renew_all.md
+3
-0
kubeadm_alpha_phase_certs_renew_apiserver-etcd-client.md
.../kubeadm_alpha_phase_certs_renew_apiserver-etcd-client.md
+3
-0
kubeadm_alpha_phase_certs_renew_apiserver-kubelet-client.md
...beadm_alpha_phase_certs_renew_apiserver-kubelet-client.md
+3
-0
kubeadm_alpha_phase_certs_renew_apiserver.md
docs/admin/kubeadm_alpha_phase_certs_renew_apiserver.md
+3
-0
kubeadm_alpha_phase_certs_renew_etcd-healthcheck-client.md
...ubeadm_alpha_phase_certs_renew_etcd-healthcheck-client.md
+3
-0
kubeadm_alpha_phase_certs_renew_etcd-peer.md
docs/admin/kubeadm_alpha_phase_certs_renew_etcd-peer.md
+3
-0
kubeadm_alpha_phase_certs_renew_etcd-server.md
docs/admin/kubeadm_alpha_phase_certs_renew_etcd-server.md
+3
-0
kubeadm_alpha_phase_certs_renew_front-proxy-client.md
...min/kubeadm_alpha_phase_certs_renew_front-proxy-client.md
+3
-0
kubeadm-alpha-phase-certs-renew-all.1
docs/man/man1/kubeadm-alpha-phase-certs-renew-all.1
+3
-0
kubeadm-alpha-phase-certs-renew-apiserver-etcd-client.1
...1/kubeadm-alpha-phase-certs-renew-apiserver-etcd-client.1
+3
-0
kubeadm-alpha-phase-certs-renew-apiserver-kubelet-client.1
...ubeadm-alpha-phase-certs-renew-apiserver-kubelet-client.1
+3
-0
kubeadm-alpha-phase-certs-renew-apiserver.1
docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver.1
+3
-0
kubeadm-alpha-phase-certs-renew-etcd-healthcheck-client.1
...kubeadm-alpha-phase-certs-renew-etcd-healthcheck-client.1
+3
-0
kubeadm-alpha-phase-certs-renew-etcd-peer.1
docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-peer.1
+3
-0
kubeadm-alpha-phase-certs-renew-etcd-server.1
docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-server.1
+3
-0
kubeadm-alpha-phase-certs-renew-front-proxy-client.1
...man1/kubeadm-alpha-phase-certs-renew-front-proxy-client.1
+3
-0
kubeadm-alpha-phase-certs-renew.1
docs/man/man1/kubeadm-alpha-phase-certs-renew.1
+3
-0
No files found.
cmd/kubeadm/app/cmd/phases/BUILD
View file @
48d52a30
...
@@ -25,6 +25,7 @@ go_library(
...
@@ -25,6 +25,7 @@ go_library(
"//cmd/kubeadm/app/apis/kubeadm/v1alpha3:go_default_library",
"//cmd/kubeadm/app/apis/kubeadm/v1alpha3:go_default_library",
"//cmd/kubeadm/app/apis/kubeadm/validation:go_default_library",
"//cmd/kubeadm/app/apis/kubeadm/validation:go_default_library",
"//cmd/kubeadm/app/cmd/options:go_default_library",
"//cmd/kubeadm/app/cmd/options:go_default_library",
"//cmd/kubeadm/app/cmd/phases/certs:go_default_library",
"//cmd/kubeadm/app/cmd/util:go_default_library",
"//cmd/kubeadm/app/cmd/util:go_default_library",
"//cmd/kubeadm/app/constants:go_default_library",
"//cmd/kubeadm/app/constants:go_default_library",
"//cmd/kubeadm/app/features:go_default_library",
"//cmd/kubeadm/app/features:go_default_library",
...
...
cmd/kubeadm/app/cmd/phases/certs.go
View file @
48d52a30
...
@@ -26,6 +26,7 @@ import (
...
@@ -26,6 +26,7 @@ import (
kubeadmscheme
"k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/scheme"
kubeadmscheme
"k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/scheme"
kubeadmapiv1alpha3
"k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha3"
kubeadmapiv1alpha3
"k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha3"
"k8s.io/kubernetes/cmd/kubeadm/app/cmd/options"
"k8s.io/kubernetes/cmd/kubeadm/app/cmd/options"
certscmdphase
"k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/certs"
cmdutil
"k8s.io/kubernetes/cmd/kubeadm/app/cmd/util"
cmdutil
"k8s.io/kubernetes/cmd/kubeadm/app/cmd/util"
kubeadmconstants
"k8s.io/kubernetes/cmd/kubeadm/app/constants"
kubeadmconstants
"k8s.io/kubernetes/cmd/kubeadm/app/constants"
certsphase
"k8s.io/kubernetes/cmd/kubeadm/app/phases/certs"
certsphase
"k8s.io/kubernetes/cmd/kubeadm/app/phases/certs"
...
@@ -120,7 +121,10 @@ func getCertsSubCommands(defaultKubernetesVersion string) []*cobra.Command {
...
@@ -120,7 +121,10 @@ func getCertsSubCommands(defaultKubernetesVersion string) []*cobra.Command {
}
}
addFlags
(
saCmd
,
&
cfgPath
,
cfg
,
false
)
addFlags
(
saCmd
,
&
cfgPath
,
cfg
,
false
)
subCmds
:=
[]
*
cobra
.
Command
{
allCmd
,
saCmd
}
// "renew" command
renewCmd
:=
certscmdphase
.
NewCmdCertsRenewal
()
subCmds
:=
[]
*
cobra
.
Command
{
allCmd
,
saCmd
,
renewCmd
}
certTree
,
err
:=
certsphase
.
GetDefaultCertList
()
.
AsMap
()
.
CertTree
()
certTree
,
err
:=
certsphase
.
GetDefaultCertList
()
.
AsMap
()
.
CertTree
()
kubeadmutil
.
CheckErr
(
err
)
kubeadmutil
.
CheckErr
(
err
)
...
...
cmd/kubeadm/app/cmd/phases/certs/renew.go
View file @
48d52a30
...
@@ -50,7 +50,7 @@ var (
...
@@ -50,7 +50,7 @@ var (
func
NewCmdCertsRenewal
()
*
cobra
.
Command
{
func
NewCmdCertsRenewal
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"renew"
,
Use
:
"renew"
,
Short
:
"Renews certificates for a
k
ubernetes cluster"
,
Short
:
"Renews certificates for a
K
ubernetes cluster"
,
Long
:
cmdutil
.
MacroCommandLongDescription
,
Long
:
cmdutil
.
MacroCommandLongDescription
,
RunE
:
cmdutil
.
SubCmdRunE
(
"renew"
),
RunE
:
cmdutil
.
SubCmdRunE
(
"renew"
),
}
}
...
@@ -110,7 +110,7 @@ func addFlags(cmd *cobra.Command, cfg *renewConfig) {
...
@@ -110,7 +110,7 @@ func addFlags(cmd *cobra.Command, cfg *renewConfig) {
options
.
AddConfigFlag
(
cmd
.
Flags
(),
&
cfg
.
cfgPath
)
options
.
AddConfigFlag
(
cmd
.
Flags
(),
&
cfg
.
cfgPath
)
options
.
AddCertificateDirFlag
(
cmd
.
Flags
(),
&
cfg
.
cfg
.
CertificatesDir
)
options
.
AddCertificateDirFlag
(
cmd
.
Flags
(),
&
cfg
.
cfg
.
CertificatesDir
)
options
.
AddKubeConfigFlag
(
cmd
.
Flags
(),
&
cfg
.
kubeconfigPath
)
options
.
AddKubeConfigFlag
(
cmd
.
Flags
(),
&
cfg
.
kubeconfigPath
)
cmd
.
Flags
()
.
BoolVar
(
&
cfg
.
useAPI
,
"use-api"
,
cfg
.
useAPI
,
"Use the
k
ubernetes certificate API to renew certificates"
)
cmd
.
Flags
()
.
BoolVar
(
&
cfg
.
useAPI
,
"use-api"
,
cfg
.
useAPI
,
"Use the
K
ubernetes certificate API to renew certificates"
)
}
}
// generateCertCommand takes mostly strings instead of structs to avoid using structs in a for loop
// generateCertCommand takes mostly strings instead of structs to avoid using structs in a for loop
...
...
docs/.generated_docs
View file @
48d52a30
...
@@ -30,6 +30,15 @@ docs/admin/kubeadm_alpha_phase_certs_etcd-peer.md
...
@@ -30,6 +30,15 @@ docs/admin/kubeadm_alpha_phase_certs_etcd-peer.md
docs/admin/kubeadm_alpha_phase_certs_etcd-server.md
docs/admin/kubeadm_alpha_phase_certs_etcd-server.md
docs/admin/kubeadm_alpha_phase_certs_front-proxy-ca.md
docs/admin/kubeadm_alpha_phase_certs_front-proxy-ca.md
docs/admin/kubeadm_alpha_phase_certs_front-proxy-client.md
docs/admin/kubeadm_alpha_phase_certs_front-proxy-client.md
docs/admin/kubeadm_alpha_phase_certs_renew.md
docs/admin/kubeadm_alpha_phase_certs_renew_all.md
docs/admin/kubeadm_alpha_phase_certs_renew_apiserver-etcd-client.md
docs/admin/kubeadm_alpha_phase_certs_renew_apiserver-kubelet-client.md
docs/admin/kubeadm_alpha_phase_certs_renew_apiserver.md
docs/admin/kubeadm_alpha_phase_certs_renew_etcd-healthcheck-client.md
docs/admin/kubeadm_alpha_phase_certs_renew_etcd-peer.md
docs/admin/kubeadm_alpha_phase_certs_renew_etcd-server.md
docs/admin/kubeadm_alpha_phase_certs_renew_front-proxy-client.md
docs/admin/kubeadm_alpha_phase_certs_sa.md
docs/admin/kubeadm_alpha_phase_certs_sa.md
docs/admin/kubeadm_alpha_phase_controlplane.md
docs/admin/kubeadm_alpha_phase_controlplane.md
docs/admin/kubeadm_alpha_phase_controlplane_all.md
docs/admin/kubeadm_alpha_phase_controlplane_all.md
...
@@ -115,6 +124,15 @@ docs/man/man1/kubeadm-alpha-phase-certs-etcd-peer.1
...
@@ -115,6 +124,15 @@ docs/man/man1/kubeadm-alpha-phase-certs-etcd-peer.1
docs/man/man1/kubeadm-alpha-phase-certs-etcd-server.1
docs/man/man1/kubeadm-alpha-phase-certs-etcd-server.1
docs/man/man1/kubeadm-alpha-phase-certs-front-proxy-ca.1
docs/man/man1/kubeadm-alpha-phase-certs-front-proxy-ca.1
docs/man/man1/kubeadm-alpha-phase-certs-front-proxy-client.1
docs/man/man1/kubeadm-alpha-phase-certs-front-proxy-client.1
docs/man/man1/kubeadm-alpha-phase-certs-renew-all.1
docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver-etcd-client.1
docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver-kubelet-client.1
docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver.1
docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-healthcheck-client.1
docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-peer.1
docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-server.1
docs/man/man1/kubeadm-alpha-phase-certs-renew-front-proxy-client.1
docs/man/man1/kubeadm-alpha-phase-certs-renew.1
docs/man/man1/kubeadm-alpha-phase-certs-sa.1
docs/man/man1/kubeadm-alpha-phase-certs-sa.1
docs/man/man1/kubeadm-alpha-phase-certs.1
docs/man/man1/kubeadm-alpha-phase-certs.1
docs/man/man1/kubeadm-alpha-phase-controlplane-all.1
docs/man/man1/kubeadm-alpha-phase-controlplane-all.1
...
...
docs/admin/kubeadm_alpha_phase_certs_renew.md
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/admin/kubeadm_alpha_phase_certs_renew_all.md
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/admin/kubeadm_alpha_phase_certs_renew_apiserver-etcd-client.md
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/admin/kubeadm_alpha_phase_certs_renew_apiserver-kubelet-client.md
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/admin/kubeadm_alpha_phase_certs_renew_apiserver.md
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/admin/kubeadm_alpha_phase_certs_renew_etcd-healthcheck-client.md
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/admin/kubeadm_alpha_phase_certs_renew_etcd-peer.md
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/admin/kubeadm_alpha_phase_certs_renew_etcd-server.md
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/admin/kubeadm_alpha_phase_certs_renew_front-proxy-client.md
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/man/man1/kubeadm-alpha-phase-certs-renew-all.1
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver-etcd-client.1
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver-kubelet-client.1
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/man/man1/kubeadm-alpha-phase-certs-renew-apiserver.1
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-healthcheck-client.1
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-peer.1
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/man/man1/kubeadm-alpha-phase-certs-renew-etcd-server.1
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/man/man1/kubeadm-alpha-phase-certs-renew-front-proxy-client.1
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
docs/man/man1/kubeadm-alpha-phase-certs-renew.1
0 → 100644
View file @
48d52a30
This file is autogenerated, but we've stopped checking such files into the
repository to reduce the need for rebases. Please run hack/generate-docs.sh to
populate this file.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment