Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
kubeconfig output
Browse files Browse the repository at this point in the history
  • Loading branch information
tedteng committed Jun 28, 2021
1 parent e9aec0e commit 0fac175
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/cmd/target_history.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func NewHistoryCmd(targetWriter TargetWriter) *cobra.Command {
return fmt.Errorf("error write target %s", err)
}

kubeconfigPathOutput(&target)
return nil
},
}
Expand All @@ -109,3 +110,13 @@ func appendTarget(target *Target, targetKind TargetKind, name string) *Target {
target.Target = append(target.Target, TargetMeta{targetKind, name})
return target
}

func kubeconfigPathOutput(target *Target) {
for _, k := range target.Target {
if k.Kind != targetInfoProject && k.Kind != TargetKindNamespace {
fmt.Println(k.Kind + ":")
KUBECONFIG = getKubeConfigOfClusterType(k.Kind)
fmt.Println("KUBECONFIG=" + KUBECONFIG)
}
}
}

0 comments on commit 0fac175

Please sign in to comment.