(config *latest.Config)
| 308 | } |
| 309 | |
| 310 | func validatePullSecrets(config *latest.Config) error { |
| 311 | for _, ps := range config.PullSecrets { |
| 312 | if encoding.IsUnsafeName(ps.Name) { |
| 313 | return fmt.Errorf("pullSecrets.%s has to match the following regex: %v", ps.Name, encoding.UnsafeNameRegEx.String()) |
| 314 | } |
| 315 | if ps.Registry == "" { |
| 316 | return fmt.Errorf("pullSecrets.%s.registry is required", ps.Name) |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | return nil |
| 321 | } |
| 322 | |
| 323 | func validateImages(config *latest.Config) error { |
| 324 | // images lists all the image names in order to check for duplicates |
no test coverage detected