Skip to content

Commit

Permalink
Merge pull request #380 from leelavg/install-client-dep
Browse files Browse the repository at this point in the history
bundle: add ocs-client-operator as olm dependency
  • Loading branch information
openshift-merge-bot[bot] authored Mar 22, 2024
2 parents d7d0044 + 461b72b commit f3575bb
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ catalog/ocs.yaml
catalog/odf.yaml
catalog/rook.yaml
catalog/prometheus.yaml
catalog/ocs-client.yaml
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ OCS_SUBSCRIPTION_CHANNEL=$(OCS_SUBSCRIPTION_CHANNEL)
OCS_SUBSCRIPTION_STARTINGCSV=$(OCS_SUBSCRIPTION_STARTINGCSV)
OCS_SUBSCRIPTION_CATALOGSOURCE=$(OCS_SUBSCRIPTION_CATALOGSOURCE)
OCS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE=$(OCS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE)
OCS_CLIENT_SUBSCRIPTION_NAME=$(OCS_CLIENT_SUBSCRIPTION_NAME)
OCS_CLIENT_SUBSCRIPTION_PACKAGE=$(OCS_CLIENT_SUBSCRIPTION_PACKAGE)
OCS_CLIENT_SUBSCRIPTION_CHANNEL=$(OCS_CLIENT_SUBSCRIPTION_CHANNEL)
OCS_CLIENT_SUBSCRIPTION_STARTINGCSV=$(OCS_CLIENT_SUBSCRIPTION_STARTINGCSV)
OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE=$(OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE)
OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE=$(OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE)
IBM_SUBSCRIPTION_NAME=$(IBM_SUBSCRIPTION_NAME)
IBM_SUBSCRIPTION_PACKAGE=$(IBM_SUBSCRIPTION_PACKAGE)
IBM_SUBSCRIPTION_CHANNEL=$(IBM_SUBSCRIPTION_CHANNEL)
Expand Down Expand Up @@ -177,6 +183,7 @@ bundle-push: ## Push the bundle image.
catalog: opm ## Generate catalog manifests and then validate generated files.
$(OPM) render --output=yaml $(BUNDLE_IMG) $(OPM_RENDER_OPTS) > catalog/odf.yaml
$(OPM) render --output=yaml $(OCS_BUNDLE_IMG) $(OPM_RENDER_OPTS) > catalog/ocs.yaml
$(OPM) render --output=yaml $(OCS_CLIENT_BUNDLE_IMG) $(OPM_RENDER_OPTS) > catalog/ocs-client.yaml
$(OPM) render --output=yaml $(IBM_BUNDLE_IMG) $(OPM_RENDER_OPTS) > catalog/ibm.yaml
$(OPM) render --output=yaml $(NOOBAA_BUNDLE_IMG) $(OPM_RENDER_OPTS) > catalog/noobaa.yaml
$(OPM) render --output=yaml $(CSIADDONS_BUNDLE_IMG) $(OPM_RENDER_OPTS) > catalog/csiaddons.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ data:
NOOBAA_SUBSCRIPTION_NAME: noobaa-operator
NOOBAA_SUBSCRIPTION_PACKAGE: noobaa-operator
NOOBAA_SUBSCRIPTION_STARTINGCSV: noobaa-operator.v5.14.0
OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE: odf-catalogsource
OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE: openshift-marketplace
OCS_CLIENT_SUBSCRIPTION_CHANNEL: alpha
OCS_CLIENT_SUBSCRIPTION_NAME: ocs-client-operator
OCS_CLIENT_SUBSCRIPTION_PACKAGE: ocs-client-operator
OCS_CLIENT_SUBSCRIPTION_STARTINGCSV: ocs-client-operator.v4.15.0
OCS_SUBSCRIPTION_CATALOGSOURCE: odf-catalogsource
OCS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE: openshift-marketplace
OCS_SUBSCRIPTION_CHANNEL: alpha
Expand Down
2 changes: 1 addition & 1 deletion bundle/manifests/odf-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ metadata:
categories: Storage
console.openshift.io/plugins: '["odf-console"]'
containerImage: quay.io/ocs-dev/odf-operator:latest
createdAt: "2024-03-21T13:04:01Z"
createdAt: "2024-03-22T02:45:54Z"
description: OpenShift Data Foundation provides a common control plane for storage
solutions on OpenShift Container Platform.
features.operators.openshift.io/token-auth-aws: "true"
Expand Down
4 changes: 4 additions & 0 deletions bundle/metadata/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ dependencies:
value:
packageName: rook-ceph-operator
version: ">=4.14.0 <4.15.0 || 4.15.0"
- type: olm.package
value:
packageName: ocs-client-operator
version: ">=4.14.0 <4.15.0 || 4.15.0"
- type: olm.package
value:
packageName: noobaa-operator
Expand Down
11 changes: 11 additions & 0 deletions catalog/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ name: alpha
entries:
- name: ocs-operator.v4.15.0

---
defaultChannel: alpha
name: ocs-client-operator
schema: olm.package
---
schema: olm.channel
package: ocs-client-operator
name: alpha
entries:
- name: ocs-client-operator.v4.15.0

---
defaultChannel: alpha
name: noobaa-operator
Expand Down
6 changes: 6 additions & 0 deletions config/manager/manager.env
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ OCS_SUBSCRIPTION_CHANNEL=alpha
OCS_SUBSCRIPTION_STARTINGCSV=ocs-operator.v4.15.0
OCS_SUBSCRIPTION_CATALOGSOURCE=odf-catalogsource
OCS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE=openshift-marketplace
OCS_CLIENT_SUBSCRIPTION_NAME=ocs-client-operator
OCS_CLIENT_SUBSCRIPTION_PACKAGE=ocs-client-operator
OCS_CLIENT_SUBSCRIPTION_CHANNEL=alpha
OCS_CLIENT_SUBSCRIPTION_STARTINGCSV=ocs-client-operator.v4.15.0
OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE=odf-catalogsource
OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE=openshift-marketplace
IBM_SUBSCRIPTION_NAME=ibm-storage-odf-operator
IBM_SUBSCRIPTION_PACKAGE=ibm-storage-odf-operator
IBM_SUBSCRIPTION_CHANNEL=stable-v1.4
Expand Down
14 changes: 14 additions & 0 deletions controllers/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ var (
"OCS_SUBSCRIPTION_CATALOGSOURCE": "odf-catalogsource",
"OCS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE": "openshift-marketplace",

"OCS_CLIENT_SUBSCRIPTION_NAME": "ocs-client-operator",
"OCS_CLIENT_SUBSCRIPTION_PACKAGE": "ocs-client-operator",
"OCS_CLIENT_SUBSCRIPTION_CHANNEL": "alpha",
"OCS_CLIENT_SUBSCRIPTION_STARTINGCSV": "ocs-client-operator.v4.15.0",
"OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE": "odf-catalogsource",
"OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE": "openshift-marketplace",

"CSIADDONS_SUBSCRIPTION_NAME": "csi-addons",
"CSIADDONS_SUBSCRIPTION_PACKAGE": "csi-addons",
"CSIADDONS_SUBSCRIPTION_CHANNEL": "alpha",
Expand Down Expand Up @@ -76,6 +83,13 @@ var (
OcsSubscriptionCatalogSource = GetEnvOrDefault("OCS_SUBSCRIPTION_CATALOGSOURCE")
OcsSubscriptionCatalogSourceNamespace = GetEnvOrDefault("OCS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE")

OcsClientSubscriptionName = GetEnvOrDefault("OCS_CLIENT_SUBSCRIPTION_NAME")
OcsClientSubscriptionPackage = GetEnvOrDefault("OCS_CLIENT_SUBSCRIPTION_PACKAGE")
OcsClientSubscriptionChannel = GetEnvOrDefault("OCS_CLIENT_SUBSCRIPTION_CHANNEL")
OcsClientSubscriptionStartingCSV = GetEnvOrDefault("OCS_CLIENT_SUBSCRIPTION_STARTINGCSV")
OcsClientSubscriptionCatalogSource = GetEnvOrDefault("OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE")
OcsClientSubscriptionCatalogSourceNamespace = GetEnvOrDefault("OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE")

NoobaaSubscriptionName = GetEnvOrDefault("NOOBAA_SUBSCRIPTION_NAME")
NoobaaSubscriptionPackage = GetEnvOrDefault("NOOBAA_SUBSCRIPTION_PACKAGE")
NoobaaSubscriptionChannel = GetEnvOrDefault("NOOBAA_SUBSCRIPTION_CHANNEL")
Expand Down
21 changes: 19 additions & 2 deletions controllers/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ func GetVendorCsvNames(kind odfv1alpha1.StorageKind) []string {
if kind == VendorFlashSystemCluster() {
csvNames = []string{IbmSubscriptionStartingCSV}
} else if kind == VendorStorageCluster() {
csvNames = []string{OcsSubscriptionStartingCSV, RookSubscriptionStartingCSV, NoobaaSubscriptionStartingCSV, CSIAddonsSubscriptionStartingCSV}
csvNames = []string{OcsSubscriptionStartingCSV, RookSubscriptionStartingCSV, NoobaaSubscriptionStartingCSV,
CSIAddonsSubscriptionStartingCSV, OcsClientSubscriptionStartingCSV}
}

return csvNames
Expand Down Expand Up @@ -360,6 +361,21 @@ func GetStorageClusterSubscriptions() []*operatorv1alpha1.Subscription {
},
}

ocsClientSubscription := &operatorv1alpha1.Subscription{
ObjectMeta: metav1.ObjectMeta{
Name: OcsClientSubscriptionName,
Namespace: OperatorNamespace,
},
Spec: &operatorv1alpha1.SubscriptionSpec{
CatalogSource: OcsClientSubscriptionCatalogSource,
CatalogSourceNamespace: OcsClientSubscriptionCatalogSourceNamespace,
Package: OcsClientSubscriptionPackage,
Channel: OcsClientSubscriptionChannel,
StartingCSV: OcsClientSubscriptionStartingCSV,
InstallPlanApproval: operatorv1alpha1.ApprovalAutomatic,
},
}

csiAddonsSubscription := &operatorv1alpha1.Subscription{
ObjectMeta: metav1.ObjectMeta{
Name: CSIAddonsSubscriptionName,
Expand Down Expand Up @@ -415,7 +431,8 @@ func GetStorageClusterSubscriptions() []*operatorv1alpha1.Subscription {
},
}

return []*operatorv1alpha1.Subscription{ocsSubscription, rookSubscription, noobaaSubscription, csiAddonsSubscription, prometheusSubscription}
return []*operatorv1alpha1.Subscription{ocsSubscription, rookSubscription, noobaaSubscription,
csiAddonsSubscription, ocsClientSubscription, prometheusSubscription}
}

// GetFlashSystemClusterSubscription return subscription for FlashSystemCluster
Expand Down
9 changes: 8 additions & 1 deletion e2e/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ var (
OdfClusterServiceVersion string
// OcsClusterServiceVersion is the name of ocs csv
OcsClusterServiceVersion string
// OcsClientClusterServiceVersion is the name of ocs-client csv
OcsClientClusterServiceVersion string
// NoobaClusterServiceVersion is the name of Nooba csv
NoobaClusterServiceVersion string
// CsiaddonsClusterServiceVersion is the name of Csiaddons csv
Expand Down Expand Up @@ -48,6 +50,7 @@ func init() {
flag.BoolVar(&OdfClusterUninstall, "odf-operator-uninstall", true, "Uninstall the ODF operator after test completion")
flag.StringVar(&OdfClusterServiceVersion, "odf-cluster-service-version", "", "The ODF CSV name which needs to verified")
flag.StringVar(&OcsClusterServiceVersion, "ocs-cluster-service-version", "", "The OCS CSV name which needs to verified")
flag.StringVar(&OcsClientClusterServiceVersion, "ocs-client-cluster-service-version", "", "The OCS CSV name which needs to verified")
flag.StringVar(&NoobaClusterServiceVersion, "nooba-cluster-service-version", "", "The Nooba CSV name which needs to verified")
flag.StringVar(&CsiaddonsClusterServiceVersion, "csiaddons-cluster-service-version", "", "The CSI Addon CSV name which needs to verified")
flag.StringVar(&RookClusterServiceVersion, "rook-cluster-service-version", "", "The Rook CSV name which needs to verified")
Expand All @@ -57,7 +60,7 @@ func init() {
verifyFlags()

// A list of names of all the csvs that should be installed
CsvNames = []string{OdfClusterServiceVersion, OcsClusterServiceVersion,
CsvNames = []string{OdfClusterServiceVersion, OcsClusterServiceVersion, OcsClientClusterServiceVersion,
RookClusterServiceVersion, NoobaClusterServiceVersion,
CsiaddonsClusterServiceVersion, PrometheusClusterServiceVersion}

Expand Down Expand Up @@ -86,6 +89,10 @@ func verifyFlags() {
panic("ocs-cluster-service-version is not provided")
}

if OcsClientClusterServiceVersion == "" {
panic("ocs-client-cluster-service-version is not provider")
}

if NoobaClusterServiceVersion == "" {
panic("nooba-cluster-service-version is not provided")
}
Expand Down
1 change: 1 addition & 0 deletions hack/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cd e2e/odf && ${GINKGO} build && ./odf.test \
--odf-operator-uninstall=${ODF_OPERATOR_UNINSTALL} \
--odf-cluster-service-version=odf-operator.v${VERSION} \
--ocs-cluster-service-version=${OCS_SUBSCRIPTION_STARTINGCSV} \
--ocs-client-cluster-service-version=${OCS_CLIENT_SUBSCRIPTION_STARTINGCSV} \
--nooba-cluster-service-version=${NOOBAA_SUBSCRIPTION_STARTINGCSV} \
--csiaddons-cluster-service-version=${CSIADDONS_SUBSCRIPTION_STARTINGCSV} \
--rook-cluster-service-version=${ROOK_SUBSCRIPTION_STARTINGCSV} \
Expand Down
15 changes: 14 additions & 1 deletion hack/make-bundle-vars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ OCS_BUNDLE_IMG_TAG ?= v4.15.0
OCS_BUNDLE_IMG_LOCATION ?= quay.io/ocs-dev
OCS_BUNDLE_IMG ?= $(OCS_BUNDLE_IMG_LOCATION)/$(OCS_BUNDLE_IMG_NAME):$(OCS_BUNDLE_IMG_TAG)

OCS_CLIENT_BUNDLE_NAME ?= ocs-client-operator
OCS_CLIENT_BUNDLE_IMG_NAME ?= $(OCS_CLIENT_BUNDLE_NAME)-bundle
OCS_CLIENT_BUNDLE_IMG_TAG ?= v4.15.0
OCS_CLIENT_BUNDLE_IMG_LOCATION ?= quay.io/ocs-dev
OCS_CLIENT_BUNDLE_IMG ?= $(OCS_CLIENT_BUNDLE_IMG_LOCATION)/$(OCS_CLIENT_BUNDLE_IMG_NAME):$(OCS_CLIENT_BUNDLE_IMG_TAG)

NOOBAA_BUNDLE_NAME ?= noobaa-operator
NOOBAA_BUNDLE_IMG_NAME ?= $(NOOBAA_BUNDLE_NAME)-bundle
NOOBAA_BUNDLE_IMG_TAG ?= v5.14.0
Expand Down Expand Up @@ -111,7 +117,7 @@ PROMETHEUS_BUNDLE_IMG ?= $(PROMETHEUS_BUNDLE_IMG_LOCATION)/$(PROMETHEUS_BUNDLE_I

# A space-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.
BUNDLE_IMGS ?= $(BUNDLE_IMG) $(OCS_BUNDLE_IMG) $(IBM_BUNDLE_IMG) $(NOOBAA_BUNDLE_IMG) $(CSIADDONS_BUNDLE_IMG) $(ROOK_BUNDLE_IMG)
BUNDLE_IMGS ?= $(BUNDLE_IMG) $(OCS_BUNDLE_IMG) $(OCS_CLIENT_BUNDLE_IMG) $(IBM_BUNDLE_IMG) $(NOOBAA_BUNDLE_IMG) $(CSIADDONS_BUNDLE_IMG) $(ROOK_BUNDLE_IMG)

# Set CATALOG_BASE_IMG to an existing catalog image tag to add $BUNDLE_IMGS to that image.
ifneq ($(origin CATALOG_BASE_IMG), undefined)
Expand Down Expand Up @@ -144,6 +150,13 @@ OCS_SUBSCRIPTION_STARTINGCSV ?= $(OCS_BUNDLE_NAME).$(OCS_BUNDLE_IMG_TAG)
OCS_SUBSCRIPTION_CATALOGSOURCE ?= $(OPERATOR_CATALOGSOURCE)
OCS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE ?= $(OPERATOR_CATALOGSOURCE_NAMESPACE)

OCS_CLIENT_SUBSCRIPTION_NAME ?= $(OCS_CLIENT_BUNDLE_NAME)
OCS_CLIENT_SUBSCRIPTION_PACKAGE ?= $(OCS_CLIENT_BUNDLE_NAME)
OCS_CLIENT_SUBSCRIPTION_CHANNEL ?= $(DEFAULT_CHANNEL)
OCS_CLIENT_SUBSCRIPTION_STARTINGCSV ?= $(OCS_CLIENT_BUNDLE_NAME).$(OCS_CLIENT_BUNDLE_IMG_TAG)
OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE ?= $(OPERATOR_CATALOGSOURCE)
OCS_CLIENT_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE ?= $(OPERATOR_CATALOGSOURCE_NAMESPACE)

IBM_SUBSCRIPTION_NAME ?= $(IBM_BUNDLE_NAME)
IBM_SUBSCRIPTION_PACKAGE ?= $(IBM_BUNDLE_NAME)
IBM_SUBSCRIPTION_CHANNEL ?= stable-v1.4
Expand Down

0 comments on commit f3575bb

Please sign in to comment.