@@ -34,7 +34,7 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
34
34
35
35
# Set the Operator SDK version to use.
36
36
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
37
- OPERATOR_SDK_VERSION ?= v1.11 .0
37
+ OPERATOR_SDK_VERSION ?= v1.32 .0
38
38
39
39
40
40
# IMAGE_TAG_BASE defines the docker.io namespace and part of the image name for remote images.
@@ -50,8 +50,6 @@ BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(VERSION)
50
50
51
51
# Image URL to use all building/pushing image targets
52
52
IMG ?= $(IMAGE_TAG_BASE ) :v$(VERSION )
53
- # Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
54
- CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false"
55
53
56
54
LD_FLAGS = "-X github.com/argoproj-labs/argocd-operator/version.Version=$(VERSION ) "
57
55
@@ -89,7 +87,7 @@ help: ## Display this help.
89
87
# #@ Development
90
88
91
89
manifests : controller-gen # # Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
92
- $(CONTROLLER_GEN ) $( CRD_OPTIONS ) rbac:roleName=manager-role webhook paths=" ./..." output:crd:artifacts:config=config/crd/bases
90
+ $(CONTROLLER_GEN ) rbac:roleName=manager-role crd webhook paths=" ./..." output:crd:artifacts:config=config/crd/bases
93
91
94
92
generate : controller-gen # # Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
95
93
$(CONTROLLER_GEN ) object:headerFile=" hack/boilerplate.go.txt" paths=" ./..."
@@ -141,21 +139,25 @@ endif
141
139
142
140
# #@ Deployment
143
141
142
+ ifndef ignore-not-found
143
+ ignore-not-found = false
144
+ endif
145
+
144
146
install : manifests kustomize # # Install CRDs into the K8s cluster specified in ~/.kube/config.
145
147
# # TODO: Remove sed usage after all v1alpha1 references are updated to v1beta1 in codebase.
146
148
# # For local testing, conversion webhook defined in crd makes call to webhook for each v1alpha1 reference
147
149
# # causing failures as we don't set up the webhook for local testing.
148
150
$(KUSTOMIZE ) build config/crd | sed ' /conversion:/,/- v1beta1/d' | kubectl apply --server-side=true -f -
149
151
150
152
uninstall : manifests kustomize # # Uninstall CRDs from the K8s cluster specified in ~/.kube/config.
151
- $(KUSTOMIZE ) build config/crd | kubectl delete -f -
153
+ $(KUSTOMIZE ) build config/crd | kubectl delete --ignore-not-found= $( ignore-not-found ) - f -
152
154
153
155
deploy : manifests kustomize # # Deploy controller to the K8s cluster specified in ~/.kube/config.
154
156
cd config/manager && $(KUSTOMIZE ) edit set image controller=${IMG}
155
157
$(KUSTOMIZE ) build config/default | kubectl apply --server-side=true -f -
156
158
157
159
undeploy : # # Undeploy controller from the K8s cluster specified in ~/.kube/config.
158
- $(KUSTOMIZE ) build config/default | kubectl delete -f -
160
+ $(KUSTOMIZE ) build config/default | kubectl delete --ignore-not-found= $( ignore-not-found ) - f -
159
161
160
162
# #@ E2E
161
163
@@ -166,7 +168,7 @@ all: test install run e2e ## UnitTest, Run the operator locally and execute e2e
166
168
167
169
CONTROLLER_GEN = $(shell pwd) /bin/controller-gen
168
170
controller-gen : # # Download controller-gen locally if necessary.
169
- $(call go-install-tool,$(CONTROLLER_GEN ) ,sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.1 )
171
+ $(call go-install-tool,$(CONTROLLER_GEN ) ,sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 )
170
172
171
173
KUSTOMIZE = $(shell pwd) /bin/kustomize
172
174
kustomize : # # Download kustomize locally if necessary.
@@ -248,7 +250,7 @@ ifeq (,$(shell which opm 2>/dev/null))
248
250
set -e ;\
249
251
mkdir -p $(dir $(OPM)) ;\
250
252
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
251
- curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.20 .0/$${OS}-$${ARCH}-opm ;\
253
+ curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.23 .0/$${OS}-$${ARCH}-opm ;\
252
254
chmod +x $(OPM) ;\
253
255
}
254
256
else
0 commit comments