diff --git a/CHANGELOG/CHANGELOG-1.21.md b/CHANGELOG/CHANGELOG-1.21.md index 9997365d9..6d4d84c69 100644 --- a/CHANGELOG/CHANGELOG-1.21.md +++ b/CHANGELOG/CHANGELOG-1.21.md @@ -15,5 +15,6 @@ When cutting a new release, update the `unreleased` heading to the tag being gen ## unreleased +* [CHANGE] [#1441](https://github.com/k8ssandra/k8ssandra-operator/issues/1441) Use k8ssandra-client instead of k8ssandra-tools for CRD upgrades * [BUGFIX] [#1383](https://github.com/k8ssandra/k8ssandra-operator/issues/1383) Do not create MedusaBackup if MadusaBakupJob did not fully succeed * [ENHANCEMENT] [#1667](https://github.com/k8ssahttps://github.com/k8ssandra/k8ssandra/issues/1667) Add `skipSchemaMigration` option to `K8ssandraCluster.spec.reaper` diff --git a/charts/k8ssandra-operator/templates/crd/batch_job.yaml b/charts/k8ssandra-operator/templates/crd/batch_job.yaml index c70eddecb..e659ed8be 100644 --- a/charts/k8ssandra-operator/templates/crd/batch_job.yaml +++ b/charts/k8ssandra-operator/templates/crd/batch_job.yaml @@ -20,6 +20,10 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "k8ssandra-common.fullname" . }}-crd-upgrader-k8ssandra + {{- if .Values.client.podSecurityContext }} + securityContext: + {{- toYaml .Values.client.podSecurityContext | nindent 8 }} + {{- end }} containers: - name: crd-upgrade-job-k8ssandra image: {{ include "k8ssandra-common.flattenedImage" .Values.client.image }} @@ -34,11 +38,14 @@ spec: value: {{ .Values.client.proxy }} {{- end }} args: - - -upgradecrds - - --targetVersion + - helm + - upgrade + - --chartVersion - {{ .Chart.Version }} - --chartName - {{ .Chart.Name }} + - --chartRepo + - k8ssandra {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} {{- end }} diff --git a/charts/k8ssandra-operator/templates/crd/service_account.yaml b/charts/k8ssandra-operator/templates/crd/service_account.yaml index 90e300dda..3d3f64345 100644 --- a/charts/k8ssandra-operator/templates/crd/service_account.yaml +++ b/charts/k8ssandra-operator/templates/crd/service_account.yaml @@ -1,5 +1,4 @@ {{- if not .Values.disableCrdUpgraderJob }} -{{- if not .Values.cleaner.serviceAccount }} apiVersion: v1 kind: ServiceAccount metadata: @@ -10,4 +9,3 @@ metadata: "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded "helm.sh/hook-weight": "0" {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/k8ssandra-operator/values.yaml b/charts/k8ssandra-operator/values.yaml index 3e02e1cf3..0e1ab5b01 100644 --- a/charts/k8ssandra-operator/values.yaml +++ b/charts/k8ssandra-operator/values.yaml @@ -62,27 +62,6 @@ nodeSelector: {} ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ ## tolerations: [] -# -- The cleaner is a pre-delete hook that that ensures objects with finalizers -# get deleted. For example, cass-operator sets a finalizer on the -# CassandraDatacenter. Kubernetes blocks deletion of an object until all of its -# finalizers are cleared. In the case of the CassandraDatacenter object, -# cass-operator removes the finalizer. The problem is that there are no -# ordering guarantees with helm uninstall which means that the cass-operator -# deployment could be deleted before the CassandraDatacenter. The cleaner -# ensures that the CassandraDatacenter is deleted before cass-operator. -cleaner: - # -- Uncomment to specify the name of the service account to use for the - # cleaner. Defaults to -cleaner-k8ssandra - # serviceAccount: - image: - # -- Image registry for the cleaner - registry: docker.io - # -- Image repository for the cleaner - repository: k8ssandra/k8ssandra-tools - # -- Tag of the cleaner image to pull from - tag: latest - # -- Pull policy for the cleaner container - pullPolicy: IfNotPresent # -- k8ssandra-client provides CLI utilities, but also certain functions such as # upgradecrds that allow modifying the running instances client: @@ -93,9 +72,9 @@ client: # -- Image registry for the client registry: docker.io # -- Image repository for the client - repository: k8ssandra/k8ssandra-tools + repository: k8ssandra/k8ssandra-client # -- Tag of the client image to pull from - tag: latest + tag: v0.6.0 # -- Pull policy for the client container pullPolicy: IfNotPresent # -- HTTPS proxy address to use for communication to helm.k8ssandra.io