Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing latest changes from main for ocs-client-operator #267

Merged
merged 12 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bundle/manifests/ocs-client-operator-config_v1_configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apiVersion: v1
data:
generateRbdOMapInfo: "true"
kind: ConfigMap
metadata:
name: ocs-client-operator-config
12 changes: 9 additions & 3 deletions bundle/manifests/ocs-client-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
categories: Storage
console.openshift.io/plugins: '["odf-client-console"]'
containerImage: quay.io/ocs-dev/ocs-client-operator:latest
createdAt: "2024-10-29T07:06:57Z"
createdAt: "2024-11-14T15:13:37Z"
description: OpenShift Data Foundation client operator enables consumption of
storage services from a remote centralized OpenShift Data Foundation provider
cluster.
Expand All @@ -21,7 +21,7 @@ metadata:
support: Red Hat
labels:
operatorframework.io/arch.amd64: supported
name: ocs-client-operator.v4.17.0
name: ocs-client-operator.v4.18.0
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -397,6 +397,12 @@ spec:
verbs:
- get
- list
- apiGroups:
- quota.openshift.io
resources:
- clusterresourcequotas
verbs:
- get
serviceAccountName: ocs-client-operator-status-reporter
deployments:
- label:
Expand Down Expand Up @@ -661,4 +667,4 @@ spec:
maturity: alpha
provider:
name: Red Hat
version: 4.17.0
version: 4.18.0
6 changes: 3 additions & 3 deletions bundle/metadata/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ dependencies:
- type: olm.package
value:
packageName: csi-addons
version: '>=0.9.1'
version: '>=0.10.0'
- type: olm.package
value:
packageName: cephcsi-operator
version: 4.17.0
version: 4.18.0
- type: olm.package
value:
packageName: noobaa-operator
version: ">=5.16.0 <=5.17.0"
version: ">=5.17.0 <=5.18.0"
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
// to ensure that exec-entrypoint and run can make use of them.
csiopv1a1 "github.com/ceph/ceph-csi-operator/api/v1alpha1"
snapapi "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
snapapi "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
nbapis "github.com/noobaa/noobaa-operator/v5/pkg/apis"
configv1 "github.com/openshift/api/config/v1"
consolev1 "github.com/openshift/api/console/v1"
Expand Down
4 changes: 3 additions & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ configMapGenerator:
- files:
- controller_manager_config.yaml
name: manager-config
- name: config
- literals:
- generateRbdOMapInfo=true
name: config

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand Down
6 changes: 3 additions & 3 deletions config/metadata/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ dependencies:
- type: olm.package
value:
packageName: csi-addons
version: '>=0.9.1'
version: '>=0.10.0'
- type: olm.package
value:
packageName: cephcsi-operator
version: 4.17.0
version: 4.18.0
- type: olm.package
value:
packageName: noobaa-operator
version: ">=5.16.0 <=5.17.0"
version: ">=5.17.0 <=5.18.0"
6 changes: 6 additions & 0 deletions config/rbac/status-reporter-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ rules:
verbs:
- get
- list
- apiGroups:
- quota.openshift.io
resources:
- clusterresourcequotas
verbs:
- get
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ exclude (
require (
github.com/ceph/ceph-csi-operator/api v0.0.0-20240812072523-4d50cf3a32a0
github.com/go-logr/logr v1.4.2
github.com/kubernetes-csi/external-snapshotter/client/v6 v6.3.0
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.0.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.34.1
github.com/openshift/api v0.0.0-20240828125535-01b3675ba7b3
github.com/operator-framework/api v0.27.0
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.76.0
github.com/ramendr/ramen/api v0.0.0-20241001141243-29d6f22ad237
github.com/red-hat-storage/ocs-client-operator/api v0.0.0-00010101000000-000000000000
github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20240917115204-741b9d6f263d
github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20241113175552-201c936738fd
github.com/stretchr/testify v1.9.0
google.golang.org/grpc v1.66.0
k8s.io/api v0.31.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kube-object-storage/lib-bucket-provisioner v0.0.0-20221122204822-d1a8c34382f1 h1:dQEHhTfi+bSIOSViQrKY9PqJvZenD6tFz+3lPzux58o=
github.com/kube-object-storage/lib-bucket-provisioner v0.0.0-20221122204822-d1a8c34382f1/go.mod h1:my+EVjOJLeQ9lUR9uVkxRvNNkhO2saSGIgzV8GZT9HY=
github.com/kubernetes-csi/external-snapshotter/client/v6 v6.3.0 h1:qS4r4ljINLWKJ9m9Ge3Q3sGZ/eIoDVDT2RhAdQFHb1k=
github.com/kubernetes-csi/external-snapshotter/client/v6 v6.3.0/go.mod h1:oGXx2XTEzs9ikW2V6IC1dD8trgjRsS/Mvc2JRiC618Y=
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.0.0 h1:mjQG0Vakr2h246kEDR85U8y8ZhPgT3bguTCajRa/jaw=
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.0.0/go.mod h1:E3vdYxHj2C2q6qo8/Da4g7P+IcwqRZyy3gJBzYybV9Y=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
Expand Down Expand Up @@ -325,8 +325,8 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
github.com/ramendr/ramen/api v0.0.0-20241001141243-29d6f22ad237 h1:ig6ePD0yopC5Qi5BRmhsIsKaOkdsGXTSmG3HTYIpquo=
github.com/ramendr/ramen/api v0.0.0-20241001141243-29d6f22ad237/go.mod h1:nO6VM/+PEhcPGyFIQJdhY6ip822cA61PAy/s6IjenAA=
github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20240917115204-741b9d6f263d h1:RK/zCM6xRwyeJ06u6xSLEwl5Q1g/6EZRQmSgzbqleT0=
github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20240917115204-741b9d6f263d/go.mod h1:t9GJk69TGXABBF8fFPB+ImpbA9mJyRS86wW6+Qn8xHo=
github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20241113175552-201c936738fd h1:WIdoP1CE/8yl9tnHFVY7g/h4ZDFk+2Y9Ri0PrHXfx1g=
github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20241113175552-201c936738fd/go.mod h1:t9GJk69TGXABBF8fFPB+ImpbA9mJyRS86wW6+Qn8xHo=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
Expand Down
8 changes: 4 additions & 4 deletions hack/make-bundle-vars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 4.17.0
VERSION ?= 4.18.0

# DEFAULT_CHANNEL defines the default channel used in the bundle.
# Add a new line here if you would like to change its default config. (E.g DEFAULT_CHANNEL = "stable")
Expand Down Expand Up @@ -49,12 +49,12 @@ IMAGE_TAG ?= latest
IMAGE_NAME ?= ocs-client-operator
BUNDLE_IMAGE_NAME ?= $(IMAGE_NAME)-bundle
CSI_ADDONS_BUNDLE_IMAGE_NAME ?= k8s-bundle
CSI_ADDONS_BUNDLE_IMAGE_TAG ?= v0.9.1
CSI_ADDONS_BUNDLE_IMAGE_TAG ?= v0.10.0
CATALOG_IMAGE_NAME ?= $(IMAGE_NAME)-catalog

NOOBAA_BUNDLE_NAME ?= noobaa-operator
NOOBAA_BUNDLE_IMG_NAME ?= $(NOOBAA_BUNDLE_NAME)-bundle
NOOBAA_BUNDLE_VERSION ?= v5.17.0
NOOBAA_BUNDLE_VERSION ?= v5.18.0
NOOBAA_BUNDLE_IMG_TAG ?= master-20240514
NOOBAA_BUNDLE_IMG_NAMESPACE ?= noobaa
NOOBAA_BUNDLE_IMG ?= $(IMAGE_REGISTRY)/$(NOOBAA_BUNDLE_IMG_NAMESPACE)/$(NOOBAA_BUNDLE_IMG_NAME):$(NOOBAA_BUNDLE_IMG_TAG)
Expand Down Expand Up @@ -106,7 +106,7 @@ endif

# csi-addons dependencies
CSI_ADDONS_PACKAGE_NAME ?= csi-addons
CSI_ADDONS_PACKAGE_VERSION ?= 0.9.1
CSI_ADDONS_PACKAGE_VERSION ?= 0.10.0

# The following variables are here as a convenience for developers so we don't have
# to retype things, because we're lazy.
Expand Down
7 changes: 7 additions & 0 deletions internal/controller/operatorconfigmap_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const (
manageNoobaaSubKey = "manageNoobaaSubscription"
subscriptionLabelKey = "managed-by"
subscriptionLabelValue = "webhook.subscription.ocs.openshift.io"
generateRbdOMapInfoKey = "generateRbdOMapInfo"

operatorConfigMapFinalizer = "ocs-client-operator.ocs.openshift.io/storageused"
subPackageIndexName = "index:subscriptionPackage"
Expand Down Expand Up @@ -341,6 +342,7 @@ func (c *OperatorConfigMapReconciler) reconcileDelegatedCSI() error {
if err := c.own(rbdDriver); err != nil {
return fmt.Errorf("failed to own csi rbd driver: %v", err)
}
rbdDriver.Spec.GenerateOMapInfo = ptr.To(c.shouldGenerateRBDOmapInfo())
return nil
}); err != nil {
return fmt.Errorf("failed to reconcile rbd driver: %v", err)
Expand Down Expand Up @@ -507,6 +509,11 @@ func (c *OperatorConfigMapReconciler) getNoobaaSubManagementConfig() bool {
return val
}

func (c *OperatorConfigMapReconciler) shouldGenerateRBDOmapInfo() bool {
valAsString := strings.ToLower(c.operatorConfigMap.Data[generateRbdOMapInfoKey])
return valAsString == strconv.FormatBool(true)
}

func (c *OperatorConfigMapReconciler) get(obj client.Object, opts ...client.GetOption) error {
return c.Get(c.ctx, client.ObjectKeyFromObject(obj), obj, opts...)
}
Expand Down
Loading
Loading