mirror of
https://github.com/bitnami/charts.git
synced 2026-03-02 08:05:03 +08:00
[bitnami/cassandra] Allow custom entrypoint & cmd
Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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/
|
||||
##
|
||||
|
||||
@@ -214,6 +214,9 @@ affinity: {}
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
##
|
||||
## Container entrypoint and cmd (useful for using different images)
|
||||
##
|
||||
entrypoint: "/app-entrypoint.sh"
|
||||
cmd: "/run.sh"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user