Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use k8ssandra-client CRD upgrader instead of k8ssandra-tools image #1440

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG/CHANGELOG-1.21.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
11 changes: 9 additions & 2 deletions charts/k8ssandra-operator/templates/crd/batch_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{- if not .Values.disableCrdUpgraderJob }}
{{- if not .Values.cleaner.serviceAccount }}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -10,4 +9,3 @@ metadata:
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
"helm.sh/hook-weight": "0"
{{- end }}
{{- end }}
25 changes: 2 additions & 23 deletions charts/k8ssandra-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <release-name>-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:
Expand All @@ -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
Expand Down
Loading