1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 23:16:22 +00:00

add the support for PodSecurity on cluster at least v1.23

This commit is contained in:
Jiaqi Luo
2022-11-01 22:05:35 -07:00
parent f5e18110b6
commit 5fcf75db40
11 changed files with 290 additions and 88 deletions

View File

@@ -210,7 +210,7 @@ func (s *FullState) WriteStateFile(ctx context.Context, statePath string) error
return fmt.Errorf("Failed to Marshal state object: %v", err)
}
logrus.Tracef("Writing state file: %s", stateFile)
if err := ioutil.WriteFile(statePath, stateFile, 0600); err != nil {
if err := os.WriteFile(statePath, stateFile, 0600); err != nil {
return fmt.Errorf("Failed to write state file: %v", err)
}
log.Infof(ctx, "Successfully Deployed state file at [%s]", statePath)