Add ImagePullPolicy to the AutoscalingListener, configurable through Manager env (#2477)

This commit is contained in:
Nikola Jokic
2023-04-04 19:07:20 +02:00
committed by GitHub
parent 5dea6db412
commit a804bf8b00
8 changed files with 64 additions and 19 deletions

View File

@@ -170,6 +170,13 @@ func main() {
}
}
listenerPullPolicy := os.Getenv("CONTROLLER_MANAGER_LISTENER_IMAGE_PULL_POLICY")
if ok := actionsgithubcom.SetListenerImagePullPolicy(listenerPullPolicy); ok {
log.Info("AutoscalingListener image pull policy changed", "ImagePullPolicy", listenerPullPolicy)
} else {
log.Info("Using default AutoscalingListener image pull policy", "ImagePullPolicy", actionsgithubcom.DefaultScaleSetListenerImagePullPolicy)
}
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
NewCache: newCache,