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 21, 2023
1 parent 6a6f49f commit df39e51
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 {

Check failure on line 202 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.20)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)

Check failure on line 202 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.20)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)

Check failure on line 202 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.20)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)

Check failure on line 202 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.20)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)

Check failure on line 202 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / go test (1.20)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)

Check failure on line 202 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.21)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)

Check failure on line 202 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.21)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)

Check failure on line 202 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.21)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)

Check failure on line 202 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.21)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)

Check failure on line 202 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / go test (1.21)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)
obj.Spec.Gateway.HostNetwork = initData.Spec.ManagedResources.CephObjectStores.HostNetwork

Check failure on line 203 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.20)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)) (typecheck)

Check failure on line 203 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.20)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork) (typecheck)

Check failure on line 203 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.20)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)) (typecheck)

Check failure on line 203 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / go test (1.20)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)

Check failure on line 203 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.21)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)) (typecheck)

Check failure on line 203 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.21)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork) (typecheck)

Check failure on line 203 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.21)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method HostNetwork)) (typecheck)

Check failure on line 203 in controllers/storagecluster/cephobjectstores.go

View workflow job for this annotation

GitHub Actions / go test (1.21)

initData.Spec.ManagedResources.CephObjectStores.HostNetwork undefined (type "github.com/red-hat-storage/ocs-operator/api/v4/v1".ManageCephObjectStores has no field or method 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 df39e51

Please sign in to comment.