Skip to content

Commit

Permalink
Sanitize DC name in pods selector (fixes #1252) (#1257)
Browse files Browse the repository at this point in the history
  • Loading branch information
olim7t authored Mar 29, 2024
1 parent a8f7137 commit 8ba5703
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG/CHANGELOG-1.14.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ When cutting a new release, update the `unreleased` heading to the tag being gen
* [BUGFIX] [#1226](https://github.com/k8ssandra/k8ssandra-operator/issues/1226) Medusa purge cronjob should be created in the operator namespace
* [BUGFIX] [#1141](https://github.com/k8ssandra/k8ssandra-operator/issues/1141) Use DC name override when naming secondary resources
* [BUGFIX] [#1138](https://github.com/k8ssandra/k8ssandra-operator/issues/1138) Use cluster name override for metrics agent ConfigMap
* [BUGFIX] [#1252](https://github.com/k8ssandra/k8ssandra-operator/issues/1252) Sanitize DC name in pods selector
2 changes: 1 addition & 1 deletion charts/k8ssandra-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies:
version: 0.29.0
repository: https://helm.k8ssandra.io
- name: cass-operator
version: 0.47.0
version: 0.47.1
repository: https://helm.k8ssandra.io
home: https://github.com/k8ssandra/k8ssandra-operator
sources:
Expand Down
4 changes: 2 additions & 2 deletions config/cass-operator/cluster-scoped/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- github.com/k8ssandra/cass-operator/config/deployments/cluster?ref=master
- github.com/k8ssandra/cass-operator/config/deployments/cluster?ref=v1.19.1

components:
- ../../components/cass-operator-image-config
images:
- name: k8ssandra/cass-operator
newTag: v1.19.0-dev.ff5bc87-20240111
newTag: v1.19.1
4 changes: 2 additions & 2 deletions config/cass-operator/ns-scoped/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- github.com/k8ssandra/cass-operator/config/deployments/default?ref=master
- github.com/k8ssandra/cass-operator/config/deployments/default?ref=v1.19.1

components:
- ../../components/cass-operator-image-config

images:
- name: k8ssandra/cass-operator
newTag: v1.19.0-dev.ff5bc87-20240111
newTag: v1.19.1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: ImageConfig
metadata:
name: image-config
images:
system-logger: "k8ssandra/system-logger:v1.18.2"
system-logger: "k8ssandra/system-logger:v1.19.1"
config-builder: "datastax/cass-config-builder:1.0.7"
k8ssandra-client: "k8ssandra/k8ssandra-client:v0.2.2"
# cassandra:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/go-logr/zapr v1.2.3
github.com/google/uuid v1.3.0
github.com/gruntwork-io/terratest v0.37.7
github.com/k8ssandra/cass-operator v1.19.0
github.com/k8ssandra/cass-operator v1.19.1
github.com/k8ssandra/reaper-client-go v0.3.1-0.20220114183114-6923e077c4f5
github.com/pkg/errors v0.9.1
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.52.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,8 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/k8ssandra/cass-operator v1.19.0 h1:k+/IdbAowA8J5pV/YNy5mCqTn+I0ultdEJJYNSMP6NE=
github.com/k8ssandra/cass-operator v1.19.0/go.mod h1:T25Qz8sj/R5JrjG9Wpo3/83o5MEw4pb/c8eiGqdnVcI=
github.com/k8ssandra/cass-operator v1.19.1 h1:MSNgOIVBpt2948S0SITF1rgnGsNG5j2gkixM/UXKPt8=
github.com/k8ssandra/cass-operator v1.19.1/go.mod h1:T25Qz8sj/R5JrjG9Wpo3/83o5MEw4pb/c8eiGqdnVcI=
github.com/k8ssandra/reaper-client-go v0.3.1-0.20220114183114-6923e077c4f5 h1:Dq0VdM960G3AbhYwFuaebmsE08IzOYHYhngUfDmWaAc=
github.com/k8ssandra/reaper-client-go v0.3.1-0.20220114183114-6923e077c4f5/go.mod h1:WsQymIaVT39xbcstZhdqynUS13AGzP2p6U9Hsk1oy5M=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
Expand Down
4 changes: 3 additions & 1 deletion pkg/cassandra/management.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ func (r *defaultManagementApiFacade) CreateKeyspaceIfNotExists(

func (r *defaultManagementApiFacade) fetchDatacenterPods() ([]corev1.Pod, error) {
podList := &corev1.PodList{}
labels := client.MatchingLabels{cassdcapi.DatacenterLabel: r.dc.DatacenterName(), cassdcapi.ClusterLabel: cassdcapi.CleanLabelValue(r.dc.Spec.ClusterName)}
labels := client.MatchingLabels{
cassdcapi.DatacenterLabel: cassdcapi.CleanLabelValue(r.dc.DatacenterName()),
cassdcapi.ClusterLabel: cassdcapi.CleanLabelValue(r.dc.Spec.ClusterName)}
if err := r.k8sClient.List(r.ctx, podList, labels); err != nil {
return nil, err
} else {
Expand Down
2 changes: 1 addition & 1 deletion pkg/test/testenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import (
const (
clustersToCreate = 3
clusterProtoName = "cluster-%d-%s"
cassOperatorVersion = "v1.18.2"
cassOperatorVersion = "v1.19.1"
prometheusOperatorVersion = "v0.9.0"
)

Expand Down
4 changes: 2 additions & 2 deletions test/e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,8 @@ func applyPollingDefaults() {
polling.reaperReady.timeout = 10 * time.Minute
polling.reaperReady.interval = 15 * time.Second

polling.medusaBackupDone.timeout = 5 * time.Minute
polling.medusaBackupDone.interval = 5 * time.Second
polling.medusaBackupDone.timeout = 10 * time.Minute
polling.medusaBackupDone.interval = 15 * time.Second

polling.medusaRestoreDone.timeout = 10 * time.Minute
polling.medusaRestoreDone.interval = 15 * time.Second
Expand Down
2 changes: 1 addition & 1 deletion test/kuttl/test-servicemonitors/03-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
- name: DSE_MGMT_EXPLICIT_START
value: "true"
name: cassandra
- image: k8ssandra/system-logger:v1.18.2
- image: k8ssandra/system-logger:v1.19.1
name: server-system-logger
status:
readyReplicas: 1
Expand Down

0 comments on commit 8ba5703

Please sign in to comment.