From a133c2b04a0ed533d3d09e63fc336629acac3569 Mon Sep 17 00:00:00 2001 From: Jim Fitzpatrick Date: Fri, 22 Sep 2023 10:01:01 +0100 Subject: [PATCH] Support local cert manager Add the installation of the cert manager for the tools used during dev work. --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ef77709..cd4969a 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,9 @@ CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false" # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. ENVTEST_K8S_VERSION = 1.21 +# Cert manager is required for the webhooks. +CERT_MANAGER_VERSION ?= 1.12.1 + # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) GOBIN=$(shell go env GOPATH)/bin @@ -197,9 +200,13 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/default | kubectl delete -f - -install-authorino: ## install RBAC and CRD for authorino +install-authorino: install-cert-manager ## install RBAC and CRD for authorino $(KUSTOMIZE) build config/authorino | kubectl apply -f - +install-cert-manager: ## install the cert manager need for the web hooks + kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v${CERT_MANAGER_VERSION}/cert-manager.yaml + kubectl -n cert-manager wait --timeout=300s --for=condition=Available deployments --all + # go-get-tool will 'go install' any package $2 and install it to $1. PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) define go-get-tool