Skip to content

Commit

Permalink
create kubeconfig with restricted rights
Browse files Browse the repository at this point in the history
  • Loading branch information
foosinn committed Oct 26, 2020
1 parent d42c4bc commit f5b3bef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/kube/kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func CreateKubeConfig(options ...Option) error {
return fmt.Errorf("no namespace provided")
}

file, err := os.Create(k.Config)
file, err := os.OpenFile(k.Config, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
if err != nil {
return fmt.Errorf("unable to write kubeconfig: %s", err)
}
Expand Down

0 comments on commit f5b3bef

Please sign in to comment.