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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ VECTOR ?= $(LOCALBIN)/bin/vector
CERT_MANAGER_VERSION ?= v1.12.2
KUSTOMIZE_VERSION ?= v4.5.7
CONTROLLER_TOOLS_VERSION ?= v0.14.0
GOLINT_VERSION ?= 1.55.0
GOLINT_VERSION ?= 1.61.0

cert-manager: ## Install cert-manager to the cluster
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/$(CERT_MANAGER_VERSION)/cert-manager.yaml
Expand Down
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