Skip to content

Commit 545fc41

Browse files
use image digest instead of tag, use quay.io instead of dockerhub
1 parent fafb7b2 commit 545fc41

4 files changed

Lines changed: 7 additions & 34 deletions

File tree

.github/workflows/operatorhub.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,10 @@ jobs:
8383
8484
mv bundle/* ${OPERATOR_DIR}/
8585
if [ -f ${OPERATOR_DIR}/Makefile ]; then
86-
yq -i 'del(.updateGraph)' ${OPERATOR_DIR}/ci.yaml
8786
if [ ! -z $OLD_VERSION ]; then
8887
yq -i -I2 '.catalog_templates.[].replaces = strenv(OLD_ENTRY)' ${OPERATOR_DIR}/${NEW_VERSION}/release-config.yaml
8988
fi
9089
else
91-
yq -i 'del(.fbc)' ${OPERATOR_DIR}/ci.yaml
9290
rm -f ${OPERATOR_DIR}/${NEW_VERSION}/release-config.yaml
9391
fi
9492
echo "VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
echo ${{secrets.REPO_KEY}} | docker login --username ${{secrets.REPO_USER}} --password-stdin
3636
echo ${{secrets.QUAY_ACCESSKEY}} | docker login quay.io --username '${{secrets.QUAY_USER}}' --password-stdin
3737
make publish
38-
TAG=${TAG} make olm
38+
TAG=${TAG} REGISTRY=quay.io make olm
3939
gh release upload ${{github.event.release.tag_name}} ./dist/install-no-webhook.yaml#install-no-webhook.yaml --clobber || echo "fix me NOT enough security permissions"
4040
gh release upload ${{github.event.release.tag_name}} ./dist/install-with-webhook.yaml#install-with-webhook.yaml --clobber || echo "fix me NOT enough security permissions"
4141
gh release upload ${{github.event.release.tag_name}} ./config/crd/overlay/crd.yaml#crd.yaml --clobber || echo "fix me NOT enough security permissions"

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,19 +256,21 @@ build-installer: manifests generate kustomize ## Generate a consolidated YAML wi
256256
$(KUSTOMIZE) build config/crd/overlay > dist/crd.yaml
257257

258258
olm: 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) .; \

config/manifests/ci.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)