You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 30, 2021. It is now read-only.
Change bootkube recover flag to --recovery-dir. (#589)
Field ops reports that people find the --asset-dir flag confusing; they
think that means you need to pass in the same --asset-dir that was used
to create the cluster.
For a complete recovery example please see the [hack/multi-node/bootkube-test-recovery](hack/multi-node/bootkube-test-recovery) and the [hack/multi-node/bootkube-test-recovery-self-hosted-etcd](hack/multi-node/bootkube-test-recovery-self-hosted-etcd) scripts.
Copy file name to clipboardExpand all lines: cmd/bootkube/recover.go
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -23,14 +23,14 @@ var (
23
23
cmdRecover=&cobra.Command{
24
24
Use: "recover",
25
25
Short: "Recover a self-hosted control plane",
26
-
Long: "This command reads control plane manifests from a running apiserver or etcd and writes them to asset-dir. Users can then use `bootkube start` pointed at this asset-dir to re-the a self-hosted cluster. Please see the project README for more details and examples.",
26
+
Long: "This command reads control plane manifests from a running apiserver or etcd and writes them to recovery-dir. Users can then use `bootkube start` pointed at this recovery-dir to re-the a self-hosted cluster. Please see the project README for more details and examples.",
27
27
PreRunE: validateRecoverOpts,
28
28
RunE: runCmdRecover,
29
29
SilenceUsage: true,
30
30
}
31
31
32
32
recoverOptsstruct {
33
-
assetDirstring
33
+
recoveryDirstring
34
34
etcdCAPathstring
35
35
etcdCertificatePathstring
36
36
etcdPrivateKeyPathstring
@@ -44,7 +44,7 @@ var (
44
44
45
45
funcinit() {
46
46
cmdRoot.AddCommand(cmdRecover)
47
-
cmdRecover.Flags().StringVar(&recoverOpts.assetDir, "asset-dir", "", "Output path for writing recovered cluster assets.")
47
+
cmdRecover.Flags().StringVar(&recoverOpts.recoveryDir, "recovery-dir", "", "Output path for writing recovered cluster assets.")
48
48
cmdRecover.Flags().StringVar(&recoverOpts.etcdCAPath, "etcd-ca-path", "", "Path to an existing PEM encoded CA that will be used for TLS-enabled communication between the apiserver and etcd. Must be used in conjunction with --etcd-certificate-path and --etcd-private-key-path, and must have etcd configured to use TLS with matching secrets.")
49
49
cmdRecover.Flags().StringVar(&recoverOpts.etcdCertificatePath, "etcd-certificate-path", "", "Path to an existing certificate that will be used for TLS-enabled communication between the apiserver and etcd. Must be used in conjunction with --etcd-ca-path and --etcd-private-key-path, and must have etcd configured to use TLS with matching secrets.")
50
50
cmdRecover.Flags().StringVar(&recoverOpts.etcdPrivateKeyPath, "etcd-private-key-path", "", "Path to an existing private key that will be used for TLS-enabled communication between the apiserver and etcd. Must be used in conjunction with --etcd-ca-path and --etcd-certificate-path, and must have etcd configured to use TLS with matching secrets.")
if (recoverOpts.etcdCAPath!=""||recoverOpts.etcdCertificatePath!=""||recoverOpts.etcdPrivateKeyPath!="") && (recoverOpts.etcdCAPath==""||recoverOpts.etcdCertificatePath==""||recoverOpts.etcdPrivateKeyPath=="") {
122
122
returnerrors.New("you must specify either all or none of --etcd-ca-path, --etcd-certificate-path, and --etcd-private-key-path")
0 commit comments