Skip to content

Commit

Permalink
Use k8ssandra-client CRD upgrader instead of k8ssandra-tools image
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Oct 29, 2024
1 parent 992633e commit b864d48
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 28 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG/CHANGELOG-1.21.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ When cutting a new release, update the `unreleased` heading to the tag being gen

## unreleased


* [CHANGE] []() Use k8ssandra-client instead of k8ssandra-tools for CRD upgrades
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
2 changes: 0 additions & 2 deletions charts/k8ssandra-operator/templates/crd/service_account.yaml
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

0 comments on commit b864d48

Please sign in to comment.