Skip to content

Commit

Permalink
annotation: add annotation for STS support
Browse files Browse the repository at this point in the history
Added an annotation to odf-operator CSV for STS support.
Also, updated the noobaa subscription config to include
the `ROLEARN` env variable, which in turn can be utilised by the
noobaa operator to enable STS related features.

Signed-off-by: Nikhil-Ladha <[email protected]>
  • Loading branch information
Nikhil-Ladha committed Nov 20, 2023
1 parent 2daf93d commit b81375e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bundle/manifests/odf-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ metadata:
categories: Storage
console.openshift.io/plugins: '["odf-console"]'
containerImage: quay.io/ocs-dev/odf-operator:latest
createdAt: "2023-08-08T09:50:10Z"
createdAt: "2023-11-17T09:12:42Z"
description: OpenShift Data Foundation provides a common control plane for storage
solutions on OpenShift Container Platform.
features.operators.openshift.io/token-auth-aws: "true"
olm.properties: '[{"type": "olm.maxOpenShiftVersion", "value": "4.15"}]'
olm.skipRange: ""
operatorframework.io/initialization-resource: |-
Expand Down
1 change: 1 addition & 0 deletions config/manifests/bases/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ patchesStrategicMerge:
- odf-operator.csv.icon.yaml
- odf-operator.csv.card-description.yaml
commonAnnotations:
features.operators.openshift.io/token-auth-aws: "true"
olm.properties: '[{"type": "olm.maxOpenShiftVersion", "value": "4.15"}]'
olm.skipRange: ""
operators.operatorframework.io/operator-type: standalone
Expand Down
2 changes: 2 additions & 0 deletions controllers/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var (
"NOOBAA_SUBSCRIPTION_STARTINGCSV": "noobaa-operator.v5.14.0",
"NOOBAA_SUBSCRIPTION_CATALOGSOURCE": "odf-catalogsource",
"NOOBAA_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE": "openshift-marketplace",
"ROLEARN": "",

"OCS_SUBSCRIPTION_NAME": "ocs-operator",
"OCS_SUBSCRIPTION_PACKAGE": "ocs-operator",
Expand Down Expand Up @@ -68,6 +69,7 @@ var (
NoobaaSubscriptionStartingCSV = GetEnvOrDefault("NOOBAA_SUBSCRIPTION_STARTINGCSV")
NoobaaSubscriptionCatalogSource = GetEnvOrDefault("NOOBAA_SUBSCRIPTION_CATALOGSOURCE")
NoobaaSubscriptionCatalogSourceNamespace = GetEnvOrDefault("NOOBAA_SUBSCRIPTION_CATALOGSOURCE_NAMESPACE")
RoleArnValue = GetEnvOrDefault("ROLEARN")

CSIAddonsSubscriptionName = GetEnvOrDefault("CSIADDONS_SUBSCRIPTION_NAME")
CSIAddonsSubscriptionPackage = GetEnvOrDefault("CSIADDONS_SUBSCRIPTION_PACKAGE")
Expand Down
11 changes: 11 additions & 0 deletions controllers/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,17 @@ func GetStorageClusterSubscriptions() []*operatorv1alpha1.Subscription {
},
}

if RoleArnValue != "" {
noobaaSubscription.Spec.Config = &operatorv1alpha1.SubscriptionConfig{
Env: []corev1.EnvVar{
{
Name: "ROLEARN",
Value: RoleArnValue,
},
},
}
}

ocsSubscription := &operatorv1alpha1.Subscription{
ObjectMeta: metav1.ObjectMeta{
Name: OcsSubscriptionName,
Expand Down

0 comments on commit b81375e

Please sign in to comment.