Skip to content

Commit

Permalink
fix(clustertool): ensure kubeconfig is created with force true by def…
Browse files Browse the repository at this point in the history
…ault
  • Loading branch information
PrivatePuffin committed Nov 9, 2024
1 parent 55284f8 commit d1bb074
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clustertool/cmd/talos_apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func RunApply(kubeconfig bool, node string, extraArgs []string) {
gencmd.ExecCmds(taloscmds, true)

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

Expand Down
2 changes: 1 addition & 1 deletion clustertool/cmd/talos_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var upgrade = &cobra.Command{
gencmd.ExecCmd(kubeUpgradeCmd)

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

},
Expand Down
3 changes: 2 additions & 1 deletion clustertool/pkg/gencmd/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ func RunBootstrap(args []string) {

log.Info().Msgf("Bootstrap: Configuring kubeconfig/kubectl for VIP: %v", helper.TalEnv["VIP_IP"])
// Ensure kubeconfig is loaded
kubeconfigcmds := GenPlain("kubeconfig", helper.TalEnv["VIP_IP"], extraArgs)

kubeconfigcmds := GenPlain("kubeconfig", helper.TalEnv["VIP_IP"], []string{"-f"})
ExecCmd(kubeconfigcmds[0])

// Desired pod names
Expand Down

0 comments on commit d1bb074

Please sign in to comment.