From 2cf9f4aab06612565738b85c349bb43268df35b2 Mon Sep 17 00:00:00 2001 From: satchpx <42478164+satchpx@users.noreply.github.com> Date: Mon, 3 Jun 2019 21:16:59 -0700 Subject: [PATCH] [incubator/cassandra] updates to support an alternate k8s scheduler (#14350) * updates to support an alternate k8s scheduler Signed-off-by: Sathya Balakrishnan * fix Chart version Signed-off-by: Sathya Balakrishnan --- incubator/cassandra/Chart.yaml | 2 +- incubator/cassandra/README.md | 3 ++- incubator/cassandra/templates/statefulset.yaml | 5 ++++- incubator/cassandra/values.yaml | 5 +++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/incubator/cassandra/Chart.yaml b/incubator/cassandra/Chart.yaml index 0b9a2e38f667..377265447d1c 100644 --- a/incubator/cassandra/Chart.yaml +++ b/incubator/cassandra/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: cassandra -version: 0.12.2 +version: 0.13.0 appVersion: 3.11.3 description: Apache Cassandra is a free and open-source distributed database management system designed to handle large amounts of data across many commodity servers, providing diff --git a/incubator/cassandra/README.md b/incubator/cassandra/README.md index c33754b49033..fa57803a78c9 100644 --- a/incubator/cassandra/README.md +++ b/incubator/cassandra/README.md @@ -31,7 +31,7 @@ helm upgrade "cassandra" incubator/cassandra This version fixes https://github.com/helm/charts/issues/7803 by removing mutable labels in `spec.VolumeClaimTemplate.metadata.labels` so that it is upgradable. -Until this version, in order to upgrade, you have to delete the Cassandra StatefulSet before upgrading: +Until this version, in order to upgrade, you have to delete the Cassandra StatefulSet before upgrading: ```bash $ kubectl delete statefulset --cascade=false my-cassandra-release ``` @@ -121,6 +121,7 @@ The following table lists the configurable parameters of the Cassandra chart and | `commandOverrides` | Overrides default docker command | `[]` | | `argsOverrides` | Overrides default docker args | `[]` | | `env` | Custom env variables | `{}` | +| `schedulerName` | Name of k8s scheduler (other than the default) | `nil` | | `persistence.enabled` | Use a PVC to persist data | `true` | | `persistence.storageClass` | Storage class of backing PVC | `nil` (uses alpha storage class annotation) | | `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` | diff --git a/incubator/cassandra/templates/statefulset.yaml b/incubator/cassandra/templates/statefulset.yaml index d2b47450b5ce..fedcff3c4aec 100644 --- a/incubator/cassandra/templates/statefulset.yaml +++ b/incubator/cassandra/templates/statefulset.yaml @@ -30,6 +30,9 @@ spec: {{ toYaml .Values.podAnnotations | indent 8 }} {{- end }} spec: + {{- if .Values.schedulerName }} + schedulerName: "{{ .Values.schedulerName }}" + {{- end }} hostNetwork: {{ .Values.hostNetwork }} {{- if .Values.selector }} {{ toYaml .Values.selector | indent 6 }} @@ -93,7 +96,7 @@ spec: value: {{ required "You must fill \".Values.config.seeds\" with list of Cassandra seeds when hostNetwork is set to true" .Values.config.seeds | quote }} {{- else }} value: "{{- range $i, $e := until $seed_size }}{{ template "cassandra.fullname" $global }}-{{ $i }}.{{ template "cassandra.fullname" $global }}.{{ $global.Release.Namespace }}.svc.{{ $global.Values.config.cluster_domain }}{{- if (lt ( add1 $i ) $seed_size ) }},{{- end }}{{- end }}" - {{- end }} + {{- end }} - name: MAX_HEAP_SIZE value: {{ default "8192M" .Values.config.max_heap_size | quote }} - name: HEAP_NEWSIZE diff --git a/incubator/cassandra/values.yaml b/incubator/cassandra/values.yaml index 9607cab599b0..fd8fe6db1270 100644 --- a/incubator/cassandra/values.yaml +++ b/incubator/cassandra/values.yaml @@ -13,6 +13,11 @@ image: service: type: ClusterIP +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + ## Persist data to a persistent volume persistence: enabled: true