Added support for kube-context flag, to specify kubernetes context (#1595)

This commit is contained in:
Rahul Bhati
2020-05-11 18:54:06 +05:30
committed by GitHub
parent 3e8cbe112f
commit 2d69542265
8 changed files with 26 additions and 20 deletions
+2 -2
View File
@@ -51,7 +51,7 @@ func (opts *DumpSubCommand) do(input cli.Input) error {
nozip := input.Bool(flagkey.SupportNoZip)
outputDir := input.String(flagkey.SupportOutput)
kubeContext := input.String(flagkey.KubeContext)
// check whether the dump directory exists.
_, err := os.Stat(outputDir)
if err != nil && os.IsNotExist(err) {
@@ -68,7 +68,7 @@ func (opts *DumpSubCommand) do(input cli.Input) error {
panic(errors.Wrap(err, "Error creating dump directory for dumping files"))
}
_, k8sClient, err := util.GetKubernetesClient()
_, k8sClient, err := util.GetKubernetesClient(kubeContext)
if err != nil {
return err
}