Skip to content

Commit

Permalink
Merge pull request #463 from openshift-cherrypick-robot/cherry-pick-4…
Browse files Browse the repository at this point in the history
…39-to-release-4.17

[release-4.17] bundle: add new OLM dependencie ceph csi operator
  • Loading branch information
openshift-merge-bot[bot] authored Aug 13, 2024
2 parents b299e50 + e55eaec commit 59029bf
Show file tree
Hide file tree
Showing 13 changed files with 204 additions and 8 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ CSIADDONS_SUBSCRIPTION_CHANNEL=$(CSIADDONS_SUBSCRIPTION_CHANNEL)
CSIADDONS_SUBSCRIPTION_STARTINGCSV=$(CSIADDONS_SUBSCRIPTION_STARTINGCSV)
CSIADDONS_SUBSCRIPTION_CATALOGSOURCE=$(CSIADDONS_SUBSCRIPTION_CATALOGSOURCE)
CSIADDONS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE=$(CSIADDONS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE)
CEPHCSI_SUBSCRIPTION_NAME=$(CEPHCSI_SUBSCRIPTION_NAME)
CEPHCSI_SUBSCRIPTION_PACKAGE=$(CEPHCSI_SUBSCRIPTION_PACKAGE)
CEPHCSI_SUBSCRIPTION_CHANNEL=$(CEPHCSI_SUBSCRIPTION_CHANNEL)
CEPHCSI_SUBSCRIPTION_STARTINGCSV=$(CEPHCSI_SUBSCRIPTION_STARTINGCSV)
CEPHCSI_SUBSCRIPTION_CATALOGSOURCE=$(CEPHCSI_SUBSCRIPTION_CATALOGSOURCE)
CEPHCSI_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE=$(CEPHCSI_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE)
OCS_SUBSCRIPTION_NAME=$(OCS_SUBSCRIPTION_NAME)
OCS_SUBSCRIPTION_PACKAGE=$(OCS_SUBSCRIPTION_PACKAGE)
OCS_SUBSCRIPTION_CHANNEL=$(OCS_SUBSCRIPTION_CHANNEL)
Expand Down Expand Up @@ -196,6 +202,7 @@ catalog: opm ## Generate catalog manifests and then validate generated files.
$(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
$(OPM) render --output=yaml $(CEPHCSI_BUNDLE_IMG) $(OPM_RENDER_OPTS) > catalog/cephcsi.yaml
$(OPM) render --output=yaml $(ROOK_BUNDLE_IMG) $(OPM_RENDER_OPTS) > catalog/rook.yaml
$(OPM) render --output=yaml $(PROMETHEUS_BUNDLE_IMG) $(OPM_RENDER_OPTS) > catalog/prometheus.yaml
$(OPM) render --output=yaml $(RECIPE_BUNDLE_IMG) $(OPM_RENDER_OPTS) > catalog/recipe.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
apiVersion: v1
data:
CEPHCSI_SUBSCRIPTION_CATALOGSOURCE: odf-catalogsource
CEPHCSI_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE: openshift-marketplace
CEPHCSI_SUBSCRIPTION_CHANNEL: alpha
CEPHCSI_SUBSCRIPTION_NAME: cephcsi-operator
CEPHCSI_SUBSCRIPTION_PACKAGE: cephcsi-operator
CEPHCSI_SUBSCRIPTION_STARTINGCSV: cephcsi-operator.v4.17.0
CSIADDONS_SUBSCRIPTION_CATALOGSOURCE: odf-catalogsource
CSIADDONS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE: openshift-marketplace
CSIADDONS_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-05-21T10:23:39Z"
createdAt: "2024-08-13T12:37:31Z"
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 @@ -19,6 +19,10 @@ dependencies:
value:
packageName: csi-addons
version: ">=0.7.0 <=0.8.0"
- type: olm.package
value:
packageName: cephcsi-operator
version: ">=4.16.0 <=4.17.0"
- type: olm.package
value:
packageName: odf-prometheus-operator
Expand Down
96 changes: 96 additions & 0 deletions catalog/cephcsi.yaml

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions catalog/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ name: alpha
entries:
- name: csi-addons.v0.8.0

---
defaultChannel: alpha
name: cephcsi-operator
schema: olm.package
---
schema: olm.channel
package: cephcsi-operator
name: alpha
entries:
- name: cephcsi-operator.v4.17.0

---
defaultChannel: stable-v1.5
name: ibm-storage-odf-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 @@ -10,6 +10,12 @@ CSIADDONS_SUBSCRIPTION_CHANNEL=alpha
CSIADDONS_SUBSCRIPTION_STARTINGCSV=csi-addons.v0.8.0
CSIADDONS_SUBSCRIPTION_CATALOGSOURCE=odf-catalogsource
CSIADDONS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE=openshift-marketplace
CEPHCSI_SUBSCRIPTION_NAME=cephcsi-operator
CEPHCSI_SUBSCRIPTION_PACKAGE=cephcsi-operator
CEPHCSI_SUBSCRIPTION_CHANNEL=alpha
CEPHCSI_SUBSCRIPTION_STARTINGCSV=cephcsi-operator.v4.17.0
CEPHCSI_SUBSCRIPTION_CATALOGSOURCE=odf-catalogsource
CEPHCSI_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE=openshift-marketplace
OCS_SUBSCRIPTION_NAME=ocs-operator
OCS_SUBSCRIPTION_PACKAGE=ocs-operator
OCS_SUBSCRIPTION_CHANNEL=alpha
Expand Down
14 changes: 14 additions & 0 deletions controllers/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ var (
"CSIADDONS_SUBSCRIPTION_CATALOGSOURCE": "odf-catalogsource",
"CSIADDONS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE": "openshift-marketplace",

"CEPHCSI_SUBSCRIPTION_NAME": "cephcsi-operator",
"CEPHCSI_SUBSCRIPTION_PACKAGE": "cephcsi-operator",
"CEPHCSI_SUBSCRIPTION_CHANNEL": "alpha",
"CEPHCSI_SUBSCRIPTION_STARTINGCSV": "cephcsi-operator.v4.17.0",
"CEPHCSI_SUBSCRIPTION_CATALOGSOURCE": "odf-catalogsource",
"CEPHCSI_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 Expand Up @@ -111,6 +118,13 @@ var (
CSIAddonsSubscriptionCatalogSource = GetEnvOrDefault("CSIADDONS_SUBSCRIPTION_CATALOGSOURCE")
CSIAddonsSubscriptionCatalogSourceNamespace = GetEnvOrDefault("CSIADDONS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE")

CephCSISubscriptionName = GetEnvOrDefault("CEPHCSI_SUBSCRIPTION_NAME")
CephCSISubscriptionPackage = GetEnvOrDefault("CEPHCSI_SUBSCRIPTION_PACKAGE")
CephCSISubscriptionChannel = GetEnvOrDefault("CEPHCSI_SUBSCRIPTION_CHANNEL")
CephCSISubscriptionStartingCSV = GetEnvOrDefault("CEPHCSI_SUBSCRIPTION_STARTINGCSV")
CephCSISubscriptionCatalogSource = GetEnvOrDefault("CEPHCSI_SUBSCRIPTION_CATALOGSOURCE")
CephCSISubscriptionCatalogSourceNamespace = GetEnvOrDefault("CEPHCSI_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE")

IbmSubscriptionName = GetEnvOrDefault("IBM_SUBSCRIPTION_NAME")
IbmSubscriptionPackage = GetEnvOrDefault("IBM_SUBSCRIPTION_PACKAGE")
IbmSubscriptionChannel = GetEnvOrDefault("IBM_SUBSCRIPTION_CHANNEL")
Expand Down
32 changes: 29 additions & 3 deletions controllers/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ func CheckExistingSubscriptions(cli client.Client, desiredSubscription *operator

var isProvider bool
if desiredSubscription.Spec.Package == OcsClientSubscriptionPackage ||
desiredSubscription.Spec.Package == CSIAddonsSubscriptionPackage {
desiredSubscription.Spec.Package == CSIAddonsSubscriptionPackage ||
desiredSubscription.Spec.Package == CephCSISubscriptionPackage {

isProvider, err = isProviderMode(cli)
if err != nil {
Expand Down Expand Up @@ -269,7 +270,7 @@ func GetVendorCsvNames(cli client.Client, kind odfv1alpha1.StorageKind) ([]strin
}

if !isProvider {
csvNames = append(csvNames, OcsClientSubscriptionStartingCSV, CSIAddonsSubscriptionStartingCSV)
csvNames = append(csvNames, OcsClientSubscriptionStartingCSV, CSIAddonsSubscriptionStartingCSV, CephCSISubscriptionStartingCSV)
}

// In provider mode, upgrades of the ocs-client-operator and csiaddons are managed by the provider, not the odf-operator.
Expand Down Expand Up @@ -502,6 +503,31 @@ func GetStorageClusterSubscriptions() []*operatorv1alpha1.Subscription {
},
}

cephCsiSubscription := &operatorv1alpha1.Subscription{
ObjectMeta: metav1.ObjectMeta{
Name: CephCSISubscriptionName,
Namespace: OperatorNamespace,
},
Spec: &operatorv1alpha1.SubscriptionSpec{
CatalogSource: CephCSISubscriptionCatalogSource,
CatalogSourceNamespace: CephCSISubscriptionCatalogSourceNamespace,
Package: CephCSISubscriptionPackage,
Channel: CephCSISubscriptionChannel,
StartingCSV: CephCSISubscriptionStartingCSV,
InstallPlanApproval: operatorv1alpha1.ApprovalAutomatic,
Config: &operatorv1alpha1.SubscriptionConfig{
Tolerations: []corev1.Toleration{
{
Key: "node.ocs.openshift.io/storage",
Operator: "Equal",
Value: "true",
Effect: "NoSchedule",
},
},
},
},
}

rookSubscription := &operatorv1alpha1.Subscription{
ObjectMeta: metav1.ObjectMeta{
Name: RookSubscriptionName,
Expand Down Expand Up @@ -548,7 +574,7 @@ func GetStorageClusterSubscriptions() []*operatorv1alpha1.Subscription {
}

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

// GetFlashSystemClusterSubscription return subscription for FlashSystemCluster
Expand Down
13 changes: 11 additions & 2 deletions e2e/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ var (
NoobaClusterServiceVersion string
// CsiaddonsClusterServiceVersion is the name of Csiaddons csv
CsiaddonsClusterServiceVersion string
// CephCsiClusterServiceVersion is the name of Csiaddons csv
CephCsiClusterServiceVersion string
// RookClusterServiceVersion is the name of Rook csv
RookClusterServiceVersion string
// PrometheusClusterService version is the name of the Prometheus csv
Expand Down Expand Up @@ -55,6 +57,7 @@ func init() {
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(&CephCsiClusterServiceVersion, "cephcsi-cluster-service-version", "", "The CEPH CSI CSV name which needs to verified")
flag.StringVar(&RookClusterServiceVersion, "rook-cluster-service-version", "", "The Rook CSV name which needs to verified")
flag.StringVar(&PrometheusClusterServiceVersion, "prometheus-cluster-service-version", "", "The Prometheus CSV name which needs to verified")
flag.StringVar(&RecipeClusterServiceVersion, "recipe-cluster-service-version", "", "The Recipe CSV name which needs to verified")
Expand All @@ -63,9 +66,11 @@ func init() {
verifyFlags()

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

dm, err := deploymanager.NewDeployManager()
if err != nil {
Expand Down Expand Up @@ -104,6 +109,10 @@ func verifyFlags() {
panic("csiaddons-cluster-service-version is not provided")
}

if CephCsiClusterServiceVersion == "" {
panic("cephcsi-cluster-service-version is not provided")
}

if RookClusterServiceVersion == "" {
panic("rook-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 @@ -12,6 +12,7 @@ cd e2e/odf && ${GINKGO} build && ./odf.test \
--ocs-client-cluster-service-version=${OCS_CLIENT_SUBSCRIPTION_STARTINGCSV} \
--nooba-cluster-service-version=${NOOBAA_SUBSCRIPTION_STARTINGCSV} \
--csiaddons-cluster-service-version=${CSIADDONS_SUBSCRIPTION_STARTINGCSV} \
--cephcsi-cluster-service-version=${CEPHCSI_SUBSCRIPTION_STARTINGCSV} \
--rook-cluster-service-version=${ROOK_SUBSCRIPTION_STARTINGCSV} \
--prometheus-cluster-service-version=${PROMETHEUS_SUBSCRIPTION_STARTINGCSV} \
--recipe-cluster-service-version=${RECIPE_SUBSCRIPTION_STARTINGCSV}
1 change: 1 addition & 0 deletions hack/install-odf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ oc wait --timeout=5m --for jsonpath='{.status.phase}'=Succeeded -n "$INSTALL_NAM
oc wait --timeout=5m --for condition=Available -n "$INSTALL_NAMESPACE" deployment \
csi-addons-controller-manager \
noobaa-operator \
ocscsi-controller-manager \
ocs-client-operator-console \
ocs-client-operator-controller-manager \
ocs-operator \
Expand Down
19 changes: 17 additions & 2 deletions hack/make-bundle-vars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ CSIADDONS_BUNDLE_IMG_TAG ?= v0.8.0
CSIADDONS_BUNDLE_IMG_LOCATION ?= quay.io/csiaddons
CSIADDONS_BUNDLE_IMG ?= $(CSIADDONS_BUNDLE_IMG_LOCATION)/$(CSIADDONS_BUNDLE_IMG_NAME):$(CSIADDONS_BUNDLE_IMG_TAG)

CEPHCSI_BUNDLE_NAME ?= cephcsi-operator
CEPHCSI_BUNDLE_IMG_NAME ?= $(CEPHCSI_BUNDLE_NAME)-bundle
CEPHCSI_BUNDLE_VERSION ?= v4.17.0
CEPHCSI_BUNDLE_IMG_TAG ?= main-ecba5f6
CEPHCSI_BUNDLE_IMG_LOCATION ?= quay.io/ocs-dev
CEPHCSI_BUNDLE_IMG ?= $(CEPHCSI_BUNDLE_IMG_LOCATION)/$(CEPHCSI_BUNDLE_IMG_NAME):$(CEPHCSI_BUNDLE_IMG_TAG)

IBM_BUNDLE_NAME ?= ibm-storage-odf-operator
IBM_BUNDLE_IMG_NAME ?= $(IBM_BUNDLE_NAME)-bundle
IBM_BUNDLE_VERSION ?= 1.5.0
Expand Down Expand Up @@ -136,7 +143,7 @@ RECIPE_BUNDLE_IMG ?= $(RECIPE_BUNDLE_IMG_LOCATION)/$(RECIPE_BUNDLE_IMG_NAME):$(R
# 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) $(OCS_CLIENT_BUNDLE_IMG) $(IBM_BUNDLE_IMG) $(NOOBAA_BUNDLE_IMG) \
$(CSIADDONS_BUNDLE_IMG) $(ROOK_BUNDLE_IMG) $(PROMETHEUS_BUNDLE_IMG) $(RECIPE_BUNDLE_IMG_TAG)
$(CSIADDONS_BUNDLE_IMG) $(CEPHCSI_BUNDLE_IMG) $(ROOK_BUNDLE_IMG) $(PROMETHEUS_BUNDLE_IMG) $(RECIPE_BUNDLE_IMG_TAG)

# Set CATALOG_BASE_IMG to an existing catalog image tag to add $BUNDLE_IMGS to that image.
ifneq ($(origin CATALOG_BASE_IMG), undefined)
Expand All @@ -162,6 +169,13 @@ CSIADDONS_SUBSCRIPTION_STARTINGCSV ?= $(CSIADDONS_BUNDLE_NAME).$(CSIADDONS_BUNDL
CSIADDONS_SUBSCRIPTION_CATALOGSOURCE ?= $(OPERATOR_CATALOGSOURCE)
CSIADDONS_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE ?= $(OPERATOR_CATALOGSOURCE_NAMESPACE)

CEPHCSI_SUBSCRIPTION_NAME ?= $(CEPHCSI_BUNDLE_NAME)
CEPHCSI_SUBSCRIPTION_PACKAGE ?= $(CEPHCSI_BUNDLE_NAME)
CEPHCSI_SUBSCRIPTION_CHANNEL ?= $(DEFAULT_CHANNEL)
CEPHCSI_SUBSCRIPTION_STARTINGCSV ?= $(CEPHCSI_BUNDLE_NAME).$(CEPHCSI_BUNDLE_VERSION)
CEPHCSI_SUBSCRIPTION_CATALOGSOURCE ?= $(OPERATOR_CATALOGSOURCE)
CEPHCSI_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE ?= $(OPERATOR_CATALOGSOURCE_NAMESPACE)

OCS_SUBSCRIPTION_NAME ?= $(OCS_BUNDLE_NAME)
OCS_SUBSCRIPTION_PACKAGE ?= $(OCS_BUNDLE_NAME)
OCS_SUBSCRIPTION_CHANNEL ?= $(DEFAULT_CHANNEL)
Expand Down Expand Up @@ -205,7 +219,8 @@ RECIPE_SUBSCRIPTION_CATALOGSOURCE ?= $(OPERATOR_CATALOGSOURCE)
RECIPE_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE ?= $(OPERATOR_CATALOGSOURCE_NAMESPACE)

STARTING_CSVS ?= "$(IMAGE_NAME).v$(VERSION) $(OCS_SUBSCRIPTION_STARTINGCSV) $(ROOK_SUBSCRIPTION_STARTINGCSV) $(NOOBAA_SUBSCRIPTION_STARTINGCSV) \
$(CSIADDONS_SUBSCRIPTION_STARTINGCSV) $(OCS_CLIENT_SUBSCRIPTION_STARTINGCSV) $(PROMETHEUS_SUBSCRIPTION_STARTINGCSV) $(RECIPE_SUBSCRIPTION_STARTINGCSV)"
$(CSIADDONS_SUBSCRIPTION_STARTINGCSV) $(CEPHCSI_SUBSCRIPTION_STARTINGCSV) $(OCS_CLIENT_SUBSCRIPTION_STARTINGCSV) \
$(PROMETHEUS_SUBSCRIPTION_STARTINGCSV) $(RECIPE_SUBSCRIPTION_STARTINGCSV)"

# kube rbac proxy image variables
CLUSTER_ENV ?= openshift
Expand Down

0 comments on commit 59029bf

Please sign in to comment.