Skip to content

Commit

Permalink
Support local cert manager
Browse files Browse the repository at this point in the history
Add the installation of the cert manager for the tools used during dev
work.
  • Loading branch information
Boomatang committed Sep 22, 2023
1 parent 261466d commit 61fa39d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 61fa39d

Please sign in to comment.