Skip to content

Commit

Permalink
Additional config fix
Browse files Browse the repository at this point in the history
  • Loading branch information
catttam committed Aug 1, 2024
1 parent 827182c commit 1dd425a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/backends/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,11 @@ func checkAdditionalConfig(configName string, configNamespace string, service ty

if len(additionalConfig.Images.AllowedPrefixes) > 0 {
for _, prefix := range additionalConfig.Images.AllowedPrefixes {
if !strings.Contains(service.Image, prefix) {
return fmt.Errorf("image %s is not allowed for pull on the cluster. Check the additional configuration file on '%s'", service.Image, cfg.AdditionalConfigPath)
if strings.Contains(service.Image, prefix) {
return nil
}
}
return fmt.Errorf("image %s is not allowed for pull on the cluster. Check the additional configuration file on '%s'", service.Image, cfg.AdditionalConfigPath)
}

return nil
Expand Down

0 comments on commit 1dd425a

Please sign in to comment.