(artPath string, mode int32, recurse bool)
| 1216 | } |
| 1217 | |
| 1218 | func chmod(artPath string, mode int32, recurse bool) error { |
| 1219 | err := os.Chmod(artPath, os.FileMode(mode)) |
| 1220 | if err != nil { |
| 1221 | return argoerrs.InternalWrapError(err) |
| 1222 | } |
| 1223 | |
| 1224 | if recurse { |
| 1225 | err = filepath.Walk(artPath, func(path string, f os.FileInfo, err error) error { |
| 1226 | return os.Chmod(path, os.FileMode(mode)) |
| 1227 | }) |
| 1228 | if err != nil { |
| 1229 | return argoerrs.InternalWrapError(err) |
| 1230 | } |
| 1231 | } |
| 1232 | |
| 1233 | return nil |
| 1234 | } |
| 1235 | |
| 1236 | // Wait is the sidecar container logic which waits for the main container to complete. |
| 1237 | // Also monitors for updates in the pod annotations which may change (e.g. terminate) |
no outgoing calls