Skip to content

Commit

Permalink
Remove pre-rollout check validating ScyllaDB version
Browse files Browse the repository at this point in the history
Minimal versions which this check validated are already EOL, and we don't claim we support them in our documentation.
  • Loading branch information
zimnx committed Jul 23, 2024
1 parent 446cd5c commit 42318e6
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 86 deletions.
6 changes: 0 additions & 6 deletions pkg/controller/scyllacluster/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,6 @@ func (scc *Controller) sync(ctx context.Context, key string) error {
return scc.updateStatus(ctx, sc, status)
}

err = runPreRolloutChecks(sc, scc.eventRecorder)
if err != nil {
statusUpdateErr := scc.updateStatus(ctx, sc, status)
return utilerrors.NewAggregate([]error{statusUpdateErr, fmt.Errorf("ScyllaCluster %q did not pass pre-rollout check: %w", naming.ObjRef(sc), err)})
}

var errs []error

err = controllerhelpers.RunSync(
Expand Down
17 changes: 0 additions & 17 deletions pkg/controller/scyllacluster/sync_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,23 +188,6 @@ func (scc *Controller) syncServices(
statefulSets map[string]*appsv1.StatefulSet,
jobs map[string]*batchv1.Job,
) ([]metav1.Condition, error) {
if sc.Spec.ExposeOptions != nil && sc.Spec.ExposeOptions.NodeService != nil && sc.Spec.ExposeOptions.NodeService.Type != scyllav1.NodeServiceTypeClusterIP {
supportsExposing, err := scyllafeatures.Supports(sc, scyllafeatures.ExposingScyllaClusterViaServiceOtherThanClusterIP)
if err != nil {
return nil, fmt.Errorf("can't determine if ScyllaDB version %q supports exposing via Service other than ClusterIP: %w", sc.Spec.Version, err)
}

if !supportsExposing {
scc.eventRecorder.Eventf(
sc,
corev1.EventTypeWarning,
"InvalidScyllaDBVersion",
fmt.Sprintf("Requested ScyllaDB version %q does not support exposing via Service other than ClusterIP, use the latest one", sc.Spec.Version),
)
return nil, fmt.Errorf("requested ScyllaDB version %q does not support exposing via Service other than ClusterIP, use the latest one", sc.Spec.Version)
}
}

requiredServices, err := scc.makeServices(sc, services, jobs)
if err != nil {
return nil, fmt.Errorf("can't make services: %w", err)
Expand Down
21 changes: 0 additions & 21 deletions pkg/controller/scyllacluster/sync_statefulsets.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/scylladb/scylla-operator/pkg/pointer"
"github.com/scylladb/scylla-operator/pkg/resourceapply"
"github.com/scylladb/scylla-operator/pkg/scyllaclient"
"github.com/scylladb/scylla-operator/pkg/scyllafeatures"
"github.com/scylladb/scylla-operator/pkg/util/hash"
"github.com/scylladb/scylla-operator/pkg/util/parallel"
"github.com/scylladb/scylla-operator/pkg/util/slices"
Expand Down Expand Up @@ -482,26 +481,6 @@ func (scc *Controller) syncStatefulSets(
var err error
var progressingConditions []metav1.Condition

if sc.Spec.ExposeOptions != nil && sc.Spec.ExposeOptions.BroadcastOptions != nil {
if sc.Spec.ExposeOptions.BroadcastOptions.Clients.Type != scyllav1.BroadcastAddressTypeServiceClusterIP ||
sc.Spec.ExposeOptions.BroadcastOptions.Nodes.Type != scyllav1.BroadcastAddressTypeServiceClusterIP {
supportsExposing, err := scyllafeatures.Supports(sc, scyllafeatures.ExposingScyllaClusterViaServiceOtherThanClusterIP)
if err != nil {
return nil, fmt.Errorf("can't determine if ScyllaDB version %q supports exposing via Service other than ClusterIP: %w", sc.Spec.Version, err)
}

if !supportsExposing {
scc.eventRecorder.Eventf(
sc,
corev1.EventTypeWarning,
"InvalidScyllaDBVersion",
fmt.Sprintf("Requested ScyllaDB version %q does not support broadcasting other address than ClusterIP, use the latest one", sc.Spec.Version),
)
return nil, fmt.Errorf("requested ScyllaDB version %q does not support broadcasting other address than ClusterIP, use the latest one", sc.Spec.Version)
}
}
}

managedScyllaDBConfigCMName := naming.GetScyllaDBManagedConfigCMName(sc.Name)
managedScyllaDBConfigCM, found := configMaps[managedScyllaDBConfigCMName]
if !found {
Expand Down
42 changes: 0 additions & 42 deletions pkg/controller/scyllacluster/validation.go

This file was deleted.

0 comments on commit 42318e6

Please sign in to comment.