From 4fb2b051e87b2d8b81b7dd41fc768e2bc02ff12e Mon Sep 17 00:00:00 2001 From: Shreyas Rao <42259948+shreyas-s-rao@users.noreply.github.com> Date: Tue, 10 Sep 2024 09:08:09 +0530 Subject: [PATCH] Fix `make deploy-debug` (#876) --- Makefile | 2 +- skaffold.yaml | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7ae1286e3..2e4c2090b 100644 --- a/Makefile +++ b/Makefile @@ -194,7 +194,7 @@ deploy-dev: $(SKAFFOLD) $(HELM) .PHONY: deploy-debug deploy-debug: $(SKAFFOLD) $(HELM) - @VERSION=$(VERSION) GIT_SHA=$(GIT_SHA) $(SKAFFOLD) debug --cleanup=false -m etcd-druid + @VERSION=$(VERSION) GIT_SHA=$(GIT_SHA) $(SKAFFOLD) debug --cleanup=false -m etcd-druid -p debug .PHONY: undeploy undeploy: $(SKAFFOLD) $(HELM) diff --git a/skaffold.yaml b/skaffold.yaml index e35ee1c32..c834d1879 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -18,7 +18,6 @@ build: flags: - -v ldflags: - - -w - -X github.com/gardener/etcd-druid/internal/version.Version={{.VERSION}} - -X github.com/gardener/etcd-druid/internal/version.GitSHA={{.GIT_SHA}} deploy: @@ -31,6 +30,17 @@ deploy: setValues: # empty `setValues` value is not allowed foo: bar profiles: + # Profile to disable druid leader election, to allow debugging without abrupt exits due to failure to renew leader election lease within time. + - name: debug + patches: + - op: add + path: /deploy/helm/releases/0/setValues/replicas + value: 1 + - op: add + path: /deploy/helm/releases/0/setValues/controllerManager + value: + leaderElection: + enabled: false - name: e2e-test activation: - env: "DRUID_E2E_TEST=true"