[bitnami/cassandra] Allow custom entrypoint & cmd

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
This commit is contained in:
Javier Salmeron Garcia
2019-08-29 16:55:38 +02:00
parent a956d0a279
commit 79da0c68cd
5 changed files with 18 additions and 6 deletions

View File

@@ -245,6 +245,10 @@ kubectl create configmap init-db --from-file=path/to/scripts
helm install bitnami/cassandra --set initDBConfigMap=init-db
```
## Using a custom Cassandra image
This chart uses the [Bitnami cassandra](https://github.com/bitnami/bitnami-docker-cassandra) image by default. In case you want to use a different image, you can redefine the container entrypoint by setting the `entrypoint` and `cmd` values.
## Upgrade
### 2.0.0

View File

@@ -28,7 +28,7 @@ spec:
- podSelector:
matchLabels:
app: {{ template "cassandra.name" . }}
release: {{ .Release.Name }}
release: {{ .Release.Name }}
# Internal ports
- ports:
- port: intra
@@ -38,7 +38,7 @@ spec:
- podSelector:
matchLabels:
app: {{ template "cassandra.name" . }}
release: {{ .Release.Name }}
release: {{ .Release.Name }}
{{- if .Values.metrics.enabled }}
# Allow prometheus scrapes for metrics
- ports:

View File

@@ -85,8 +85,6 @@ spec:
# Only node 0 will execute the startup initdb scripts
export CASSANDRA_IGNORE_INITDB_SCRIPTS=1
fi
{{- $domain := .Values.cluster.domain }}
export CASSANDRA_HOST="${HOSTNAME}.{{ template "cassandra.fullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ $domain }}"
{{ .Values.entrypoint }} {{ .Values.cmd }}
image: {{ template "cassandra.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
@@ -94,9 +92,10 @@ spec:
env:
- name: CASSANDRA_CLUSTER_NAME
value: {{ .Values.cluster.name }}
{{- $global := . }}
{{- $replicas := .Values.cluster.seedCount | int }}
- name: CASSANDRA_SEEDS
{{- $global := . }}
{{- $replicas := .Values.cluster.seedCount | int }}
{{- $domain := .Values.cluster.domain }}
value: "{{- range $i, $e := until $replicas }}{{ template "cassandra.fullname" $global }}-{{ $i }}.{{ template "cassandra.fullname" $global }}-headless.{{ $global.Release.Namespace }}.svc.{{ $domain }}{{- if (lt ( add1 $i ) $replicas ) }},{{- end }}{{- end }}"
- name: CASSANDRA_PASSWORD
valueFrom:

View File

@@ -214,6 +214,12 @@ affinity: {}
##
tolerations: []
##
## Container entrypoint and cmd (useful for using different images)
##
entrypoint: "/app-entrypoint.sh"
cmd: "/run.sh"
## Network policies
## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
##

View File

@@ -214,6 +214,9 @@ affinity: {}
##
tolerations: []
##
## Container entrypoint and cmd (useful for using different images)
##
entrypoint: "/app-entrypoint.sh"
cmd: "/run.sh"