You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PULL_POLICY does not set the controller or webhook imagePullPolicy #1750
CONTRIBUTING.md and make help describe PULL_POLICY as "Image pull policy for controller". In practice the variable only sets the workspace imagePullPolicy in deploy/default-config.yaml. The operator's own Deployments ignore it:
deploy/templates/base/manager_image_patch.yaml hardcodes imagePullPolicy: Always for the controller.
pkg/webhook/deployment.go hardcodes corev1.PullAlways for the webhook server.
Because the controller updates the webhook Deployment on every startup (CreateWebhookServerDeployment), a manual patch to the webhook's pull policy is reverted when the controller restarts.
Impact
PULL_POLICY=Never make install (or IfNotPresent) has no effect on the operator pods. Running a locally built image that exists only on the node (minikube, kind, CRC) needs the Deployments patched after install, and the webhook patch doesn't survive a controller restart.
This came up in #1742, where the CI loads the pull request image into minikube.
Proposed fix
Use ${PULL_POLICY} in manager_image_patch.yaml.
Pass the same policy to the controller as an env var and use it for the webhook Deployment, defaulting to Always.
The default stays Always, so existing installs don't change.
Alternatively, if the current behaviour is intended, correct the description of PULL_POLICY in CONTRIBUTING.md and the Makefile help text.
Activity