Skip to content

Commit

Permalink
Revert "rgw: add vhost style support for rgw in ocs-op" and related
Browse files Browse the repository at this point in the history
Revert "Bug 2273553: initalise objectstore.spec.hosting for virtualHostnames"

This reverts commit f9d3ce8.
This reverts commit 1098627.

Signed-off-by: Blaine Gardner <[email protected]>
  • Loading branch information
BlaineEXE committed Jun 14, 2024
1 parent 3886d23 commit 2509d98
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 58 deletions.
3 changes: 1 addition & 2 deletions api/v1/storagecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,7 @@ type ManageCephObjectStores struct {
// 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])?)*$
StorageClassName string `json:"storageClassName,omitempty"`
VirtualHostnames []string `json:"virtualHostnames,omitempty"`
StorageClassName string `json:"storageClassName,omitempty"`
}

// ManageCephObjectStoreUsers defines how to reconcile CephObjectStoreUsers
Expand Down
5 changes: 0 additions & 5 deletions api/v1/zz_generated.deepcopy.go

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

4 changes: 0 additions & 4 deletions config/crd/bases/ocs.openshift.io_storageclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1813,10 +1813,6 @@ spec:
maxLength: 253
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
virtualHostnames:
items:
type: string
type: array
type: object
cephRBDMirror:
description: ManageCephRBDMirror defines how to reconcile Ceph
Expand Down
25 changes: 0 additions & 25 deletions controllers/storagecluster/cephobjectstores.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"

routev1 "github.com/openshift/api/route/v1"
ocsv1 "github.com/red-hat-storage/ocs-operator/api/v4/v1"
"github.com/red-hat-storage/ocs-operator/v4/controllers/defaults"
"github.com/red-hat-storage/ocs-operator/v4/controllers/platform"
Expand Down Expand Up @@ -202,30 +201,6 @@ func (r *StorageClusterReconciler) newCephObjectStoreInstances(initData *ocsv1.S
return nil, err
}

if len(initData.Spec.ManagedResources.CephObjectStores.VirtualHostnames) > 0 {
obj.Spec.Hosting = &cephv1.ObjectStoreHostingSpec{
DNSNames: initData.Spec.ManagedResources.CephObjectStores.VirtualHostnames,
}
route := &routev1.Route{}
err := r.Client.Get(context.TODO(), types.NamespacedName{Name: obj.Name, Namespace: obj.Namespace}, route)
if err != nil {
if errors.IsNotFound(err) {
r.Log.Info("Ceph RGW Route not found.", "CephRGWRoute", klog.KRef(obj.Namespace, obj.Name))
}
} else {
obj.Spec.Hosting.DNSNames = append(obj.Spec.Hosting.DNSNames, route.Spec.Host)
}
secureRoute := &routev1.Route{}
err = r.Client.Get(context.TODO(), types.NamespacedName{Name: obj.Name + "-secure", Namespace: obj.Namespace}, secureRoute)
if err != nil {
if errors.IsNotFound(err) {
r.Log.Info("Ceph RGW Route not found.", "CephRGWRoute", klog.KRef(obj.Namespace, obj.Name+"-secure"))
}
} else {
obj.Spec.Hosting.DNSNames = append(obj.Spec.Hosting.DNSNames, secureRoute.Spec.Host)
}
}

if initData.Spec.ManagedResources.CephObjectStores.HostNetwork != nil {
obj.Spec.Gateway.HostNetwork = initData.Spec.ManagedResources.CephObjectStores.HostNetwork
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1813,10 +1813,6 @@ spec:
maxLength: 253
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
virtualHostnames:
items:
type: string
type: array
type: object
cephRBDMirror:
description: ManageCephRBDMirror defines how to reconcile Ceph
Expand Down
4 changes: 0 additions & 4 deletions deploy/ocs-operator/manifests/storagecluster.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1812,10 +1812,6 @@ spec:
maxLength: 253
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
virtualHostnames:
items:
type: string
type: array
type: object
cephRBDMirror:
description: ManageCephRBDMirror defines how to reconcile Ceph
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.

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 2509d98

Please sign in to comment.