Skip to content

Commit 59f6fc1

Browse files
committed
Add missing metadata dependency to ocp bundle
Ensure that the OCP bundle, which creates the bundle folder from scratch, contains the metadata/dependency.yaml Signed-off-by: Carlo Lobrano <[email protected]>
1 parent 0c4156b commit 59f6fc1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ bundle-base: manifests kustomize operator-sdk ## Generate bundle manifests and m
312312
cd config/manifests/base && $(KUSTOMIZE) edit set image controller=$(IMG) && $(KUSTOMIZE) edit set image kube-rbac-proxy=$(RBAC_PROXY_IMAGE)
313313
cd config/optional/console-plugin && $(KUSTOMIZE) edit set image console-plugin=${CONSOLE_PLUGIN_IMAGE}
314314
$(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
316316
$(MAKE) bundle-validate
317317

318318
export CSV="./bundle/manifests/$(OPERATOR_NAME).clusterserviceversion.yaml"
@@ -345,6 +345,10 @@ add-replaces-field: ## Add replaces field to the CSV
345345
add-community-edition-to-display-name: ## Add the "Community Edition" suffix to the display name
346346
sed -r -i "s|displayName: Node Health Check Operator|displayName: Node Health Check Operator - Community Edition|;" ${CSV}
347347

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+
348352
.PHONY: bundle-okd
349353
bundle-okd: ocp-version-check yq bundle-base ## Generate bundle manifests and metadata for OKD, then validate generated files.
350354
$(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
364368
# https://osbs.readthedocs.io/en/osbs_ocp3/users.html?#pinning-pullspecs-for-related-images
365369
$(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}
366370
$(MAKE) add-console-plugin-annotation
371+
$(MAKE) add-metadata-dependency
367372
# add OCP annotations
368373
$(YQ) -i '.metadata.annotations."operators.openshift.io/valid-subscription" = "[\"OpenShift Kubernetes Engine\", \"OpenShift Container Platform\", \"OpenShift Platform Plus\"]"' ${CSV}
369374
# new infrastructure annotations see https://docs.engineering.redhat.com/display/CFC/Best_Practices#Best_Practices-(New)RequiredInfrastructureAnnotations

0 commit comments

Comments
 (0)