Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
digiserg committed Jan 21, 2021
2 parents 0efde17 + 5abdc6d commit 38f894b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 19 deletions.
8 changes: 4 additions & 4 deletions Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: v1
name: cassandra
version: 0.15.4
version: 0.15.6
appVersion: 3.11.6
description: DEPRECATED Apache Cassandra is a free and open-source distributed database management
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
high availability with no single point of failure.
This chart is managed by Digitalis
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Cassandra_logo.svg/330px-Cassandra_logo.svg.png
keywords:
- cassandra
- database
- nosql
home: http://cassandra.apache.org
deprecated: true
home: https://digitalis.io
engine: gotpl
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ To upgrade your Cassandra release, simply run
helm upgrade "cassandra" axonops-helm/cassandra
```

### 0.12.0

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:
```bash
$ kubectl delete statefulset --cascade=false my-cassandra-release
```


## Persist data
You need to create `StorageClass` before able to persist data in persistent volume.
To create a `StorageClass` on Google Cloud, run the following
Expand Down Expand Up @@ -107,8 +97,8 @@ The following table lists the configurable parameters of the Cassandra chart and

| Parameter | Description | Default |
| ----------------------- | --------------------------------------------- | ---------------------------------------------------------- |
| `image.repo` | `cassandra` image repository | `cassandra` |
| `image.tag` | `cassandra` image tag | `3.11.5` |
| `image.repo` | `cassandra` image repository | `digitalisdocker/cassandra` |
| `image.tag` | `cassandra` image tag | `3.11.9` |
| `image.pullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` |
| `image.pullSecrets` | Image pull secrets | `nil` |
| `config.cluster_domain` | The name of the cluster domain. | `cluster.local` |
Expand Down Expand Up @@ -178,6 +168,9 @@ The following table lists the configurable parameters of the Cassandra chart and
| `extraContainers` | Sidecar containers for the pods | `[]` |
| `extraVolumes` | Additional volumes for the pods | `[]` |
| `extraVolumeMounts` | Extra volume mounts for the pods | `[]` |
| `extraInitContainers` | Sidecar containers to init the pods | `[]` |
| `extraInitVolumes` | Additional volumes for init containers | `[]` |
| `extraInitVolumeMounts` | Extra volume mounts for init containers | `[]` |
| `affinity` | Kubernetes node affinity | `{}` |
| `tolerations` | Kubernetes node tolerations | `[]` |

Expand Down
2 changes: 2 additions & 0 deletions templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ metadata:
heritage: {{ .Release.Service }}
{{- with .Values.service.annotations }}
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
publishNotReadyAddresses: true
clusterIP: None
type: {{ .Values.service.type }}
ports:
Expand Down
12 changes: 10 additions & 2 deletions templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ spec:
app: {{ template "cassandra.name" . }}
release: {{ .Release.Name }}
serviceName: {{ template "cassandra.fullname" . }}
serviceAccountName: {{ default .Release.Name .serviceAccount.name }}
replicas: {{ .Values.config.cluster_size }}
podManagementPolicy: {{ .Values.podManagementPolicy }}
updateStrategy:
Expand All @@ -31,6 +30,7 @@ spec:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "cassandra.serviceAccountName" . }}
{{- if .Values.schedulerName }}
schedulerName: "{{ .Values.schedulerName }}"
{{- end }}
Expand All @@ -53,6 +53,9 @@ spec:
{{- end }}
{{- if .Values.configOverrides }}
initContainers:
{{- if .Values.extraInitContainers }}
{{ tpl (toYaml .Values.extraInitContainers) . | indent 6}}
{{- end }}
- name: config-copier
image: busybox
command: [ 'sh', '-c', 'cp /configmap-files/* /cassandra-configs/ && chown 999:999 /cassandra-configs/*']
Expand All @@ -64,6 +67,9 @@ spec:
{{- end }}
- name: cassandra-configs
mountPath: /cassandra-configs/
{{- if .Values.extraInitVolumeMounts }}
{{ toYaml .Values.extraInitVolumeMounts | indent 6 }}
{{- end }}
{{- end }}
containers:
{{- if .Values.extraContainers }}
Expand Down Expand Up @@ -180,11 +186,13 @@ spec:
{{- if .Values.extraVolumeMounts }}
{{ toYaml .Values.extraVolumeMounts | indent 8 }}
{{- end }}
{{- if not .Values.persistence.enabled }}
lifecycle:
preStop:
exec:
{{- if not .Values.persistence.enabled }}
command: ["/bin/sh", "-c", "exec nodetool decommission"]
{{- else }}
command: ["/bin/sh", "-c", "exec nodetool drain"]
{{- end }}
terminationGracePeriodSeconds: {{ default 30 .Values.podSettings.terminationGracePeriodSeconds }}
{{- if .Values.image.pullSecrets }}
Expand Down
7 changes: 6 additions & 1 deletion values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Cassandra image version
## ref: https://hub.docker.com/r/library/cassandra/
image:
repo: cassandra
repo: digitalisdocker/cassandra
tag: 3.11.6
pullPolicy: IfNotPresent
## Specify ImagePullSecrets for Pods
Expand Down Expand Up @@ -263,3 +263,8 @@ extraContainers: []
# volumeMounts:
# - name: some-mount
# mountPath: /some/path

# Same syntax as above
extraInitVolumes: []
extraInitVolumeMounts: []
extraInitContainers: []

0 comments on commit 38f894b

Please sign in to comment.