@@ -312,7 +312,7 @@ bundle-base: manifests kustomize operator-sdk ## Generate bundle manifests and m
312
312
cd config/manifests/base && $(KUSTOMIZE ) edit set image controller=$(IMG ) && $(KUSTOMIZE ) edit set image kube-rbac-proxy=$(RBAC_PROXY_IMAGE )
313
313
cd config/optional/console-plugin && $(KUSTOMIZE ) edit set image console-plugin=${CONSOLE_PLUGIN_IMAGE}
314
314
$(KUSTOMIZE ) build config/manifests/base | $(OPERATOR_SDK ) generate --verbose bundle -q --overwrite --version $(VERSION ) $(BUNDLE_METADATA_OPTS )
315
- cp config/ metadata/dependencies.yaml bundle/metadata/
315
+ $( MAKE ) add- metadata-dependency
316
316
$(MAKE ) bundle-validate
317
317
318
318
export CSV ="./bundle/manifests/$(OPERATOR_NAME ) .clusterserviceversion.yaml"
@@ -345,6 +345,10 @@ add-replaces-field: ## Add replaces field to the CSV
345
345
add-community-edition-to-display-name : # # Add the "Community Edition" suffix to the display name
346
346
sed -r -i " s|displayName: Node Health Check Operator|displayName: Node Health Check Operator - Community Edition|;" ${CSV}
347
347
348
+ .PHONY : add-metadata-dependency
349
+ add-metadata-dependency : # # Add metadata/dependency.yaml to the bundle
350
+ cp config/metadata/dependencies.yaml bundle/metadata/
351
+
348
352
.PHONY : bundle-okd
349
353
bundle-okd : ocp-version-check yq bundle-base # # Generate bundle manifests and metadata for OKD, then validate generated files.
350
354
$(KUSTOMIZE ) build config/manifests/okd | $(OPERATOR_SDK ) generate --verbose bundle -q --overwrite --version $(VERSION ) $(BUNDLE_METADATA_OPTS )
@@ -364,6 +368,7 @@ bundle-ocp: yq bundle-base ## Generate bundle manifests and metadata for OCP, th
364
368
# https://osbs.readthedocs.io/en/osbs_ocp3/users.html?#pinning-pullspecs-for-related-images
365
369
$(YQ ) -i ' ( .spec.install.spec.deployments[0].spec.template.spec.containers[] | select(.name == "manager") | .env) += [{"name": "RELATED_IMAGE_MUST_GATHER", "value": "${MUST_GATHER_IMAGE}"}]' ${CSV}
366
370
$(MAKE ) add-console-plugin-annotation
371
+ $(MAKE ) add-metadata-dependency
367
372
# add OCP annotations
368
373
$(YQ ) -i ' .metadata.annotations."operators.openshift.io/valid-subscription" = "[\"OpenShift Kubernetes Engine\", \"OpenShift Container Platform\", \"OpenShift Platform Plus\"]"' ${CSV}
369
374
# new infrastructure annotations see https://docs.engineering.redhat.com/display/CFC/Best_Practices#Best_Practices-(New)RequiredInfrastructureAnnotations
0 commit comments