Skip to content

Commit d1bb074

Browse files
committed
fix(clustertool): ensure kubeconfig is created with force true by default
1 parent 55284f8 commit d1bb074

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

clustertool/cmd/talos_apply.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func RunApply(kubeconfig bool, node string, extraArgs []string) {
109109
gencmd.ExecCmds(taloscmds, true)
110110

111111
if kubeconfig {
112-
kubeconfigcmds := gencmd.GenPlain("kubeconfig", helper.TalEnv["VIP_IP"], extraArgs)
112+
kubeconfigcmds := gencmd.GenPlain("kubeconfig", helper.TalEnv["VIP_IP"], []string{"-f"})
113113
gencmd.ExecCmd(kubeconfigcmds[0])
114114
}
115115

clustertool/cmd/talos_upgrade.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ var upgrade = &cobra.Command{
5555
gencmd.ExecCmd(kubeUpgradeCmd)
5656

5757
log.Info().Msg("(re)Loading KubeConfig)")
58-
kubeconfigcmds := gencmd.GenPlain("health", helper.TalEnv["VIP_IP"], extraArgs)
58+
kubeconfigcmds := gencmd.GenPlain("health", helper.TalEnv["VIP_IP"], []string{"-f"})
5959
gencmd.ExecCmd(kubeconfigcmds[0])
6060

6161
},

clustertool/pkg/gencmd/bootstrap.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ func RunBootstrap(args []string) {
5555

5656
log.Info().Msgf("Bootstrap: Configuring kubeconfig/kubectl for VIP: %v", helper.TalEnv["VIP_IP"])
5757
// Ensure kubeconfig is loaded
58-
kubeconfigcmds := GenPlain("kubeconfig", helper.TalEnv["VIP_IP"], extraArgs)
58+
59+
kubeconfigcmds := GenPlain("kubeconfig", helper.TalEnv["VIP_IP"], []string{"-f"})
5960
ExecCmd(kubeconfigcmds[0])
6061

6162
// Desired pod names

0 commit comments

Comments
 (0)