From a598b0e12668be45d7346f761b0b00432e40fa11 Mon Sep 17 00:00:00 2001 From: James Munnelly Date: Mon, 29 Apr 2019 18:47:23 +0100 Subject: Add Makefile and make options configurable Signed-off-by: James Munnelly --- main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 8a4c78b..85aeac9 100644 --- a/main.go +++ b/main.go @@ -3,6 +3,7 @@ package main import ( "encoding/json" "fmt" + "os" extapi "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" //"k8s.io/client-go/kubernetes" @@ -12,9 +13,13 @@ import ( "github.com/jetstack/cert-manager/pkg/acme/webhook/cmd" ) -const GroupName = "acme.mycompany.com" +var GroupName = os.Getenv("GROUP_NAME") func main() { + if GroupName == "" { + panic("GROUP_NAME must be specified") + } + // This will register our custom DNS provider with the webhook serving // library, making it available as an API under the provided GroupName. // You can register multiple DNS provider implementations with a single -- cgit v1.2.3