diff --git a/Makefile b/Makefile index ef777092..e3070e64 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 @@ -182,7 +185,7 @@ docker-push: ## Push docker image with the manager. ##@ Deployment -install: manifests kustomize install-authorino ## Install CRDs into the K8s cluster specified in ~/.kube/config. +install: manifests kustomize install-cert-manager install-authorino ## Install CRDs into the K8s cluster specified in ~/.kube/config. kubectl apply -f $(OPERATOR_MANIFESTS) uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. @@ -200,6 +203,10 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi install-authorino: ## 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