Skip to content

Commit

Permalink
cluster: remove unused sidecarImage field (#283)
Browse files Browse the repository at this point in the history
Fixes #283
  • Loading branch information
zimnx committed Dec 16, 2020
1 parent a689d62 commit 5fd3b4c
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 52 deletions.
13 changes: 0 additions & 13 deletions config/operator/crd/bases/scylla.scylladb.com_scyllaclusters.yaml
Expand Up @@ -1459,19 +1459,6 @@ spec:
type: string
scyllaArgs:
type: string
sidecarImage:
description: User-provided image for the sidecar that replaces default.
properties:
repository:
description: Repository to pull the image from.
type: string
version:
description: Version of the image.
type: string
required:
- repository
- version
type: object
sysctls:
description: 'Sysctl properties to be applied during initialization given as a list of key=value pairs. Example: fs.aio-max-nr=232323'
items:
Expand Down
13 changes: 0 additions & 13 deletions examples/common/operator.yaml
Expand Up @@ -1474,19 +1474,6 @@ spec:
type: string
scyllaArgs:
type: string
sidecarImage:
description: User-provided image for the sidecar that replaces default.
properties:
repository:
description: Repository to pull the image from.
type: string
version:
description: Version of the image.
type: string
required:
- repository
- version
type: object
sysctls:
description: 'Sysctl properties to be applied during initialization given as a list of key=value pairs. Example: fs.aio-max-nr=232323'
items:
Expand Down
2 changes: 0 additions & 2 deletions pkg/api/v1alpha1/cluster_types.go
Expand Up @@ -49,8 +49,6 @@ type ClusterSpec struct {
AutomaticOrphanedNodeCleanup bool `json:"automaticOrphanedNodeCleanup,omitempty"`
// Datacenter that will make up this cluster.
Datacenter DatacenterSpec `json:"datacenter"`
// User-provided image for the sidecar that replaces default.
SidecarImage *ImageSpec `json:"sidecarImage,omitempty"`
// Sysctl properties to be applied during initialization
// given as a list of key=value pairs.
// Example: fs.aio-max-nr=232323
Expand Down
5 changes: 0 additions & 5 deletions pkg/api/v1alpha1/cluster_validation.go
Expand Up @@ -106,11 +106,6 @@ func checkTransitions(old, new *ScyllaCluster) error {
return errors.Errorf("repository change is currently not supported, old=%v, new=%v", *old.Spec.Repository, *new.Spec.Repository)
}

// Check that sidecarImage remained the same
if !reflect.DeepEqual(old.Spec.SidecarImage, new.Spec.SidecarImage) {
return errors.Errorf("change of sidecarImage is currently not supported")
}

// Check that the datacenter name didn't change
if old.Spec.Datacenter.Name != new.Spec.Datacenter.Name {
return errors.Errorf("change of datacenter name is currently not supported")
Expand Down
14 changes: 0 additions & 14 deletions pkg/api/v1alpha1/cluster_validation_test.go
Expand Up @@ -90,12 +90,6 @@ func TestCheckTransitions(t *testing.T) {
new: unit.NewDetailedSingleRackCluster("test-cluster", "test-ns", "new-repo", "2.3.2", "test-dc", "test-rack", 3),
allowed: false,
},
{
name: "sidecarImage changed",
old: unit.NewSingleRackCluster(3),
new: sidecarImageChanged(unit.NewSingleRackCluster(3)),
allowed: false,
},
{
name: "dcName changed",
old: unit.NewSingleRackCluster(3),
Expand Down Expand Up @@ -157,14 +151,6 @@ func rackDeleted(c *v1alpha1.ScyllaCluster) *v1alpha1.ScyllaCluster {
return c
}

func sidecarImageChanged(c *v1alpha1.ScyllaCluster) *v1alpha1.ScyllaCluster {
c.Spec.SidecarImage = &v1alpha1.ImageSpec{
Version: "1.0.0",
Repository: "my-private-repo",
}
return c
}

func storageChanged(c *v1alpha1.ScyllaCluster) *v1alpha1.ScyllaCluster {
c.Spec.Datacenter.Racks[0].Storage.Capacity = "15Gi"
return c
Expand Down
5 changes: 0 additions & 5 deletions pkg/api/v1alpha1/zz_generated.deepcopy.go

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

0 comments on commit 5fd3b4c

Please sign in to comment.