diff --git a/Makefile b/Makefile index 0d257360e..30639a576 100755 --- a/Makefile +++ b/Makefile @@ -310,13 +310,16 @@ bundle: manifests operator-sdk kustomize ## Generate bundle manifests and metada $(OPERATOR_SDK) generate kustomize manifests -q cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG) $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS) - $(MAKE) bundle-reset-date - $(OPERATOR_SDK) bundle validate ./bundle + $(MAKE) bundle-reset-date bundle-validate .PHONY: bundle-k8s bundle-k8s: bundle # Generate bundle manifests and metadata for Kubernetes, then validate generated files. $(KUSTOMIZE) build config/manifests-k8s | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS) - $(OPERATOR_SDK) bundle validate ./bundle + $(MAKE) bundle-validate + +.PHONY: bundle-validate +bundle-validate: operator-sdk ## Validate the bundle directory with additional validators (suite=operatorframework), such as Kubernetes deprecated APIs (https://kubernetes.io/docs/reference/using-api/deprecation-guide/) based on bundle.CSV.Spec.MinKubeVersion + $(OPERATOR_SDK) bundle validate ./bundle --select-optional suite=operatorframework .PHONY: bundle-build bundle-build: bundle-update ## Build the bundle image.