Skip to content

Commit

Permalink
Added network configuration setting for RGW
Browse files Browse the repository at this point in the history
Signed-off-by: Rohan Gupta <[email protected]>
  • Loading branch information
rohan47 committed Dec 13, 2023
1 parent f2da20a commit 9a14d40
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 9 deletions.
1 change: 1 addition & 0 deletions api/v1/storagecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ type ManageCephObjectStores struct {
DisableStorageClass bool `json:"disableStorageClass,omitempty"`
GatewayInstances int `json:"gatewayInstances,omitempty"`
DisableRoute bool `json:"disableRoute,omitempty"`
HostNetwork *bool `json:"hostNetwork,omitempty"`
// StorageClassName specifies the name of the storage class created for ceph obc's
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
Expand Down
9 changes: 7 additions & 2 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions config/crd/bases/ocs.openshift.io_storageclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,8 @@ spec:
type: boolean
gatewayInstances:
type: integer
hostNetwork:
type: boolean
reconcileStrategy:
type: string
storageClassName:
Expand Down
4 changes: 2 additions & 2 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: ocs-dev/ocs-operator
newName: quay.io/ocs-dev/ocs-operator
newTag: latest
newName: quay.io/rohan47/ocs-operator
newTag: 11Decbuild1
5 changes: 5 additions & 0 deletions controllers/storagecluster/cephobjectstores.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ func (r *StorageClusterReconciler) newCephObjectStoreInstances(initData *ocsv1.S
r.Log.Error(err, "Failed to set ControllerReference for CephObjectStore.", "CephObjectStore", klog.KRef(obj.Namespace, obj.Name))
return nil, err
}

if initData.Spec.ManagedResources.CephObjectStores.HostNetwork != nil {
obj.Spec.Gateway.HostNetwork = initData.Spec.ManagedResources.CephObjectStores.HostNetwork
}

// if kmsConfig is not 'nil', add the KMS details to ObjectStore spec
if kmsConfigMap != nil {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,8 @@ spec:
type: boolean
gatewayInstances:
type: integer
hostNetwork:
type: boolean
reconcileStrategy:
type: string
storageClassName:
Expand Down
2 changes: 1 addition & 1 deletion deploy/csv-templates/ocs-operator.csv.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
image: quay.io/ocs-dev/ocs-operator:latest
image: quay.io/rohan47/ocs-operator:11Decbuild1
imagePullPolicy: Always
name: ocs-operator
readinessProbe:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3085,12 +3085,12 @@ spec:
- name: NOOBAA_DB_IMAGE
value: docker.io/centos/postgresql-12-centos8
- name: PROVIDER_API_SERVER_IMAGE
value: quay.io/ocs-dev/ocs-operator:latest
value: quay.io/rohan47/ocs-operator:11Decbuild1
- name: OPERATOR_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/ocs-dev/ocs-operator:latest
image: quay.io/rohan47/ocs-operator:11Decbuild1
imagePullPolicy: Always
name: ocs-operator
readinessProbe:
Expand Down Expand Up @@ -3292,7 +3292,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/ocs-dev/ocs-metrics-exporter:latest
image: quay.io/rohan47/ocs-metrics-exporter:11Decbuild1
name: ocs-metrics-exporter
ports:
- containerPort: 8080
Expand Down Expand Up @@ -3625,6 +3625,6 @@ spec:
name: csiaddons-sidecar
- image: quay.io/ocs-dev/ocs-must-gather:latest
name: ocs-must-gather
- image: quay.io/ocs-dev/ocs-metrics-exporter:latest
- image: quay.io/rohan47/ocs-metrics-exporter:11Decbuild1
name: ocs-metrics-exporter
version: 4.15.0
2 changes: 2 additions & 0 deletions deploy/ocs-operator/manifests/storagecluster.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,8 @@ spec:
type: boolean
gatewayInstances:
type: integer
hostNetwork:
type: boolean
reconcileStrategy:
type: string
storageClassName:
Expand Down

0 comments on commit 9a14d40

Please sign in to comment.