From fd96346ef5add6d87836b58428a1c48a60464651 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Thu, 19 Aug 2021 12:30:04 +0300 Subject: [PATCH 1/3] packagemanifests: generate 'replaces:' tag This tag is required by operator publishing guidelines if updateGraph is set to 'replaces-mode' in the operator ci config. Signed-off-by: Ed Bartosh --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index db3a2611..4f24e5ef 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,9 @@ BUILDER ?= "docker" EXTRA_BUILD_ARGS ?= "" # Current Operator version -OPERATOR_VERSION ?= 0.19.0 +OPERATOR_VERSION ?= 0.21.0 +# Previous Operator version +OPERATOR_PREVIOUS_VERSION ?= 0.20.0 # Default bundle image tag BUNDLE_IMG ?= intel-device-plugins-controller-bundle:$(OPERATOR_VERSION) # Options for 'bundle-build' @@ -110,7 +112,7 @@ bundle: .PHONY: packagemanifests packagemanifests: $(OPERATOR_SDK) generate kustomize manifests -q --input-dir $(OLM_MANIFESTS) --output-dir $(OLM_MANIFESTS) --apis-dir pkg/apis - $(KUSTOMIZE) build $(OLM_MANIFESTS) | sed "s|intel-deviceplugin-operator:devel|intel-deviceplugin-operator:$(OPERATOR_VERSION)|" | $(OPERATOR_SDK) generate packagemanifests -q --kustomize-dir $(OLM_MANIFESTS) --version $(OPERATOR_VERSION) $(BUNDLE_METADATA_OPTS) + $(KUSTOMIZE) build $(OLM_MANIFESTS) | sed "s|intel-deviceplugin-operator:devel|intel-deviceplugin-operator:$(OPERATOR_VERSION)|" | $(OPERATOR_SDK) generate packagemanifests -q --kustomize-dir $(OLM_MANIFESTS) --version $(OPERATOR_VERSION) --from-version $(OPERATOR_PREVIOUS_VERSION) $(BUNDLE_METADATA_OPTS) # Remove unneeded resources rm packagemanifests/$(OPERATOR_VERSION)/*service.yaml rm packagemanifests/$(OPERATOR_VERSION)/*clusterrole.yaml From 95bbc1049fff79bc8b0052ca5d2c9bbd1f431a69 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Thu, 19 Aug 2021 13:14:44 +0300 Subject: [PATCH 2/3] update operatol publishing guide - updated community operators urls - added more details Signed-off-by: Ed Bartosh --- DEVEL.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/DEVEL.md b/DEVEL.md index 90c27d3e..8247ec3d 100644 --- a/DEVEL.md +++ b/DEVEL.md @@ -198,6 +198,10 @@ There are few useful steps when working with changes to Device Plugins CRDs and ## How to publish a new version of the Intel Device Plugins operator to operatorhub.io +Update metadata.annotations.containerImage field in the base CSV manifest file +deployments/operator/manifests/bases/intel-device-plugins-operator.clusterserviceversion.yaml +to match current operator version + Generate package manifests with: ``` $ make packagemanifests OPERATOR_VERSION=0.X.Y @@ -219,14 +223,18 @@ $ operator-sdk olm uninstall Review the package manifests by uploading the generated `packagemanifests` folder to https://operatorhub.io -> Contribute -> Package Your Operator. -Clone the [Community Operators](https://github.com/operator-framework/community-operators) repo: +Clone the [Community Operators](https://github.com/k8s-operatorhub/community-operators) repo: ``` -$ git clone https://github.com/operator-framework/community-operators +$ git clone https://github.com/k8s-operatorhub/community-operators ``` Copy the generated files to the Community Operators repo: ``` -$ cp -r packagemanifests/* community-operators/upstream-community-operators/intel-device-plugins/ +$ cp -r packagemanifests/* community-operators/operators/intel-device-plugins/ ``` -Finally, submit a PR. +Submit a PR + +Check operator page +https://operatorhub.io/operator/intel-device-plugins-operator +after PR is merged From c4483f4f067169db203001b0e41a084e2a6bc1db Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Thu, 19 Aug 2021 13:16:48 +0300 Subject: [PATCH 3/3] add 3 tags to the base operator manifest - containerImage is required by the comunity-operators PR checks - repository and createdAt are shown on the operator page: https://operatorhub.io/operator/intel-device-plugins-operator Signed-off-by: Ed Bartosh --- DEVEL.md | 4 ++-- .../intel-device-plugins-operator.clusterserviceversion.yaml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DEVEL.md b/DEVEL.md index 8247ec3d..681855ff 100644 --- a/DEVEL.md +++ b/DEVEL.md @@ -198,9 +198,9 @@ There are few useful steps when working with changes to Device Plugins CRDs and ## How to publish a new version of the Intel Device Plugins operator to operatorhub.io -Update metadata.annotations.containerImage field in the base CSV manifest file +Update metadata.annotations.containerImage and metadata.annotations.createdAT fields in the base CSV manifest file deployments/operator/manifests/bases/intel-device-plugins-operator.clusterserviceversion.yaml -to match current operator version +to match current operator version and current date Generate package manifests with: ``` diff --git a/deployments/operator/manifests/bases/intel-device-plugins-operator.clusterserviceversion.yaml b/deployments/operator/manifests/bases/intel-device-plugins-operator.clusterserviceversion.yaml index 4a808df2..75d23d8b 100644 --- a/deployments/operator/manifests/bases/intel-device-plugins-operator.clusterserviceversion.yaml +++ b/deployments/operator/manifests/bases/intel-device-plugins-operator.clusterserviceversion.yaml @@ -5,9 +5,12 @@ metadata: alm-examples: '[]' capabilities: Basic Install categories: Drivers and plugins + containerImage: intel/intel-deviceplugin-operator:0.21.0 + createdAt: "2021-08-18" description: This One Operator is a Kubernetes custom controller whose goal is to serve the installation and lifecycle management of Intel device plugins for Kubernetes. operators.operatorframework.io/builder: operator-sdk-v1.2.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 + repository: https://github.com/intel/intel-device-plugins-for-kubernetes name: intel-device-plugins-operator.v0.0.0 namespace: placeholder spec: