Skip to content

Commit f8cbf8e

Browse files
dhaiducekopenshift-ci[bot]
authored andcommitted
Patch args when redeploying controller
These are set by the framework, but overwritten when applying the `operator.yaml`. ref: https://issues.redhat.com/browse/ACM-4873 Signed-off-by: Dale Haiducek <[email protected]>
1 parent 268da73 commit f8cbf8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ MANAGED_CLUSTER_NAME ?= managed
4444
HUB_CONFIG ?= $(PWD)/kubeconfig_hub
4545
HUB_CONFIG_INTERNAL ?= $(PWD)/kubeconfig_hub_internal
4646
MANAGED_CONFIG ?= $(PWD)/kubeconfig_managed
47+
deployOnHub ?= false
4748
# Set the Kind version tag
4849
ifeq ($(KIND_VERSION), minimum)
4950
KIND_ARGS = --image kindest/node:v1.19.16
@@ -246,6 +247,7 @@ kind-deploy-controller-dev: kind-deploy-controller
246247
@echo Pushing image to KinD cluster
247248
kind load docker-image $(REGISTRY)/$(IMG):$(TAG) --name $(KIND_NAME)
248249
@echo "Patch deployment image"
250+
kubectl patch deployment $(IMG) -n $(KIND_NAMESPACE) -p "{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"$(IMG)\",\"args\":[\"--hub-cluster-configfile=/var/run/klusterlet/kubeconfig\", \"--cluster-namespace=$(MANAGED_CLUSTER_NAME)\", \"--enable-lease=true\", \"--log-level=2\", \"--disable-spec-sync=$(deployOnHub)\"]}]}}}}" --kubeconfig=$(MANAGED_CONFIG)
249251
kubectl patch deployment $(IMG) -n $(KIND_NAMESPACE) -p "{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"$(IMG)\",\"imagePullPolicy\":\"Never\"}]}}}}" --kubeconfig=$(MANAGED_CONFIG)
250252
kubectl patch deployment $(IMG) -n $(KIND_NAMESPACE) -p "{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"$(IMG)\",\"image\":\"$(REGISTRY)/$(IMG):$(TAG)\"}]}}}}" --kubeconfig=$(MANAGED_CONFIG)
251253
kubectl rollout status -n $(KIND_NAMESPACE) deployment $(IMG) --timeout=180s --kubeconfig=$(MANAGED_CONFIG)

0 commit comments

Comments
 (0)