mirror of
https://github.com/rancher/rke.git
synced 2025-09-01 15:06:23 +00:00
Write kubeconfig/state with stricter permission
This commit is contained in:
@@ -188,7 +188,7 @@ func DeployAdminConfig(ctx context.Context, kubeConfig, localConfigPath string)
|
||||
}
|
||||
logrus.Debugf("Deploying admin Kubeconfig locally at [%s]", localConfigPath)
|
||||
logrus.Tracef("Deploying admin Kubeconfig locally: %s", kubeConfig)
|
||||
err := ioutil.WriteFile(localConfigPath, []byte(kubeConfig), 0640)
|
||||
err := ioutil.WriteFile(localConfigPath, []byte(kubeConfig), 0600)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to create local admin kubeconfig file: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user