Skip to content

Commit

Permalink
Merge pull request #2633 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…2632-to-release-4.16

Bug 2283797:[release-4.16] noobaa: provide denyHTTP option to NooBaa CR
  • Loading branch information
openshift-merge-bot[bot] authored May 29, 2024
2 parents f21b3c9 + a8ee948 commit 79ee747
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/v1/storagecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ type MultiCloudGatewaySpec struct {
// Allows Noobaa to connect to an external Postgres server
// +optional
ExternalPgConfig *ExternalPGSpec `json:"externalPgConfig,omitempty"`

// DenyHTTP (optional) if given will deny access to the NooBaa S3 service using HTTP (only HTTPS)
// +optional
DenyHTTP bool `json:"denyHTTP,omitempty"`
}

type ExternalPGSpec struct {
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/ocs.openshift.io_storageclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2254,6 +2254,10 @@ spec:
description: DbStorageClassName specifies the default storage
class for nooba-db pods
type: string
denyHTTP:
description: DenyHTTP (optional) if given will deny access to
the NooBaa S3 service using HTTP (only HTTPS)
type: boolean
disableLoadBalancerService:
description: DisableLoadBalancerService (optional) sets the service
type to ClusterIP instead of LoadBalancer
Expand Down
2 changes: 2 additions & 0 deletions controllers/storagecluster/noobaa_system_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ func (r *StorageClusterReconciler) setNooBaaDesiredState(nb *nbv1.NooBaa, sc *oc

// Override with MCG options specified in the storage cluster spec
if sc.Spec.MultiCloudGateway != nil {
nb.Spec.DenyHTTP = sc.Spec.MultiCloudGateway.DenyHTTP

dbStorageClass := sc.Spec.MultiCloudGateway.DbStorageClassName
if dbStorageClass != "" {
nb.Spec.DBStorageClass = &dbStorageClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2254,6 +2254,10 @@ spec:
description: DbStorageClassName specifies the default storage
class for nooba-db pods
type: string
denyHTTP:
description: DenyHTTP (optional) if given will deny access to
the NooBaa S3 service using HTTP (only HTTPS)
type: boolean
disableLoadBalancerService:
description: DisableLoadBalancerService (optional) sets the service
type to ClusterIP instead of LoadBalancer
Expand Down
4 changes: 4 additions & 0 deletions deploy/ocs-operator/manifests/storagecluster.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2253,6 +2253,10 @@ spec:
description: DbStorageClassName specifies the default storage
class for nooba-db pods
type: string
denyHTTP:
description: DenyHTTP (optional) if given will deny access to
the NooBaa S3 service using HTTP (only HTTPS)
type: boolean
disableLoadBalancerService:
description: DisableLoadBalancerService (optional) sets the service
type to ClusterIP instead of LoadBalancer
Expand Down

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

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

0 comments on commit 79ee747

Please sign in to comment.