diff --git a/DEVEL.md b/DEVEL.md index 867c2a6d..bb19a177 100644 --- a/DEVEL.md +++ b/DEVEL.md @@ -202,16 +202,16 @@ Update metadata.annotations.containerImage and metadata.annotations.createdAT fi deployments/operator/manifests/bases/intel-device-plugins-operator.clusterserviceversion.yaml to match current operator version and current date +Fork the [Community Operators](https://github.com/k8s-operatorhub/community-operators) repo and clone it: +``` +$ git clone https://github.com//community-operators +``` + Generate package manifests with: ``` $ make packagemanifests OPERATOR_VERSION=0.X.Y ``` -Copy the generated files to the Community Operators repo: -``` -$ cp -r packagemanifests/* community-operators/operators/intel-device-plugins-operator/ -``` - Verify the operator deployment works OK via OLM in your development cluster: ``` $ operator-sdk olm install @@ -228,9 +228,11 @@ $ 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/k8s-operatorhub/community-operators) repo: +Commit files ``` -$ git clone https://github.com/k8s-operatorhub/community-operators +$ cd community-operators +$ git add operators/intel-device-plugins-operator/0.X.Y +$ git commit -am 'operators intel-device-plugins-operator (0.X.Y)' -S ``` Submit a PR diff --git a/Makefile b/Makefile index 9435a196..b7d04775 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ BUNDLE_DEFAULT_CHANNEL := --default-channel=$(DEFAULT_CHANNEL) endif BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) OLM_MANIFESTS = deployments/operator/manifests +PACKAGEMANIFESTS_DIR = community-operators/operators/intel-device-plugins-operator WEBHOOK_IMAGE_FILE = intel-fpga-admissionwebhook-devel.tgz @@ -119,10 +120,10 @@ 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) --from-version $(OPERATOR_PREVIOUS_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) --output-dir $(PACKAGEMANIFESTS_DIR) # Remove unneeded resources - rm packagemanifests/$(OPERATOR_VERSION)/*service.yaml - rm packagemanifests/$(OPERATOR_VERSION)/*clusterrole.yaml + rm $(PACKAGEMANIFESTS_DIR)/$(OPERATOR_VERSION)/*service.yaml + rm $(PACKAGEMANIFESTS_DIR)/$(OPERATOR_VERSION)/*clusterrole.yaml clean: @for cmd in $(cmds) ; do pwd=$(shell pwd) ; cd cmd/$$cmd ; $(GO) clean ; cd $$pwd ; done