summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorJames Munnelly <james@munnelly.eu>2019-04-29 18:47:23 +0100
committerJames Munnelly <james@munnelly.eu>2019-04-29 18:47:23 +0100
commita598b0e12668be45d7346f761b0b00432e40fa11 (patch)
tree8638b1e79253b8fbca0623e4f6586b9e8bff1187 /main.go
parent8d973b09a6238693a1bc1d2e9bba06d52a7d8504 (diff)
downloadcert-manager-webhook-hostinger-a598b0e12668be45d7346f761b0b00432e40fa11.tar.gz
cert-manager-webhook-hostinger-a598b0e12668be45d7346f761b0b00432e40fa11.zip
Add Makefile and make options configurable
Signed-off-by: James Munnelly <james@munnelly.eu>
Diffstat (limited to 'main.go')
-rw-r--r--main.go7
1 files changed, 6 insertions, 1 deletions
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