From 31f73138ef9aeb3fb37325178e2e73bc3b3111de Mon Sep 17 00:00:00 2001 From: Alexander Dejanovski Date: Tue, 24 Oct 2023 07:11:56 +0200 Subject: [PATCH] Upgrade Reaper --- apis/reaper/v1alpha1/reaper_types.go | 8 ++++---- config/crd/bases/k8ssandra.io_k8ssandraclusters.yaml | 8 ++++---- config/crd/bases/reaper.k8ssandra.io_reapers.yaml | 8 ++++---- pkg/reaper/deployment.go | 2 +- pkg/reaper/deployment_test.go | 8 ++++---- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apis/reaper/v1alpha1/reaper_types.go b/apis/reaper/v1alpha1/reaper_types.go index 6d5decd6f..a80065bbb 100644 --- a/apis/reaper/v1alpha1/reaper_types.go +++ b/apis/reaper/v1alpha1/reaper_types.go @@ -67,17 +67,17 @@ type ReaperTemplate struct { SecretsProvider string `json:"secretsProvider,omitempty"` // The image to use for the Reaper pod main container. - // The default is "thelastpickle/cassandra-reaper:7162ea3". + // The default is "thelastpickle/cassandra-reaper:0c1c835". // +optional // TODO: update with real release version. - // +kubebuilder:default={repository:"thelastpickle",name:"cassandra-reaper",tag:"7162ea3"} + // +kubebuilder:default={repository:"thelastpickle",name:"cassandra-reaper",tag:"0c1c835"} ContainerImage *images.Image `json:"containerImage,omitempty"` // The image to use for the Reaper pod init container (that performs schema migrations). - // The default is "thelastpickle/cassandra-reaper:7162ea3". + // The default is "thelastpickle/cassandra-reaper:0c1c835". // +optional // TODO: update with real release version. - // +kubebuilder:default={repository:"thelastpickle",name:"cassandra-reaper",tag:"7162ea3"} + // +kubebuilder:default={repository:"thelastpickle",name:"cassandra-reaper",tag:"0c1c835"} InitContainerImage *images.Image `json:"initContainerImage,omitempty"` // +kubebuilder:default="default" diff --git a/config/crd/bases/k8ssandra.io_k8ssandraclusters.yaml b/config/crd/bases/k8ssandra.io_k8ssandraclusters.yaml index c08c840d1..04942b0bf 100644 --- a/config/crd/bases/k8ssandra.io_k8ssandraclusters.yaml +++ b/config/crd/bases/k8ssandra.io_k8ssandraclusters.yaml @@ -28402,9 +28402,9 @@ spec: default: name: cassandra-reaper repository: thelastpickle - tag: 7162ea3 + tag: 0c1c835 description: 'The image to use for the Reaper pod main container. - The default is "thelastpickle/cassandra-reaper:7162ea3". TODO: + The default is "thelastpickle/cassandra-reaper:0c1c835". TODO: update with real release version.' properties: name: @@ -28476,9 +28476,9 @@ spec: default: name: cassandra-reaper repository: thelastpickle - tag: 7162ea3 + tag: 0c1c835 description: 'The image to use for the Reaper pod init container - (that performs schema migrations). The default is "thelastpickle/cassandra-reaper:7162ea3". + (that performs schema migrations). The default is "thelastpickle/cassandra-reaper:0c1c835". TODO: update with real release version.' properties: name: diff --git a/config/crd/bases/reaper.k8ssandra.io_reapers.yaml b/config/crd/bases/reaper.k8ssandra.io_reapers.yaml index 903457d11..14b820801 100644 --- a/config/crd/bases/reaper.k8ssandra.io_reapers.yaml +++ b/config/crd/bases/reaper.k8ssandra.io_reapers.yaml @@ -1046,9 +1046,9 @@ spec: default: name: cassandra-reaper repository: thelastpickle - tag: 7162ea3 + tag: 0c1c835 description: 'The image to use for the Reaper pod main container. - The default is "thelastpickle/cassandra-reaper:7162ea3". TODO: update + The default is "thelastpickle/cassandra-reaper:0c1c835". TODO: update with real release version.' properties: name: @@ -1146,9 +1146,9 @@ spec: default: name: cassandra-reaper repository: thelastpickle - tag: 7162ea3 + tag: 0c1c835 description: 'The image to use for the Reaper pod init container (that - performs schema migrations). The default is "thelastpickle/cassandra-reaper:7162ea3". + performs schema migrations). The default is "thelastpickle/cassandra-reaper:0c1c835". TODO: update with real release version.' properties: name: diff --git a/pkg/reaper/deployment.go b/pkg/reaper/deployment.go index fada5053b..f048aab46 100644 --- a/pkg/reaper/deployment.go +++ b/pkg/reaper/deployment.go @@ -24,7 +24,7 @@ import ( const ( DefaultImageRepository = "thelastpickle" DefaultImageName = "cassandra-reaper" - DefaultVersion = "7162ea3" + DefaultVersion = "0c1c835" // When changing the default version above, please also change the kubebuilder markers in // apis/reaper/v1alpha1/reaper_types.go accordingly. diff --git a/pkg/reaper/deployment_test.go b/pkg/reaper/deployment_test.go index 29a215211..1fb7ee4dd 100644 --- a/pkg/reaper/deployment_test.go +++ b/pkg/reaper/deployment_test.go @@ -311,8 +311,8 @@ func TestImages(t *testing.T) { reaper.Spec.ContainerImage = nil logger := testlogr.NewTestLogger(t) deployment := NewDeployment(reaper, newTestDatacenter(), nil, nil, logger) - assert.Equal(t, "docker.io/thelastpickle/cassandra-reaper:7162ea3", deployment.Spec.Template.Spec.InitContainers[0].Image) - assert.Equal(t, "docker.io/thelastpickle/cassandra-reaper:7162ea3", deployment.Spec.Template.Spec.Containers[0].Image) + assert.Equal(t, "docker.io/thelastpickle/cassandra-reaper:0c1c835", deployment.Spec.Template.Spec.InitContainers[0].Image) + assert.Equal(t, "docker.io/thelastpickle/cassandra-reaper:0c1c835", deployment.Spec.Template.Spec.Containers[0].Image) assert.Equal(t, corev1.PullIfNotPresent, deployment.Spec.Template.Spec.InitContainers[0].ImagePullPolicy) assert.Equal(t, corev1.PullIfNotPresent, deployment.Spec.Template.Spec.Containers[0].ImagePullPolicy) assert.Empty(t, deployment.Spec.Template.Spec.ImagePullSecrets) @@ -327,8 +327,8 @@ func TestImages(t *testing.T) { reaper.Spec.ContainerImage = nil logger := testlogr.NewTestLogger(t) deployment := NewDeployment(reaper, newTestDatacenter(), nil, nil, logger) - assert.Equal(t, "docker.io/thelastpickle/cassandra-reaper:7162ea3", deployment.Spec.Template.Spec.InitContainers[0].Image) - assert.Equal(t, "docker.io/thelastpickle/cassandra-reaper:7162ea3", deployment.Spec.Template.Spec.Containers[0].Image) + assert.Equal(t, "docker.io/thelastpickle/cassandra-reaper:0c1c835", deployment.Spec.Template.Spec.InitContainers[0].Image) + assert.Equal(t, "docker.io/thelastpickle/cassandra-reaper:0c1c835", deployment.Spec.Template.Spec.Containers[0].Image) assert.Equal(t, corev1.PullIfNotPresent, deployment.Spec.Template.Spec.InitContainers[0].ImagePullPolicy) assert.Equal(t, corev1.PullIfNotPresent, deployment.Spec.Template.Spec.Containers[0].ImagePullPolicy) assert.Empty(t, deployment.Spec.Template.Spec.ImagePullSecrets)