diff --git a/Makefile b/Makefile index 4bce1f884..b7e449944 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) # # For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both # bpfman.io/bpfman-operator-bundle:$VERSION and bpfman.io/bpfman-operator-catalog:$VERSION. -IMAGE_TAG_BASE ?= bpfman.io/bpfman-operator +IMAGE_TAG_BASE ?= quay.io/bpfman/bpfman-operator # BUNDLE_IMG defines the image:tag used for the bundle. # You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=/:) @@ -50,7 +50,6 @@ IMAGE_TAG ?= latest BPFMAN_IMG ?= quay.io/bpfman/bpfman:$(IMAGE_TAG) BPFMAN_AGENT_IMG ?= quay.io/bpfman/bpfman-agent:$(IMAGE_TAG) BPFMAN_OPERATOR_IMG ?= quay.io/bpfman/bpfman-operator:$(IMAGE_TAG) -BPFMAN_OPERATOR_BUNDLE_IMG ?= quay.io/bpfman/bpfman-operator-bundle:$(IMAGE_TAG) KIND_CLUSTER_NAME ?= bpfman-deployment # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. @@ -344,11 +343,11 @@ load-images-kind: ## Load bpfman-agent, and bpfman-operator images into the runn .PHONY: bundle-build bundle-build: ## Build the bundle image. - docker build -f Containerfile.bundle -t $(BPFMAN_OPERATOR_BUNDLE_IMG) . + docker build -f Containerfile.bundle -t $(BUNDLE_IMG) . .PHONY: bundle-push bundle-push: ## Push the bundle image. - docker push $(BPFMAN_OPERATOR_BUNDLE_IMG) + docker push $(BUNDLE_IMG) # A comma-separated list of bundle images (e.g. make catalog-build BUNDLE_IMGS=example.com/operator-bundle:v0.1.0,example.com/operator-bundle:v0.2.0). # These images MUST exist in a registry and be pull-able. @@ -368,7 +367,6 @@ endif .PHONY: catalog-build catalog-build: opm ## Build a catalog image. $(OPM) index add --container-tool docker --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT) - # Push the catalog image. .PHONY: catalog-push catalog-push: ## Push a catalog image. @@ -434,3 +432,13 @@ deploy-openshift: manifests kustomize ## Deploy bpfman-operator to the Openshift .PHONY: undeploy-openshift undeploy-openshift: ## Undeploy bpfman-operator from the Openshift cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. $(KUSTOMIZE) build config/openshift | kubectl delete --ignore-not-found=$(ignore-not-found) -f - + +# Deploy the catalog. +.PHONY: catalog-deploy +catalog-deploy: ## Deploy a catalog image. + $(SED) -e 's~~$(CATALOG_IMG)~' ./config/catalog/catalog.yaml | kubectl apply -f - + +# Undeploy the catalog. +.PHONY: catalog-undeploy +catalog-undeploy: ## Undeploy a catalog image. + kubectl delete -f ./config/catalog/catalog.yaml diff --git a/README.md b/README.md index 7e906aa66..ee60c606a 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,30 @@ To clean up at a later time, execute: operator-sdk cleanup bpfman-operator ``` +#### 3. Deploy as a bundle from the Console's OperatorHub page + +This mode is recommended when you want to test the customer experience of navigating through the operators' +catalog and installing/configuring it manually through the UI, prior to committing the bundle to either: - + +- https://github.com/redhat-openshift-ecosystem/community-operators-prod + +or + +- https://github.com/k8s-operatorhub/community-operators/pulls + +```sh +export BUNDLE_IMG=quay.io/$USER/bpfman-operator-bundle:developement +make bundle bundle-build bundle-push +export CATALOG_IMG=quay.io/$USER/bpfman-operator-catalog:developement +make catalog-build catalog-push catalog-deploy +``` + +To clean up at a later time, execute: + +```bash +make catalog-undeploy +``` + ## Verify the Installation Regardless of the deployment method, if the `bpfman-operator` was deployed successfully, @@ -182,4 +206,4 @@ object to find references to the bpfMap pinpoints (`spec.maps`) to configure the ## Developer For more architecture details about `bpfman-operator`, refer to -[Developing the bpfman-operator](https://bpfman.io/v0.5.0-rc1/developer-guide/develop-operator) \ No newline at end of file +[Developing the bpfman-operator](https://bpfman.io/v0.5.0-rc1/developer-guide/develop-operator) diff --git a/bundle/manifests/bpfman-operator.clusterserviceversion.yaml b/bundle/manifests/bpfman-operator.clusterserviceversion.yaml index 96b945054..dbe5f1d82 100644 --- a/bundle/manifests/bpfman-operator.clusterserviceversion.yaml +++ b/bundle/manifests/bpfman-operator.clusterserviceversion.yaml @@ -296,7 +296,18 @@ metadata: capabilities: Basic Install categories: OpenShift Optional containerImage: quay.io/bpfman/bpfman-operator:v0.0.0 - createdAt: "2024-07-12T15:52:56Z" + createdAt: "2024-07-12T16:12:00Z" + features.operators.openshift.io/cnf: "false" + features.operators.openshift.io/cni: "false" + features.operators.openshift.io/csi: "true" + features.operators.openshift.io/disconnected: "true" + features.operators.openshift.io/fips-compliant: "true" + features.operators.openshift.io/proxy-aware: "false" + features.operators.openshift.io/tls-profiles: "false" + features.operators.openshift.io/token-auth-aws: "false" + features.operators.openshift.io/token-auth-azure: "false" + features.operators.openshift.io/token-auth-gcp: "false" + operatorframework.io/suggested-namespace: bpfman operatorframework.io/suggested-namespace-template: |- { "apiVersion": "v1", @@ -313,9 +324,17 @@ metadata: }, } } + operators.openshift.io/infrastructure-features: '["csi", "disconnected"]' + operators.openshift.io/valid-subscription: '["OpenShift Kubernetes Engine", "OpenShift + Container Platform", "OpenShift Platform Plus"]' operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/bpfman/bpfman + labels: + operatorframework.io/arch.amd64: supported + operatorframework.io/arch.arm64: supported + operatorframework.io/arch.ppc64le: supported + operatorframework.io/arch.s390x: supported name: bpfman-operator.v0.5.0-rc3 namespace: placeholder spec: diff --git a/config/catalog/catalog.yaml b/config/catalog/catalog.yaml new file mode 100644 index 000000000..fd5dd9ec7 --- /dev/null +++ b/config/catalog/catalog.yaml @@ -0,0 +1,13 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: CatalogSource +metadata: + name: bpfmanoperator-dev-catalog + namespace: openshift-marketplace +spec: + sourceType: grpc + image: + displayName: Bpfman Operator development catalog + publisher: Me + updateStrategy: + registryPoll: + interval: 1m diff --git a/config/manifests/bases/bpfman-operator.clusterserviceversion.yaml b/config/manifests/bases/bpfman-operator.clusterserviceversion.yaml index 13d121a58..2369c5f9d 100644 --- a/config/manifests/bases/bpfman-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/bpfman-operator.clusterserviceversion.yaml @@ -7,6 +7,7 @@ metadata: capabilities: Basic Install containerImage: quay.io/bpfman/bpfman-operator:v0.0.0 repository: https://github.com/bpfman/bpfman + operatorframework.io/suggested-namespace: bpfman operatorframework.io/suggested-namespace-template: |- { "apiVersion": "v1", @@ -23,6 +24,23 @@ metadata: }, } } + features.operators.openshift.io/disconnected: "true" + features.operators.openshift.io/fips-compliant: "true" + features.operators.openshift.io/proxy-aware: "false" + features.operators.openshift.io/cnf: "false" + features.operators.openshift.io/cni: "false" + features.operators.openshift.io/csi: "true" + features.operators.openshift.io/tls-profiles: "false" + features.operators.openshift.io/token-auth-aws: "false" + features.operators.openshift.io/token-auth-azure: "false" + features.operators.openshift.io/token-auth-gcp: "false" + operators.openshift.io/infrastructure-features: '["csi", "disconnected"]' + operators.openshift.io/valid-subscription: '["OpenShift Kubernetes Engine", "OpenShift Container Platform", "OpenShift Platform Plus"]' + labels: + operatorframework.io/arch.amd64: supported + operatorframework.io/arch.arm64: supported + operatorframework.io/arch.ppc64le: supported + operatorframework.io/arch.s390x: supported name: bpfman-operator.v0.0.0 namespace: placeholder spec: