MCPcopy Index your code
hub / github.com/devspace-sh/devspace / validatePullSecrets

Function validatePullSecrets

pkg/devspace/config/versions/validate.go:310–321  ·  view source on GitHub ↗
(config *latest.Config)

Source from the content-addressed store, hash-verified

308}
309
310func 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
323func validateImages(config *latest.Config) error {
324 // images lists all the image names in order to check for duplicates

Callers 1

ValidateFunction · 0.85

Calls 3

IsUnsafeNameFunction · 0.92
ErrorfMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected