Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert rgw vhost dnsnames feature #2666

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading