From cc819c26fbfc4ab6e22e9e890bbcc4eef9393d4a Mon Sep 17 00:00:00 2001 From: SimonCqk Date: Mon, 12 Oct 2020 14:43:42 +0800 Subject: [PATCH] fix election id and add CI env when run `make test`. --- Makefile | 2 +- main.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 77b99248..75ade1de 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ all: manager # Run tests test: generate fmt vet manifests - go test ./... -coverprofile cover.out + KUBEDL_CI=true go test ./... -coverprofile cover.out # Build manager binary manager: generate fmt vet diff --git a/main.go b/main.go index bb83d4fa..92d1365c 100644 --- a/main.go +++ b/main.go @@ -71,6 +71,7 @@ func main() { Scheme: scheme, MetricsBindAddress: ctrlMetricsAddr, LeaderElection: enableLeaderElection, + LeaderElectionID: "kubedl-election", Port: 9443, }) if err != nil {