Skip to content

Commit 1d36b3b

Browse files
authored
Add RH certification required metadata (#1126)
* add RH certification required metadata Signed-off-by: Daniel Fan <[email protected]> * update versioned image address Signed-off-by: Daniel Fan <[email protected]> * general new bundle manifest at end of next-csv.sh Signed-off-by: Daniel Fan <[email protected]> * increase timeout in lint check Signed-off-by: Daniel Fan <[email protected]> * update version in annotation Signed-off-by: Daniel Fan <[email protected]> * use icr registry for release and quay registry for testing Signed-off-by: Daniel Fan <[email protected]> --------- Signed-off-by: Daniel Fan <[email protected]>
1 parent e3f0628 commit 1d36b3b

File tree

11 files changed

+54
-35
lines changed

11 files changed

+54
-35
lines changed

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ FROM docker-na-public.artifactory.swg-devops.com/hyc-cloud-private-edge-docker-l
2525

2626
ARG VCS_REF
2727
ARG VCS_URL
28+
ARG RELEASE_VERSION
2829

2930
LABEL org.label-schema.vendor="IBM" \
3031
org.label-schema.name="odlm" \
@@ -34,7 +35,10 @@ LABEL org.label-schema.vendor="IBM" \
3435
org.label-schema.license="Licensed Materials - Property of IBM" \
3536
org.label-schema.schema-version="1.0" \
3637
name="odlm" \
38+
maintainer="IBM" \
3739
vendor="IBM" \
40+
version=$RELEASE_VERSION \
41+
release=$RELEASE_VERSION \
3842
description="Manager the lifecycle of the operands" \
3943
summary="Manager the lifecycle of the operands"
4044

Makefile

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ OPERATOR_SDK_VERSION=v1.32.0
3838
YQ_VERSION=v4.42.1
3939
DEFAULT_CHANNEL ?= v$(shell cat ./version/version.go | grep "Version =" | awk '{ print $$3}' | tr -d '"' | cut -d '.' -f1,2)
4040
CHANNELS ?= $(DEFAULT_CHANNEL)
41+
OPENSHIFT_VERSIONS ?= v4.12-v4.17
4142

4243
LOCAL_OS := $(shell uname)
4344
ifeq ($(LOCAL_OS),Linux)
@@ -65,7 +66,8 @@ else
6566
endif
6667

6768
# Default image repo
68-
QUAY_REGISTRY ?= quay.io/luzarragaben
69+
QUAY_REGISTRY ?= quay.io/opencloudio
70+
ICR_REIGSTRY ?= icr.io/cpopen
6971

7072
ifeq ($(BUILD_LOCALLY),0)
7173
ARTIFACTORYA_REGISTRY ?= "docker-na-public.artifactory.swg-devops.com/hyc-cloud-private-integration-docker-local/ibmcom"
@@ -89,7 +91,7 @@ OPERATOR_VERSION ?= 4.4.0
8991
# Kind cluster name
9092
KIND_CLUSTER_NAME ?= "odlm"
9193
# Operator image tag for test
92-
OPERATOR_TEST_TAG ?= nolm-controller-cleanup
94+
OPERATOR_TEST_TAG ?= dev-test
9395

9496
# Options for 'bundle-build'
9597
ifneq ($(origin CHANNELS), undefined)
@@ -185,11 +187,11 @@ uninstall: manifests kustomize ## Uninstall CRDs from a cluster
185187
$(KUSTOMIZE) build config/crd | kubectl delete -f -
186188

187189
deploy: manifests kustomize ## Deploy controller in the configured Kubernetes cluster in ~/.kube/config
188-
cd config/manager && $(KUSTOMIZE) edit set image quay.io/opencloudio/odlm=$(QUAY_REGISTRY)/$(OPERATOR_IMAGE_NAME):$(OPERATOR_TEST_TAG)
190+
cd config/manager && $(KUSTOMIZE) edit set image icr.io/cpopen/odlm=$(QUAY_REGISTRY)/$(OPERATOR_IMAGE_NAME):$(OPERATOR_TEST_TAG)
189191
$(KUSTOMIZE) build config/default | kubectl apply -f -
190192

191193
deploy-e2e: kustomize ## Deploy controller in the configured Kubernetes cluster in ~/.kube/config
192-
cd config/e2e/manager && $(KUSTOMIZE) edit set image quay.io/opencloudio/odlm=$(QUAY_REGISTRY)/$(OPERATOR_IMAGE_NAME):$(OPERATOR_TEST_TAG)
194+
cd config/e2e/manager && $(KUSTOMIZE) edit set image icr.io/cpopen/odlm=$(QUAY_REGISTRY)/$(OPERATOR_IMAGE_NAME):$(OPERATOR_TEST_TAG)
193195
$(KUSTOMIZE) build config/e2e | kubectl apply -f -
194196

195197
##@ Generate code and manifests
@@ -201,8 +203,11 @@ generate: controller-gen ## Generate code e.g. API etc.
201203
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
202204

203205
bundle-manifests: yq
206+
cd config/manager && $(KUSTOMIZE) edit set image icr.io/cpopen/odlm=$(ICR_REIGSTRY)/$(OPERATOR_IMAGE_NAME):$(OPERATOR_VERSION)
204207
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle \
205208
-q --overwrite --version $(OPERATOR_VERSION) $(BUNDLE_METADATA_OPTS)
209+
echo "\n # OpenShift annotations." >> bundle/metadata/annotations.yaml ;\
210+
echo " com.redhat.openshift.versions: $(OPENSHIFT_VERSIONS)" >> bundle/metadata/annotations.yaml ;\
206211
$(OPERATOR_SDK) bundle validate ./bundle
207212
$(YQ) eval-all -i '.spec.relatedImages |= load("config/manifests/bases/operand-deployment-lifecycle-manager.clusterserviceversion.yaml").spec.relatedImages' bundle/manifests/operand-deployment-lifecycle-manager.clusterserviceversion.yaml
208213
@# Need to replace fields this way to avoid changing PROJECT name and CSV file name, which may or may not impact CICD automation
@@ -258,19 +263,19 @@ kind-load-img:
258263
build-operator-image: $(CONFIG_DOCKER_TARGET) ## Build the operator image.
259264
@echo "Building the $(OPERATOR_IMAGE_NAME) docker image for $(LOCAL_ARCH)..."
260265
@docker build -t $(OPERATOR_IMAGE_NAME)-$(LOCAL_ARCH):$(VERSION) \
261-
--build-arg VCS_REF=$(VCS_REF) --build-arg VCS_URL=$(VCS_URL) \
266+
--build-arg VCS_REF=$(VCS_REF) --build-arg VCS_URL=$(VCS_URL) --build-arg RELEASE_VERSION=$(RELEASE_VERSION) \
262267
--build-arg GOARCH=$(LOCAL_ARCH) -f Dockerfile .
263268

264269
build-operator-dev-image: ## Build the operator dev image.
265270
@echo "Building the $(DEV_REGISTRY)/$(OPERATOR_IMAGE_NAME) docker image..."
266271
@docker build -t $(DEV_REGISTRY)/$(OPERATOR_IMAGE_NAME):$(VERSION) \
267-
--build-arg VCS_REF=$(VCS_REF) --build-arg VCS_URL=$(VCS_URL) \
272+
--build-arg VCS_REF=$(VCS_REF) --build-arg VCS_URL=$(VCS_URL) --build-arg RELEASE_VERSION=$(RELEASE_VERSION) \
268273
--build-arg GOARCH=$(LOCAL_ARCH) -f Dockerfile .
269274

270275
build-test-operator-image: $(CONFIG_DOCKER_TARGET) ## Build the operator test image.
271276
@echo "Building the $(OPERATOR_IMAGE_NAME) docker image for testing..."
272-
@docker build -t $(QUAY_REGISTRY)/$(OPERATOR_IMAGE_NAME):$(OPERATOR_TEST_TAG) \
273-
--build-arg VCS_REF=$(VCS_REF) --build-arg VCS_URL=$(VCS_URL) \
277+
@docker build -t $(DEV_REGISTRY)/$(OPERATOR_IMAGE_NAME):$(OPERATOR_TEST_TAG) \
278+
--build-arg VCS_REF=$(VCS_REF) --build-arg VCS_URL=$(VCS_URL) --build-arg RELEASE_VERSION=$(RELEASE_VERSION) \
274279
--build-arg GOARCH=$(LOCAL_ARCH) -f Dockerfile .
275280

276281
##@ Release
@@ -285,13 +290,13 @@ build-push-image: $(CONFIG_DOCKER_TARGET) build-operator-image ## Build and pus
285290
@docker push $(ARTIFACTORYA_REGISTRY)/$(OPERATOR_IMAGE_NAME)-$(LOCAL_ARCH):$(VERSION)
286291

287292
build-push-bundle-image: yq
288-
@docker build -f bundle.Dockerfile -t $(QUAY_REGISTRY)/$(BUNDLE_IMAGE_NAME)-$(LOCAL_ARCH):$(VERSION) .
293+
@docker build -f bundle.Dockerfile -t $(ICR_REIGSTRY)/$(BUNDLE_IMAGE_NAME)-$(LOCAL_ARCH):$(VERSION) .
289294
@echo "Pushing the $(BUNDLE_IMAGE_NAME) docker image for $(LOCAL_ARCH)..."
290-
@docker push $(QUAY_REGISTRY)/$(BUNDLE_IMAGE_NAME)-$(LOCAL_ARCH):$(VERSION)
295+
@docker push $(ICR_REIGSTRY)/$(BUNDLE_IMAGE_NAME)-$(LOCAL_ARCH):$(VERSION)
291296

292297
build-catalog-source:
293-
@opm -u docker index add --bundles $(QUAY_REGISTRY)/$(BUNDLE_IMAGE_NAME)-$(LOCAL_ARCH):$(VERSION) --tag $(QUAY_REGISTRY)/$(OPERATOR_IMAGE_NAME)-catalog:$(VERSION)
294-
@docker push $(QUAY_REGISTRY)/$(OPERATOR_IMAGE_NAME)-catalog:$(VERSION)
298+
@opm -u docker index add --bundles $(ICR_REIGSTRY)/$(BUNDLE_IMAGE_NAME)-$(LOCAL_ARCH):$(VERSION) --tag $(ICR_REIGSTRY)/$(OPERATOR_IMAGE_NAME)-catalog:$(VERSION)
299+
@docker push $(ICR_REIGSTRY)/$(OPERATOR_IMAGE_NAME)-catalog:$(VERSION)
295300

296301
build-catalog: build-push-bundle-image build-catalog-source
297302

bundle.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
55
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
66
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
77
LABEL operators.operatorframework.io.bundle.package.v1=ibm-odlm
8-
LABEL operators.operatorframework.io.bundle.channels.v1=v4.3
9-
LABEL operators.operatorframework.io.bundle.channel.default.v1=v4.3
8+
LABEL operators.operatorframework.io.bundle.channels.v1=v4.4
9+
LABEL operators.operatorframework.io.bundle.channel.default.v1=v4.4
1010
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.32.0
1111
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
1212
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3

bundle/manifests/operand-deployment-lifecycle-manager.clusterserviceversion.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,23 +128,23 @@ metadata:
128128
capabilities: Seamless Upgrades
129129
categories: Developer Tools, Monitoring, Logging & Tracing, Security
130130
certified: "false"
131-
containerImage: icr.io/cpopen/odlm:latest
132-
createdAt: "2024-09-28T19:55:35Z"
131+
containerImage: icr.io/cpopen/odlm:4.4.0
132+
createdAt: "2025-02-14T21:16:49Z"
133133
description: The Operand Deployment Lifecycle Manager provides a Kubernetes CRD-based API to manage the lifecycle of operands.
134-
nss.operator.ibm.com/managed-operators: ibm-odlm
135-
olm.skipRange: '>=1.2.0 <4.4.0'
136-
operators.openshift.io/infrastructure-features: '["disconnected"]'
137-
operators.operatorframework.io/builder: operator-sdk-v1.32.0
138-
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
139-
repository: https://github.com/IBM/operand-deployment-lifecycle-manager
140-
support: IBM
141134
features.operators.openshift.io/disconnected: "true"
142135
features.operators.openshift.io/fips-compliant: "true"
143136
features.operators.openshift.io/proxy-aware: "false"
144137
features.operators.openshift.io/tls-profiles: "false"
145138
features.operators.openshift.io/token-auth-aws: "false"
146139
features.operators.openshift.io/token-auth-azure: "false"
147140
features.operators.openshift.io/token-auth-gcp: "false"
141+
nss.operator.ibm.com/managed-operators: ibm-odlm
142+
olm.skipRange: '>=1.2.0 <4.4.0'
143+
operators.openshift.io/infrastructure-features: '["disconnected"]'
144+
operators.operatorframework.io/builder: operator-sdk-v1.32.0
145+
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
146+
repository: https://github.com/IBM/operand-deployment-lifecycle-manager
147+
support: IBM
148148
labels:
149149
operatorframework.io/arch.amd64: supported
150150
operatorframework.io/arch.ppc64le: supported
@@ -649,7 +649,7 @@ spec:
649649
valueFrom:
650650
fieldRef:
651651
fieldPath: metadata.annotations['olm.targetNamespaces']
652-
image: icr.io/cpopen/odlm:latest
652+
image: icr.io/cpopen/odlm:4.4.0
653653
imagePullPolicy: IfNotPresent
654654
livenessProbe:
655655
failureThreshold: 10

bundle/metadata/annotations.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ annotations:
1212
# Annotations for testing.
1313
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
1414
operators.operatorframework.io.test.config.v1: tests/scorecard/
15+
# OpenShift annotations.
16+
com.redhat.openshift.versions: v4.12-v4.17

common/scripts/lint_go.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
# limitations under the License.
1616
#
1717

18-
GOGC=25 golangci-lint run -c ./common/config/.golangci.yml --timeout=300s
18+
GOGC=25 golangci-lint run -c ./common/config/.golangci.yml --timeout=480s

common/scripts/next-csv.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,5 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
6666
else
6767
echo "Not support on other operating system"
6868
fi
69+
70+
make generate-all

config/e2e/manager/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ resources:
33
apiVersion: kustomize.config.k8s.io/v1beta1
44
kind: Kustomization
55
images:
6-
- name: quay.io/opencloudio/odlm
6+
- name: icr.io/cpopen/odlm
77
newName: quay.io/opencloudio/odlm
88
newTag: dev-test

config/e2e/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ spec:
4747
- /manager
4848
args:
4949
- -v=2
50-
image: quay.io/opencloudio/odlm:latest
50+
image: icr.io/cpopen/odlm:latest
5151
name: manager
5252
resources:
5353
limits:

config/manager/kustomization.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
resources:
22
- manager.yaml
3+
apiVersion: kustomize.config.k8s.io/v1beta1
4+
kind: Kustomization
5+
images:
6+
- name: icr.io/cpopen/odlm
7+
newName: icr.io/cpopen/odlm
8+
newTag: 4.4.0

0 commit comments

Comments
 (0)