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 585fa14
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 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
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: 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 585fa14

Please sign in to comment.