@@ -48,6 +48,12 @@ GINKGO := $(TOOL_EXEC) github.com/onsi/ginkgo/v2/ginkgo
48
48
49
49
# Target environment and Dependencies #
50
50
51
+ # Cert-manager version - update this for new releases
52
+ CERT_MANAGER_VERSION ?= v1.18.2
53
+
54
+ # Cert-manager deployment timeout
55
+ CERT_MANAGER_TIMEOUT ?= 120s
56
+
51
57
# Minor Kubernetes version to build against derived from the client-go dependency version
52
58
KUBE_MINOR ?= $(shell go list -m k8s.io/client-go | cut -d" " -f2 | sed 's/^v0\.\([[:digit:]]\{1,\}\) \.[[:digit:]]\{1,\}$$/1.\1/')
53
59
@@ -157,7 +163,29 @@ local-build: IMAGE_TAG = local
157
163
local-build : image
158
164
159
165
.PHONY : run-local
160
- run-local : local-build kind-create deploy
166
+ run-local : local-build kind-create cert-manager-install deploy
167
+
168
+ .PHONY : cert-manager-install
169
+ cert-manager-install : # HELP Install cert-manager $(CERT_MANAGER_VERSION)
170
+ @echo " Installing cert-manager $( CERT_MANAGER_VERSION) "
171
+ kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/$(CERT_MANAGER_VERSION ) /cert-manager.yaml
172
+ @echo " Waiting for cert-manager to be ready..."
173
+ kubectl wait --for=condition=Available --namespace=cert-manager deployment/cert-manager --timeout=$(CERT_MANAGER_TIMEOUT )
174
+ kubectl wait --for=condition=Available --namespace=cert-manager deployment/cert-manager-cainjector --timeout=$(CERT_MANAGER_TIMEOUT )
175
+ kubectl wait --for=condition=Available --namespace=cert-manager deployment/cert-manager-webhook --timeout=$(CERT_MANAGER_TIMEOUT )
176
+ @echo " Waiting for cert-manager webhook to be ready..."
177
+ kubectl wait --for=condition=Ready --namespace=cert-manager pod -l app=webhook --timeout=$(CERT_MANAGER_TIMEOUT )
178
+ @echo " Waiting for cert-manager CRDs to be available..."
179
+ kubectl wait --for condition=established --timeout=$(CERT_MANAGER_TIMEOUT ) crd/certificates.cert-manager.io
180
+ kubectl wait --for condition=established --timeout=$(CERT_MANAGER_TIMEOUT ) crd/issuers.cert-manager.io
181
+ @echo " cert-manager $( CERT_MANAGER_VERSION) installed successfully"
182
+
183
+ .PHONY : cert-manager-uninstall
184
+ cert-manager-uninstall : # HELP Uninstall cert-manager
185
+ @echo " Uninstalling cert-manager..."
186
+ kubectl delete -f https://github.com/cert-manager/cert-manager/releases/download/$(CERT_MANAGER_VERSION ) /cert-manager.yaml --ignore-not-found=true
187
+ @echo " cert-manager uninstalled"
188
+
161
189
162
190
.PHONY : clean
163
191
clean : # HELP Clean up build artifacts
@@ -231,6 +259,7 @@ deploy: $(KIND) $(HELM) #HELP Deploy OLM to kind cluster $KIND_CLUSTER_NAME (def
231
259
$(KIND ) load docker-image $(OLM_IMAGE ) --name $(KIND_CLUSTER_NAME ) ; \
232
260
$(HELM ) upgrade --install olm deploy/chart \
233
261
--set debug=true \
262
+ --set certManager.enabled=true \
234
263
--set olm.image.ref=$(OLM_IMAGE ) \
235
264
--set olm.image.pullPolicy=IfNotPresent \
236
265
--set catalog.image.ref=$(OLM_IMAGE ) \
@@ -254,6 +283,9 @@ undeploy: $(KIND) $(HELM) #HELP Uninstall OLM from kind cluster $KIND_CLUSTER_NA
254
283
$(HELM) uninstall olm
255
284
kubectl delete -f deploy/chart/crds
256
285
286
+ # Uninstall cert-manager
287
+ $(MAKE) cert-manager-uninstall
288
+
257
289
# SECTION e2e
258
290
259
291
# E2E test configuration
0 commit comments