From 3373a8b88403a19e204fccd6835cc080ea254c16 Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Mon, 21 Sep 2026 12:59:52 +0200 Subject: [PATCH] make: add pull policy and secret to deploy Modify the operator deployment with a pull secret and pull policy. This enables to test the operator in environments that require a pull secret for pulling the image and the pull policy ensures that the deployed operator is always from the latest pushed image. Signed-off-by: Alice Frosi --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 141201ea..cd2e3c8c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ # Image URL to use all building/pushing image targets IMG ?= bootc-operator:dev +IMAGE_PULL_POLICY ?= +IMAGE_PULL_SECRET ?= CONTAINER_TOOL ?= podman # Bink cluster settings. deploy-bink and e2e share the same cluster by default. # To use a separate dev cluster: make deploy-bink BINK_CLUSTER_NAME=dev @@ -158,6 +160,8 @@ deploy: manifests kustomize yq ## Deploy controller to the K8s cluster specified "$(YQ)" '(select(.kind == "Deployment") | .spec.template.spec.containers[] | select(.name == "manager")).image = "$(IMG)"' | \ "$(YQ)" '(select(.kind == "DaemonSet") | .spec.template.spec.containers[] | select(.name == "daemon")).image = "$(IMG)"' | \ $(if $(MANAGER_EXTRA_ARGS),"$(YQ)" '(select(.kind == "Deployment") | .spec.template.spec.containers[] | select(.name == "manager")).args += [$(MANAGER_EXTRA_ARGS)]' |) \ + $(if $(IMAGE_PULL_POLICY),"$(YQ)" '(select(.kind == "Deployment" or .kind == "DaemonSet") | .spec.template.spec.containers[].imagePullPolicy) = "$(IMAGE_PULL_POLICY)"' |) \ + $(if $(IMAGE_PULL_SECRET),"$(YQ)" '(select(.kind == "Deployment" or .kind == "DaemonSet") | .spec.template.spec.imagePullSecrets) = [{"name": "$(IMAGE_PULL_SECRET)"}]' |) \ "$(KUBECTL)" apply --server-side -f - .PHONY: undeploy