Skip to content

Commit

Permalink
build(insights): add Kustomize patch to adjust pull policy (#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebaron authored Feb 5, 2025
1 parent 8fd124b commit 96468b6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
11 changes: 11 additions & 0 deletions config/insights/insights_image_pull_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: insights
namespace: system
spec:
template:
spec:
containers:
- name: insights
imagePullPolicy: "Always"
3 changes: 3 additions & 0 deletions config/insights/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions hack/insights_image_pull_patch.yaml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: insights
namespace: system
spec:
template:
spec:
containers:
- name: insights
imagePullPolicy: "${PULL_POLICY}"

0 comments on commit 96468b6

Please sign in to comment.