@@ -256,19 +256,21 @@ build-installer: manifests generate kustomize ## Generate a consolidated YAML wi
256256 $(KUSTOMIZE ) build config/crd/overlay > dist/crd.yaml
257257
258258olm : operator-sdk opm yq docs
259+ $(eval DIGEST = $(shell $(CONTAINER_TOOL ) buildx imagetools inspect $(REGISTRY ) /$(ORG ) /$(REPO ) :$(TAG ) -ubi --format "{{print .Manifest.Digest}}") )
259260 rm -rf bundle*
260261 $(OPERATOR_SDK ) generate kustomize manifests -q
261262 cd config/manifests && \
262- $(KUSTOMIZE ) edit set image manager=$(REGISTRY ) /$(ORG ) /$(REPO ) : $( TAG ) -ubi
263+ $(KUSTOMIZE ) edit set image manager=$(REGISTRY ) /$(ORG ) /$(REPO ) @ $( DIGEST )
263264 $(KUSTOMIZE ) build config/manifests | $(OPERATOR_SDK ) generate bundle \
264265 -q --overwrite --version $(VERSION ) \
265266 --channels=beta --default-channel=beta --output-dir=bundle/$(VERSION )
266267 $(OPERATOR_SDK ) bundle validate ./bundle/$(VERSION )
267- cp config/manifests/ci.yaml bundle/
268268 cp config/manifests/release-config.yaml bundle/$(VERSION ) /
269- $(YQ ) -i ' .metadata.annotations.containerImage = "$(REGISTRY)/$(ORG)/$(REPO):$(TAG )"' \
269+ $(YQ ) -i ' .metadata.annotations.containerImage = "$(REGISTRY)/$(ORG)/$(REPO)@$(DIGEST )"' \
270270 bundle/$(VERSION ) /manifests/victoriametrics-operator.clusterserviceversion.yaml
271- $(YQ ) -i ' .annotations."com.redhat.openshift.versions" = "v4.12-v4.19"' \
271+ $(YQ ) -i ' .relatedImages = [{"name": "victoriametrics-operator", "image": "$(REGISTRY)/$(ORG)/$(REPO)@$(DIGEST)"}]' \
272+ bundle/$(VERSION ) /manifests/victoriametrics-operator.clusterserviceversion.yaml
273+ $(YQ ) -i ' .annotations."com.redhat.openshift.versions" = "v4.12-v4.20"' \
272274 bundle/$(VERSION ) /metadata/annotations.yaml
273275 $(if $(findstring localhost,$(REGISTRY ) ) , \
274276 $(CONTAINER_TOOL ) build -f bundle.Dockerfile -t $(REGISTRY ) /$(ORG ) /$(REPO ) -bundle:$(TAG ) . ; \
0 commit comments