Skip to content

Commit 053fade

Browse files
committed
Keep deployment patches in kustomization
Retain patch modifications in config/manager/kustomization.yaml instead of removing them after bundle generation. This aligns with the pattern used in the openstack-k8s-operators namespace. The Makefile no longer removes the deployment patch, keeping the kustomization file consistent with the generated bundle. Implements request in this comment [1]. [1] #80 (comment)
1 parent 2e170ee commit 053fade

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metada
332332
cd config/manager && $(KUSTOMIZE) edit add patch --kind Deployment --name controller-manager --patch "[{\"op\": \"replace\", \"path\": \"/spec/template/spec/containers/0/env/0/value\", \"value\": \"$(OPENSHIFT_LIGHTSPEED_OPERATOR_VERSION)\"}]"
333333
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
334334
$(OPERATOR_SDK) bundle validate ./bundle
335-
cd config/manager && $(KUSTOMIZE) edit remove patch --kind Deployment --name controller-manager --patch "[{\"op\": \"replace\", \"path\": \"/spec/template/spec/containers/0/env/0/value\", \"value\": \"$(OPENSHIFT_LIGHTSPEED_OPERATOR_VERSION)\"}]"
336335

337336
.PHONY: bundle-build
338337
bundle-build: ## Build the bundle image.

config/manager/kustomization.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ images:
66
- name: controller
77
newName: quay.io/openstack-lightspeed/operator
88
newTag: latest
9+
patches:
10+
- patch: '[{"op": "replace", "path": "/spec/template/spec/containers/0/env/0/value",
11+
"value": "latest"}]'
12+
target:
13+
kind: Deployment
14+
name: controller-manager

0 commit comments

Comments
 (0)