Skip to content

Commit

Permalink
[incubator/cassandra] updates to support an alternate k8s scheduler (h…
Browse files Browse the repository at this point in the history
…elm#14350)

* updates to support an alternate k8s scheduler

Signed-off-by: Sathya Balakrishnan <[email protected]>

* fix Chart version

Signed-off-by: Sathya Balakrishnan <[email protected]>
  • Loading branch information
satchpx authored and k8s-ci-robot committed Jun 4, 2019
1 parent 0fff0f9 commit 2cf9f4a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion incubator/cassandra/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion incubator/cassandra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down Expand Up @@ -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` |
Expand Down
5 changes: 4 additions & 1 deletion incubator/cassandra/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions incubator/cassandra/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2cf9f4a

Please sign in to comment.