From 96468b69ca77c3761dc673775399a8dc0455fa80 Mon Sep 17 00:00:00 2001 From: Elliott Baron Date: Wed, 5 Feb 2025 17:38:13 -0500 Subject: [PATCH] build(insights): add Kustomize patch to adjust pull policy (#1045) --- Makefile | 1 + config/insights/insights_image_pull_patch.yaml | 11 +++++++++++ config/insights/kustomization.yaml | 3 +++ hack/insights_image_pull_patch.yaml.in | 11 +++++++++++ 4 files changed, 26 insertions(+) create mode 100644 config/insights/insights_image_pull_patch.yaml create mode 100644 hack/insights_image_pull_patch.yaml.in diff --git a/Makefile b/Makefile index a6bac7d58..004d45b21 100644 --- a/Makefile +++ b/Makefile @@ -375,6 +375,7 @@ manifests: controller-gen ## Generate manifests e.g. CRD, RBAC, etc. envsubst < hack/image_pull_patch.yaml.in > config/default/image_pull_patch.yaml envsubst < hack/plugin_image_pull_patch.yaml.in > config/openshift/plugin_image_pull_patch.yaml envsubst < hack/insights_patch.yaml.in > config/overlays/insights/insights_patch.yaml + envsubst < hack/insights_image_pull_patch.yaml.in > config/insights/insights_image_pull_patch.yaml .PHONY: fmt fmt: add-license ## Run go fmt against code. diff --git a/config/insights/insights_image_pull_patch.yaml b/config/insights/insights_image_pull_patch.yaml new file mode 100644 index 000000000..8f2a5f634 --- /dev/null +++ b/config/insights/insights_image_pull_patch.yaml @@ -0,0 +1,11 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: insights + namespace: system +spec: + template: + spec: + containers: + - name: insights + imagePullPolicy: "Always" diff --git a/config/insights/kustomization.yaml b/config/insights/kustomization.yaml index 743f82250..9516b3065 100644 --- a/config/insights/kustomization.yaml +++ b/config/insights/kustomization.yaml @@ -23,6 +23,9 @@ resources: - leader_election_role.yaml - leader_election_role_binding.yaml +patchesStrategicMerge: +- insights_image_pull_patch.yaml + replacements: - source: fieldPath: metadata.name diff --git a/hack/insights_image_pull_patch.yaml.in b/hack/insights_image_pull_patch.yaml.in new file mode 100644 index 000000000..5d973a0e8 --- /dev/null +++ b/hack/insights_image_pull_patch.yaml.in @@ -0,0 +1,11 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: insights + namespace: system +spec: + template: + spec: + containers: + - name: insights + imagePullPolicy: "${PULL_POLICY}"