mirror of
https://github.com/bitnami/charts.git
synced 2026-08-10 14:15:55 +08:00
Merge branch 'master' of https://github.com/bitnami/charts
This commit is contained in:
@@ -23,7 +23,7 @@ This repository contains:
|
||||
|
||||
### Setup a Kubernetes Cluster
|
||||
|
||||
The quickest way to setup a Kubernetes cluster is with [Azure Kubernetes Service](https://azure.microsoft.com/en-us/services/kubernetes-service/), [AWS Elastic Container Service](https://aws.amazon.com/eks/) or [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine/) using their respective quick-start guides. For setting up Kubernetes on other cloud platforms or bare-metal servers refer to the Kubernetes [getting started guide](http://kubernetes.io/docs/getting-started-guides/).
|
||||
The quickest way to setup a Kubernetes cluster is with [Azure Kubernetes Service](https://azure.microsoft.com/en-us/services/kubernetes-service/), [AWS Elastic Kubernetes Service](https://aws.amazon.com/eks/) or [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine/) using their respective quick-start guides. For setting up Kubernetes on other cloud platforms or bare-metal servers refer to the Kubernetes [getting started guide](http://kubernetes.io/docs/getting-started-guides/).
|
||||
|
||||
### Install Helm
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
apiVersion: v1
|
||||
name: airflow
|
||||
version: 4.0.5
|
||||
appVersion: 1.10.5
|
||||
version: 4.0.18
|
||||
appVersion: 1.10.6
|
||||
description: Apache Airflow is a platform to programmatically author, schedule and monitor workflows.
|
||||
keywords:
|
||||
- apache
|
||||
- airflow
|
||||
- workflow
|
||||
- dag
|
||||
- apache
|
||||
- airflow
|
||||
- workflow
|
||||
- dag
|
||||
home: https://airflow.apache.org/
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-airflow
|
||||
- https://github.com/bitnami/bitnami-docker-airflow
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
icon: https://bitnami.com/assets/stacks/airflow/img/airflow-stack-110x117.png
|
||||
|
||||
@@ -16,8 +16,8 @@ Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.4+ with Beta APIs enabled
|
||||
- PV provisioner support in the underlying infrastructure
|
||||
- Kubernetes 1.12+
|
||||
- Helm 2.11+ or Helm 3.0-beta3+
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Test values file for generating all of the yaml and check that
|
||||
# the rendering is correct
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
|
||||
config: |
|
||||
test_configuration
|
||||
|
||||
redis:
|
||||
enabled: false
|
||||
externalRedis:
|
||||
password: test
|
||||
|
||||
postgresql:
|
||||
enabled: false
|
||||
externalDatabase:
|
||||
password: test
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 6.5.4
|
||||
version: 6.5.9
|
||||
- name: redis
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 9.5.0
|
||||
version: 9.5.4
|
||||
digest: sha256:99c086e6c1e8c381e164fb75d158887bf9929a2babce2f2dd6778b71e3a7820f
|
||||
generated: 2019-10-30T12:46:11.326722229Z
|
||||
generated: 2019-11-15T17:19:10.581184245Z
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
version: 6.x.x
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: postgresql.enabled
|
||||
- name: redis
|
||||
version: 9.x.x
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: redis.enabled
|
||||
- name: postgresql
|
||||
version: 6.x.x
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: postgresql.enabled
|
||||
- name: redis
|
||||
version: 9.x.x
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: redis.enabled
|
||||
|
||||
@@ -47,164 +47,163 @@ spec:
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.cloneDagFilesFromGit.enabled }}
|
||||
initContainers:
|
||||
- name: git-clone-repository
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
git clone {{ .Values.airflow.cloneDagFilesFromGit.repository }} --branch {{ .Values.airflow.cloneDagFilesFromGit.branch }} /dags
|
||||
volumeMounts:
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /dags
|
||||
- name: git-clone-repository
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
git clone {{ .Values.airflow.cloneDagFilesFromGit.repository }} --branch {{ .Values.airflow.cloneDagFilesFromGit.branch }} /dags
|
||||
volumeMounts:
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /dags
|
||||
containers:
|
||||
- name: git-repo-syncer
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
while true; do
|
||||
cd /dags && git pull origin {{ .Values.airflow.cloneDagFilesFromGit.branch }}
|
||||
sleep {{ default "60" .Values.airflow.cloneDagFilesFromGit.interval }}
|
||||
done
|
||||
volumeMounts:
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /dags
|
||||
- name: git-repo-syncer
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
while true; do
|
||||
cd /dags && git pull origin {{ .Values.airflow.cloneDagFilesFromGit.branch }}
|
||||
sleep {{ default "60" .Values.airflow.cloneDagFilesFromGit.interval }}
|
||||
done
|
||||
volumeMounts:
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /dags
|
||||
{{- else }}
|
||||
containers:
|
||||
{{- end }}
|
||||
- name: airflow-scheduler
|
||||
image: {{ template "airflow.schedulerImage" . }}
|
||||
imagePullPolicy: {{ .Values.schedulerImage.pullPolicy | quote }}
|
||||
env:
|
||||
{{- if .Values.schedulerImage.debug }}
|
||||
- name: BASH_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_LOG_LEVEL
|
||||
value: "trace8"
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_NAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlDatabase }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.database | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_USERNAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlUsername }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.user | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
name: {{ template "airflow.postgresql.fullname" . }}
|
||||
key: postgresql-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
key: db-password
|
||||
- name: airflow-scheduler
|
||||
image: {{ template "airflow.schedulerImage" . }}
|
||||
imagePullPolicy: {{ .Values.schedulerImage.pullPolicy | quote }}
|
||||
env:
|
||||
{{- if .Values.schedulerImage.debug }}
|
||||
- name: BASH_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_LOG_LEVEL
|
||||
value: "trace8"
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_HOST
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ template "airflow.postgresql.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.host | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_PORT_NUMBER
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: "5432"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.port | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_HOST
|
||||
{{- if .Values.redis.enabled }}
|
||||
value: {{ template "airflow.redis.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalRedis.host | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_PORT_NUMBER
|
||||
{{- if .Values.redis.enabled }}
|
||||
value: "6379"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalRedis.port | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.redis.enabled }}
|
||||
name: {{ template "airflow.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externalredis" }}
|
||||
key: redis-password
|
||||
- name: AIRFLOW_DATABASE_NAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlDatabase }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.database | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_USERNAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlUsername }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.user | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
name: {{ template "airflow.postgresql.fullname" . }}
|
||||
key: postgresql-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
key: db-password
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_HOST
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ template "airflow.postgresql.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.host | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_PORT_NUMBER
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: "5432"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.port | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_HOST
|
||||
{{- if .Values.redis.enabled }}
|
||||
value: {{ template "airflow.redis.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalRedis.host | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_PORT_NUMBER
|
||||
{{- if .Values.redis.enabled }}
|
||||
value: "6379"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalRedis.port | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.redis.enabled }}
|
||||
name: {{ template "airflow.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externalredis" }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
- name: AIRFLOW_EXECUTOR
|
||||
value: "CeleryExecutor"
|
||||
- name: AIRFLOW_FERNET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.airflow.auth.existingSecret }}{{ .Values.airflow.auth.existingSecret }}{{ else }}{{ template "airflow.fullname" . }}{{ end }}
|
||||
key: airflow-fernetKey
|
||||
- name: AIRFLOW_WEBSERVER_HOST
|
||||
value: {{ template "airflow.fullname" . }}
|
||||
- name: AIRFLOW_LOAD_EXAMPLES
|
||||
{{- if .Values.airflow.loadExamples }}
|
||||
value: "yes"
|
||||
{{- else }}
|
||||
value: "no"
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.extraEnvVars }}
|
||||
{{- toYaml .Values.airflow.extraEnvVars | nindent 12 }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_EXECUTOR
|
||||
value: "CeleryExecutor"
|
||||
- name: AIRFLOW_FERNET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.airflow.auth.existingSecret }}{{ .Values.airflow.auth.existingSecret }}{{ else }}{{ template "airflow.fullname" . }}{{ end }}
|
||||
key: airflow-fernetKey
|
||||
- name: AIRFLOW_WEBSERVER_HOST
|
||||
value: {{ template "airflow.fullname" . }}
|
||||
- name: AIRFLOW_LOAD_EXAMPLES
|
||||
{{- if .Values.airflow.loadExamples }}
|
||||
value: "yes"
|
||||
{{- else }}
|
||||
value: "no"
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.extraEnvVars }}
|
||||
{{ toYaml .Values.airflow.extraEnvVars | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Files.Glob "files/dags/*.py" }}
|
||||
- name: local-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/local
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.dagsConfigMap }}
|
||||
- name: external-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/external
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.cloneDagFilesFromGit.enabled }}
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/git
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.configurationConfigMap }}
|
||||
- name: custom-configuration-file
|
||||
mountPath: /opt/bitnami/airflow/airflow.cfg
|
||||
subPath: airflow.cfg
|
||||
{{- end }}
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 10 }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Files.Glob "files/dags/*.py" }}
|
||||
- name: local-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/local
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.dagsConfigMap }}
|
||||
- name: external-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/external
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.cloneDagFilesFromGit.enabled }}
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/git
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.configurationConfigMap }}
|
||||
- name: custom-configuration-file
|
||||
mountPath: /opt/bitnami/airflow/airflow.cfg
|
||||
subPath: airflow.cfg
|
||||
{{- end }}
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
volumes:
|
||||
{{- if .Files.Glob "files/dags/*.py" }}
|
||||
- name: local-dag-files
|
||||
configMap:
|
||||
name: {{ template "airflow.fullname" . }}-dag-files
|
||||
- name: local-dag-files
|
||||
configMap:
|
||||
name: {{ template "airflow.fullname" . }}-dag-files
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.dagsConfigMap }}
|
||||
- name: external-dag-files
|
||||
configMap:
|
||||
name: {{ .Values.airflow.dagsConfigMap }}
|
||||
- name: external-dag-files
|
||||
configMap:
|
||||
name: {{ .Values.airflow.dagsConfigMap }}
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.cloneDagFilesFromGit.enabled }}
|
||||
- name: git-cloned-dag-files
|
||||
emptyDir: {}
|
||||
- name: git-cloned-dag-files
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.configurationConfigMap }}
|
||||
- name: custom-configuration-file
|
||||
configMap:
|
||||
name: {{ .Values.airflow.configurationConfigMap }}
|
||||
- name: custom-configuration-file
|
||||
configMap:
|
||||
name: {{ .Values.airflow.configurationConfigMap }}
|
||||
{{- end }}
|
||||
|
||||
@@ -47,194 +47,193 @@ spec:
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.cloneDagFilesFromGit.enabled }}
|
||||
initContainers:
|
||||
- name: git-clone-repository
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
git clone {{ .Values.airflow.cloneDagFilesFromGit.repository }} --branch {{ .Values.airflow.cloneDagFilesFromGit.branch }} /dags
|
||||
volumeMounts:
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /dags
|
||||
- name: git-clone-repository
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
git clone {{ .Values.airflow.cloneDagFilesFromGit.repository }} --branch {{ .Values.airflow.cloneDagFilesFromGit.branch }} /dags
|
||||
volumeMounts:
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /dags
|
||||
containers:
|
||||
- name: git-repo-syncer
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
while true; do
|
||||
cd /dags && git pull origin {{ .Values.airflow.cloneDagFilesFromGit.branch }}
|
||||
sleep {{ default "60" .Values.airflow.cloneDagFilesFromGit.interval }}
|
||||
done
|
||||
volumeMounts:
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /dags
|
||||
- name: git-repo-syncer
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
while true; do
|
||||
cd /dags && git pull origin {{ .Values.airflow.cloneDagFilesFromGit.branch }}
|
||||
sleep {{ default "60" .Values.airflow.cloneDagFilesFromGit.interval }}
|
||||
done
|
||||
volumeMounts:
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /dags
|
||||
{{- else }}
|
||||
containers:
|
||||
{{- end }}
|
||||
- name: airflow-web
|
||||
image: {{ template "airflow.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
env:
|
||||
{{- if .Values.image.debug }}
|
||||
- name: BASH_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_LOG_LEVEL
|
||||
value: "trace8"
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_NAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlDatabase }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.database | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_USERNAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlUsername }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.user | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
name: {{ template "airflow.postgresql.fullname" . }}
|
||||
key: postgresql-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
key: db-password
|
||||
- name: airflow-web
|
||||
image: {{ template "airflow.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
env:
|
||||
{{- if .Values.image.debug }}
|
||||
- name: BASH_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_LOG_LEVEL
|
||||
value: "trace8"
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_HOST
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ template "airflow.postgresql.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.host | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_PORT_NUMBER
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: "5432"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.port | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_HOST
|
||||
{{- if .Values.redis.enabled }}
|
||||
value: {{ template "airflow.redis.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalRedis.host | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_PORT_NUMBER
|
||||
{{- if .Values.redis.enabled }}
|
||||
value: "6379"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalRedis.port | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.redis.enabled }}
|
||||
name: {{ template "airflow.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externalredis" }}
|
||||
key: redis-password
|
||||
- name: AIRFLOW_DATABASE_NAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlDatabase }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.database | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_USERNAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlUsername }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.user | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
name: {{ template "airflow.postgresql.fullname" . }}
|
||||
key: postgresql-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
key: db-password
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_HOST
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ template "airflow.postgresql.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.host | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_PORT_NUMBER
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: "5432"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.port | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_HOST
|
||||
{{- if .Values.redis.enabled }}
|
||||
value: {{ template "airflow.redis.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalRedis.host | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_PORT_NUMBER
|
||||
{{- if .Values.redis.enabled }}
|
||||
value: "6379"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalRedis.port | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.redis.enabled }}
|
||||
name: {{ template "airflow.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externalredis" }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
- name: AIRFLOW_EXECUTOR
|
||||
value: "CeleryExecutor"
|
||||
- name: AIRFLOW_USERNAME
|
||||
value: {{ .Values.airflow.auth.username }}
|
||||
- name: AIRFLOW_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.airflow.auth.existingSecret }}{{ .Values.airflow.auth.existingSecret }}{{ else }}{{ template "airflow.fullname" . }}{{ end }}
|
||||
key: airflow-password
|
||||
- name: AIRFLOW_FERNET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.airflow.auth.existingSecret }}{{ .Values.airflow.auth.existingSecret }}{{ else }}{{ template "airflow.fullname" . }}{{ end }}
|
||||
key: airflow-fernetKey
|
||||
- name: AIRFLOW_WEBSERVER_HOST
|
||||
value: {{ template "airflow.fullname" . }}
|
||||
{{- if .Values.airflow.baseUrl }}
|
||||
- name: AIRFLOW_BASE_URL
|
||||
value: {{ .Values.airflow.baseUrl }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_LOAD_EXAMPLES
|
||||
{{- if .Values.airflow.loadExamples }}
|
||||
value: "yes"
|
||||
{{- else }}
|
||||
value: "no"
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.extraEnvVars }}
|
||||
{{- toYaml .Values.airflow.extraEnvVars | nindent 12 }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_EXECUTOR
|
||||
value: "CeleryExecutor"
|
||||
- name: AIRFLOW_USERNAME
|
||||
value: {{ .Values.airflow.auth.username }}
|
||||
- name: AIRFLOW_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.airflow.auth.existingSecret }}{{ .Values.airflow.auth.existingSecret }}{{ else }}{{ template "airflow.fullname" . }}{{ end }}
|
||||
key: airflow-password
|
||||
- name: AIRFLOW_FERNET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.airflow.auth.existingSecret }}{{ .Values.airflow.auth.existingSecret }}{{ else }}{{ template "airflow.fullname" . }}{{ end }}
|
||||
key: airflow-fernetKey
|
||||
- name: AIRFLOW_WEBSERVER_HOST
|
||||
value: {{ template "airflow.fullname" . }}
|
||||
{{- if .Values.airflow.baseUrl }}
|
||||
- name: AIRFLOW_BASE_URL
|
||||
value: {{ .Values.airflow.baseUrl }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_LOAD_EXAMPLES
|
||||
{{- if .Values.airflow.loadExamples }}
|
||||
value: "yes"
|
||||
{{- else }}
|
||||
value: "no"
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.extraEnvVars }}
|
||||
{{ toYaml .Values.airflow.extraEnvVars | nindent 8 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
volumeMounts:
|
||||
{{- if .Files.Glob "files/dags/*.py" }}
|
||||
- name: local-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/local
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.dagsConfigMap }}
|
||||
- name: external-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/external
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.cloneDagFilesFromGit.enabled }}
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/git
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.configurationConfigMap }}
|
||||
- name: custom-configuration-file
|
||||
mountPath: /opt/bitnami/airflow/airflow.cfg
|
||||
subPath: airflow.cfg
|
||||
{{- end }}
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
volumes:
|
||||
{{- if .Files.Glob "files/dags/*.py" }}
|
||||
- name: local-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/local
|
||||
configMap:
|
||||
name: {{ template "airflow.fullname" . }}-dag-files
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.dagsConfigMap }}
|
||||
- name: external-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/external
|
||||
configMap:
|
||||
name: {{ .Values.airflow.dagsConfigMap }}
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.cloneDagFilesFromGit.enabled }}
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/git
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.configurationConfigMap }}
|
||||
- name: custom-configuration-file
|
||||
mountPath: /opt/bitnami/airflow/airflow.cfg
|
||||
subPath: airflow.cfg
|
||||
configMap:
|
||||
name: {{ .Values.airflow.configurationConfigMap }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 10 }}
|
||||
volumes:
|
||||
{{- if .Files.Glob "files/dags/*.py" }}
|
||||
- name: local-dag-files
|
||||
configMap:
|
||||
name: {{ template "airflow.fullname" . }}-dag-files
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.dagsConfigMap }}
|
||||
- name: external-dag-files
|
||||
configMap:
|
||||
name: {{ .Values.airflow.dagsConfigMap }}
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.cloneDagFilesFromGit.enabled }}
|
||||
- name: git-cloned-dag-files
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.configurationConfigMap }}
|
||||
- name: custom-configuration-file
|
||||
configMap:
|
||||
name: {{ .Values.airflow.configurationConfigMap }}
|
||||
{{- end }}
|
||||
|
||||
@@ -17,57 +17,55 @@ spec:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
{{ toYaml .Values.metrics.podAnnotations | indent 8 }}
|
||||
annotations: {{- toYaml .Values.metrics.podAnnotations | nindent 8 }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "airflow.name" . }}
|
||||
app.kubernetes.io/component: metrics
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
spec:
|
||||
{{- include "airflow.imagePullSecrets" . | indent 6 }}
|
||||
{{- include "airflow.imagePullSecrets" . | nindent 6 }}
|
||||
containers:
|
||||
- image: {{ template "airflow.metrics.image" . }}
|
||||
name: airflow-exporter
|
||||
env:
|
||||
- name: AIRFLOW_PROMETHEUS_DATABASE_BACKEND
|
||||
value: "postgres"
|
||||
- name: AIRFLOW_PROMETHEUS_DATABASE_HOST
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ template "airflow.postgresql.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.host | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_PROMETHEUS_DATABASE_PORT
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: "5432"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.port | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_PROMETHEUS_DATABASE_USER
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlUsername }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.user | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_PROMETHEUS_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
name: {{ template "airflow.postgresql.fullname" . }}
|
||||
key: postgresql-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
key: db-password
|
||||
{{- end }}
|
||||
- name: AIRFLOW_PROMETHEUS_DATABASE_NAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlDatabase }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.database | quote }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9112
|
||||
resources:
|
||||
{{ toYaml .Values.metrics.resources | indent 10 }}
|
||||
- image: {{ template "airflow.metrics.image" . }}
|
||||
name: airflow-exporter
|
||||
env:
|
||||
- name: AIRFLOW_PROMETHEUS_DATABASE_BACKEND
|
||||
value: "postgres"
|
||||
- name: AIRFLOW_PROMETHEUS_DATABASE_HOST
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ template "airflow.postgresql.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.host | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_PROMETHEUS_DATABASE_PORT
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: "5432"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.port | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_PROMETHEUS_DATABASE_USER
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlUsername }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.user | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_PROMETHEUS_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
name: {{ template "airflow.postgresql.fullname" . }}
|
||||
key: postgresql-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
key: db-password
|
||||
{{- end }}
|
||||
- name: AIRFLOW_PROMETHEUS_DATABASE_NAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlDatabase }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.database | quote }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9112
|
||||
resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -12,9 +12,9 @@ metadata:
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: metrics
|
||||
port: 9112
|
||||
targetPort: metrics
|
||||
- name: metrics
|
||||
port: 9112
|
||||
targetPort: metrics
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "airflow.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
|
||||
@@ -38,171 +38,167 @@ spec:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.nodeSelector | indent 8 }}
|
||||
nodeSelector: {{- toYaml .Values.nodeSelector | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.tolerations | indent 8 }}
|
||||
tolerations: {{- toYaml .Values.tolerations | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.affinity | indent 8 }}
|
||||
affinity: {{- toYaml .Values.affinity | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.cloneDagFilesFromGit.enabled }}
|
||||
initContainers:
|
||||
- name: git-clone-repository
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
git clone {{ .Values.airflow.cloneDagFilesFromGit.repository }} --branch {{ .Values.airflow.cloneDagFilesFromGit.branch }} /dags
|
||||
volumeMounts:
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /dags
|
||||
- name: git-clone-repository
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
git clone {{ .Values.airflow.cloneDagFilesFromGit.repository }} --branch {{ .Values.airflow.cloneDagFilesFromGit.branch }} /dags
|
||||
volumeMounts:
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /dags
|
||||
containers:
|
||||
- name: git-repo-syncer
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
while true; do
|
||||
cd /dags && git pull origin {{ .Values.airflow.cloneDagFilesFromGit.branch }}
|
||||
sleep {{ default "60" .Values.airflow.cloneDagFilesFromGit.interval }}
|
||||
done
|
||||
volumeMounts:
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /dags
|
||||
- name: git-repo-syncer
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
while true; do
|
||||
cd /dags && git pull origin {{ .Values.airflow.cloneDagFilesFromGit.branch }}
|
||||
sleep {{ default "60" .Values.airflow.cloneDagFilesFromGit.interval }}
|
||||
done
|
||||
volumeMounts:
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /dags
|
||||
{{- else }}
|
||||
containers:
|
||||
{{- end }}
|
||||
- name: airflow-worker
|
||||
image: "{{ template "airflow.workerImage" . }}"
|
||||
imagePullPolicy: "{{ .Values.workerImage.pullPolicy }}"
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 10 }}
|
||||
env:
|
||||
{{- if .Values.workerImage.debug }}
|
||||
- name: BASH_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_LOG_LEVEL
|
||||
value: "trace8"
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_NAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlDatabase }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.database | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_USERNAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlUsername }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.user | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
name: {{ template "airflow.postgresql.fullname" . }}
|
||||
key: postgresql-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
key: db-password
|
||||
- name: airflow-worker
|
||||
image: "{{ template "airflow.workerImage" . }}"
|
||||
imagePullPolicy: "{{ .Values.workerImage.pullPolicy }}"
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
env:
|
||||
{{- if .Values.workerImage.debug }}
|
||||
- name: BASH_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_LOG_LEVEL
|
||||
value: "trace8"
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_HOST
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ template "airflow.postgresql.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.host | quote }}
|
||||
- name: AIRFLOW_DATABASE_NAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlDatabase }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.database | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_USERNAME
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ .Values.postgresql.postgresqlUsername }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.user | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
name: {{ template "airflow.postgresql.fullname" . }}
|
||||
key: postgresql-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
key: db-password
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_HOST
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: {{ template "airflow.postgresql.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.host | quote }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_PORT_NUMBER
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: "5432"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.port | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_HOST
|
||||
{{- if .Values.redis.enabled }}
|
||||
value: {{ template "airflow.redis.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalRedis.host | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_PORT_NUMBER
|
||||
{{- if .Values.redis.enabled }}
|
||||
value: "6379"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalRedis.port | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.redis.enabled }}
|
||||
name: {{ template "airflow.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externalredis" }}
|
||||
key: redis-password
|
||||
{{- end }}
|
||||
- name: AIRFLOW_EXECUTOR
|
||||
value: "CeleryExecutor"
|
||||
- name: AIRFLOW_FERNET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.airflow.auth.existingSecret }}{{ .Values.airflow.auth.existingSecret }}{{ else }}{{ template "airflow.fullname" . }}{{ end }}
|
||||
key: airflow-fernetKey
|
||||
- name: AIRFLOW_WEBSERVER_HOST
|
||||
value: {{ template "airflow.fullname" . }}
|
||||
{{- if .Values.airflow.extraEnvVars }}
|
||||
{{ toYaml .Values.airflow.extraEnvVars | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: worker
|
||||
containerPort: {{ .Values.airflow.worker.port }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: worker
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
- name: AIRFLOW_DATABASE_PORT_NUMBER
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
value: "5432"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalDatabase.port | quote }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: worker
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
- name: REDIS_HOST
|
||||
{{- if .Values.redis.enabled }}
|
||||
value: {{ template "airflow.redis.fullname" . }}
|
||||
{{- else }}
|
||||
value: {{ .Values.externalRedis.host | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_PORT_NUMBER
|
||||
{{- if .Values.redis.enabled }}
|
||||
value: "6379"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalRedis.port | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.redis.enabled }}
|
||||
name: {{ template "airflow.redis.secretName" . }}
|
||||
key: redis-password
|
||||
{{- else }}
|
||||
name: {{ printf "%s-%s" .Release.Name "externalredis" }}
|
||||
key: redis-password
|
||||
volumeMounts:
|
||||
{{- if .Files.Glob "files/dags/*.py" }}
|
||||
- name: local-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/local
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.dagsConfigMap }}
|
||||
- name: external-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/external
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.cloneDagFilesFromGit.enabled }}
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/git
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.configurationConfigMap }}
|
||||
- name: custom-configuration-file
|
||||
mountPath: /opt/bitnami/airflow/airflow.cfg
|
||||
subPath: airflow.cfg
|
||||
{{- end }}
|
||||
- name: AIRFLOW_EXECUTOR
|
||||
value: "CeleryExecutor"
|
||||
- name: AIRFLOW_FERNET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.airflow.auth.existingSecret }}{{ .Values.airflow.auth.existingSecret }}{{ else }}{{ template "airflow.fullname" . }}{{ end }}
|
||||
key: airflow-fernetKey
|
||||
- name: AIRFLOW_WEBSERVER_HOST
|
||||
value: {{ template "airflow.fullname" . }}
|
||||
{{- if .Values.airflow.extraEnvVars }}
|
||||
{{ toYaml .Values.airflow.extraEnvVars | nindent 8 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: worker
|
||||
containerPort: {{ .Values.airflow.worker.port }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: worker
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: worker
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Files.Glob "files/dags/*.py" }}
|
||||
- name: local-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/local
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.dagsConfigMap }}
|
||||
- name: external-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/external
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.cloneDagFilesFromGit.enabled }}
|
||||
- name: git-cloned-dag-files
|
||||
mountPath: /opt/bitnami/airflow/dags/git
|
||||
{{- end }}
|
||||
{{- if .Values.airflow.configurationConfigMap }}
|
||||
- name: custom-configuration-file
|
||||
mountPath: /opt/bitnami/airflow/airflow.cfg
|
||||
subPath: airflow.cfg
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Files.Glob "files/dags/*.py" }}
|
||||
- name: local-dag-files
|
||||
|
||||
@@ -11,9 +11,9 @@ spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: worker
|
||||
port: 8793
|
||||
targetPort: worker
|
||||
- name: worker
|
||||
port: 8793
|
||||
targetPort: worker
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "airflow.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
|
||||
@@ -19,12 +19,12 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
{{- if and .Values.service.nodePort (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) }}
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
{{- end }}
|
||||
targetPort: http
|
||||
- name: http
|
||||
port: 8080
|
||||
{{- if and .Values.service.nodePort (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) }}
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
{{- end }}
|
||||
targetPort: http
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "airflow.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/airflow
|
||||
tag: 1.10.5-debian-9-r47
|
||||
tag: 1.10.6-debian-9-r0
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -38,7 +38,7 @@ image:
|
||||
schedulerImage:
|
||||
registry: docker.io
|
||||
repository: bitnami/airflow-scheduler
|
||||
tag: 1.10.5-debian-9-r52
|
||||
tag: 1.10.6-debian-9-r1
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -62,7 +62,7 @@ schedulerImage:
|
||||
workerImage:
|
||||
registry: docker.io
|
||||
repository: bitnami/airflow-worker
|
||||
tag: 1.10.5-debian-9-r52
|
||||
tag: 1.10.6-debian-9-r1
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -86,7 +86,7 @@ workerImage:
|
||||
git:
|
||||
registry: docker.io
|
||||
repository: bitnami/git
|
||||
tag: 2.23.0-debian-9-r71
|
||||
tag: 2.24.0-debian-9-r10
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
@@ -140,6 +140,17 @@ airflow:
|
||||
port: 8793
|
||||
replicas: 3
|
||||
|
||||
## All the parameters from the configuration file can be overwritten by using environment variables with this format:
|
||||
## AIRFLOW__{SECTION}__{KEY}. Note the double underscores. More info at https://airflow.readthedocs.io/en/stable/howto/set-config.html
|
||||
##
|
||||
# extraEnvVars:
|
||||
# - name: AIRFLOW__SMTP__SMTP_HOST
|
||||
# value: "localhost"
|
||||
# - name: AIRFLOW__SMTP__SMTP_PORT
|
||||
# value: "25"
|
||||
# - name: AIRFLOW__SMTP__USER
|
||||
# value: ""
|
||||
|
||||
auth:
|
||||
## Option to force users to specify a password. That is required for 'helm upgrade' to work properly.
|
||||
## If it is not forced, a random password will be generated.
|
||||
@@ -162,17 +173,6 @@ airflow:
|
||||
##
|
||||
# existingSecret:
|
||||
|
||||
## All the parameters from the configuration file can be overwritten by using environment variables with this format:
|
||||
## AIRFLOW__{SECTION}__{KEY}. Note the double underscores. More info at https://airflow.readthedocs.io/en/stable/howto/set-config.html
|
||||
##
|
||||
# extraEnvVars:
|
||||
# - name: AIRFLOW__SMTP__SMTP_HOST
|
||||
# value: "localhost"
|
||||
# - name: AIRFLOW__SMTP__SMTP_PORT
|
||||
# value: "25"
|
||||
# - name: AIRFLOW__SMTP__USER
|
||||
# value: ""
|
||||
|
||||
## Kubernetes Security Context
|
||||
## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
@@ -223,21 +223,20 @@ ingress:
|
||||
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||
##
|
||||
hosts:
|
||||
- name: airflow.local
|
||||
path: /
|
||||
- name: airflow.local
|
||||
path: /
|
||||
## Set this to true in order to enable TLS on the ingress record
|
||||
tls: false
|
||||
|
||||
## Set this to true in order to enable TLS on the ingress record
|
||||
tls: false
|
||||
## Optionally specify the TLS hosts for the ingress record
|
||||
## Useful when the Ingress controller supports www-redirection
|
||||
## If not specified, the above host name will be used
|
||||
# tlsHosts:
|
||||
# - www.airflow.local
|
||||
# - airflow.local
|
||||
|
||||
## Optionally specify the TLS hosts for the ingress record
|
||||
## Useful when the Ingress controller supports www-redirection
|
||||
## If not specified, the above host name will be used
|
||||
# tlsHosts:
|
||||
# - www.airflow.local
|
||||
# - airflow.local
|
||||
|
||||
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||
tlsSecret: airflow.local-tls
|
||||
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||
tlsSecret: airflow.local-tls
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
@@ -305,7 +304,7 @@ readinessProbe:
|
||||
postgresql:
|
||||
enabled: true
|
||||
postgresqlUsername: bn_airflow
|
||||
#postgresqlPassword:
|
||||
# postgresqlPassword:
|
||||
postgresqlDatabase: bitnami_airflow
|
||||
|
||||
externalDatabase:
|
||||
@@ -347,7 +346,7 @@ metrics:
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/airflow-exporter
|
||||
tag: 0.20180711.0-debian-9-r79
|
||||
tag: 0.20180711.0-debian-9-r94
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
@@ -356,10 +355,6 @@ metrics:
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9112"
|
||||
|
||||
## Metrics exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
@@ -370,5 +365,8 @@ metrics:
|
||||
# tolerations: []
|
||||
|
||||
## Metrics exporter pod Annotation and Labels
|
||||
# podAnnotations: {}
|
||||
# podLabels: {}
|
||||
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9112"
|
||||
|
||||
+34
-35
@@ -14,7 +14,7 @@
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/airflow
|
||||
tag: 1.10.5-debian-9-r47
|
||||
tag: 1.10.6-debian-9-r0
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -38,7 +38,7 @@ image:
|
||||
schedulerImage:
|
||||
registry: docker.io
|
||||
repository: bitnami/airflow-scheduler
|
||||
tag: 1.10.5-debian-9-r52
|
||||
tag: 1.10.6-debian-9-r1
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -62,7 +62,7 @@ schedulerImage:
|
||||
workerImage:
|
||||
registry: docker.io
|
||||
repository: bitnami/airflow-worker
|
||||
tag: 1.10.5-debian-9-r52
|
||||
tag: 1.10.6-debian-9-r1
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -86,7 +86,7 @@ workerImage:
|
||||
git:
|
||||
registry: docker.io
|
||||
repository: bitnami/git
|
||||
tag: 2.23.0-debian-9-r71
|
||||
tag: 2.24.0-debian-9-r10
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
@@ -140,6 +140,17 @@ airflow:
|
||||
port: 8793
|
||||
replicas: 1
|
||||
|
||||
## All the parameters from the configuration file can be overwritten by using environment variables with this format:
|
||||
## AIRFLOW__{SECTION}__{KEY}. Note the double underscores. More info at https://airflow.readthedocs.io/en/stable/howto/set-config.html
|
||||
##
|
||||
# extraEnvVars:
|
||||
# - name: AIRFLOW__SMTP__SMTP_HOST
|
||||
# value: "localhost"
|
||||
# - name: AIRFLOW__SMTP__SMTP_PORT
|
||||
# value: "25"
|
||||
# - name: AIRFLOW__SMTP__USER
|
||||
# value: ""
|
||||
|
||||
auth:
|
||||
## Option to force users to specify a password. That is required for 'helm upgrade' to work properly.
|
||||
## If it is not forced, a random password will be generated.
|
||||
@@ -162,17 +173,6 @@ airflow:
|
||||
##
|
||||
# existingSecret:
|
||||
|
||||
## All the parameters from the configuration file can be overwritten by using environment variables with this format:
|
||||
## AIRFLOW__{SECTION}__{KEY}. Note the double underscores. More info at https://airflow.readthedocs.io/en/stable/howto/set-config.html
|
||||
##
|
||||
# extraEnvVars:
|
||||
# - name: AIRFLOW__SMTP__SMTP_HOST
|
||||
# value: "localhost"
|
||||
# - name: AIRFLOW__SMTP__SMTP_PORT
|
||||
# value: "25"
|
||||
# - name: AIRFLOW__SMTP__USER
|
||||
# value: ""
|
||||
|
||||
## Kubernetes Security Context
|
||||
## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
@@ -223,21 +223,20 @@ ingress:
|
||||
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||
##
|
||||
hosts:
|
||||
- name: airflow.local
|
||||
path: /
|
||||
- name: airflow.local
|
||||
path: /
|
||||
## Set this to true in order to enable TLS on the ingress record
|
||||
tls: false
|
||||
|
||||
## Set this to true in order to enable TLS on the ingress record
|
||||
tls: false
|
||||
## Optionally specify the TLS hosts for the ingress record
|
||||
## Useful when the Ingress controller supports www-redirection
|
||||
## If not specified, the above host name will be used
|
||||
# tlsHosts:
|
||||
# - www.airflow.local
|
||||
# - airflow.local
|
||||
|
||||
## Optionally specify the TLS hosts for the ingress record
|
||||
## Useful when the Ingress controller supports www-redirection
|
||||
## If not specified, the above host name will be used
|
||||
# tlsHosts:
|
||||
# - www.airflow.local
|
||||
# - airflow.local
|
||||
|
||||
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||
tlsSecret: airflow.local-tls
|
||||
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||
tlsSecret: airflow.local-tls
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
@@ -305,7 +304,7 @@ readinessProbe:
|
||||
postgresql:
|
||||
enabled: true
|
||||
postgresqlUsername: bn_airflow
|
||||
#postgresqlPassword:
|
||||
# postgresqlPassword:
|
||||
postgresqlDatabase: bitnami_airflow
|
||||
|
||||
externalDatabase:
|
||||
@@ -347,7 +346,7 @@ metrics:
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/airflow-exporter
|
||||
tag: 0.20180711.0-debian-9-r79
|
||||
tag: 0.20180711.0-debian-9-r94
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
@@ -356,10 +355,6 @@ metrics:
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9112"
|
||||
|
||||
## Metrics exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
@@ -370,5 +365,9 @@ metrics:
|
||||
# tolerations: []
|
||||
|
||||
## Metrics exporter pod Annotation and Labels
|
||||
# podAnnotations: {}
|
||||
# podLabels: {}
|
||||
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9112"
|
||||
|
||||
|
||||
+10
-10
@@ -1,20 +1,20 @@
|
||||
apiVersion: v1
|
||||
name: apache
|
||||
version: 7.2.2
|
||||
version: 7.3.0
|
||||
appVersion: 2.4.41
|
||||
description: Chart for Apache HTTP Server
|
||||
keywords:
|
||||
- apache
|
||||
- http
|
||||
- https
|
||||
- www
|
||||
- web
|
||||
- reverse proxy
|
||||
- apache
|
||||
- http
|
||||
- https
|
||||
- www
|
||||
- web
|
||||
- reverse proxy
|
||||
home: https://httpd.apache.org
|
||||
icon: https://bitnami.com/assets/stacks/apache/img/apache-stack-220x234.png
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-apache
|
||||
- https://github.com/bitnami/bitnami-docker-apache
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
|
||||
@@ -75,6 +75,10 @@ The following tables lists the configurable parameters of the Apache chart and t
|
||||
| `cloneHtdocsFromGit.branch` | Branch inside the git repository | `nil` |
|
||||
| `cloneHtdocsFromGit.interval` | Interval for sidecar container pull from the repository | `60` |
|
||||
| `podAnnotations` | Pod annotations | `{}` |
|
||||
| `livenessProbe.enabled` | Enable liveness probe | `true` |
|
||||
| `livenessProbe.path` | Path to access on the HTTP server | `/` |
|
||||
| `readinessProbe.enabled` | Enable readiness probe | `true` |
|
||||
| `readinessProbe.path` | Path to access on the HTTP server | `/` |
|
||||
| `ingress.enabled` | Enable ingress controller resource | `false` |
|
||||
| `ingress.hostname` | Default host for the ingress resource | `example.local` |
|
||||
| `ingress.certManager` | Add annotations for cert-manager | `false` |
|
||||
@@ -86,7 +90,9 @@ The following tables lists the configurable parameters of the Apache chart and t
|
||||
| `ingress.secrets[0].name` | TLS Secret Name | `nil` |
|
||||
| `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` |
|
||||
| `ingress.secrets[0].key` | TLS Secret Key | `nil` |
|
||||
| `affinity` | Map of node/pod affinities | `{}` |
|
||||
| `affinity` | Map of node/pod affinities | `{}` (The value is evaluated as a template) |
|
||||
| `nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) |
|
||||
| `tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) |
|
||||
| `metrics.enabled` | Start a side-car prometheus exporter | `false` |
|
||||
| `metrics.image.registry` | Apache exporter image registry | `docker.io` |
|
||||
| `metrics.image.repository` | Apache exporter image name | `lusotycoon/apache-exporter` |
|
||||
|
||||
@@ -23,6 +23,24 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "apache.labels" -}}
|
||||
app.kubernetes.io/name: {{ include "apache.name" . }}
|
||||
helm.sh/chart: {{ include "apache.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
|
||||
*/}}
|
||||
{{- define "apache.matchLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "apache.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Apache image name
|
||||
*/}}
|
||||
@@ -120,7 +138,7 @@ emptyDir: {}
|
||||
{{- else if .Values.htdocsConfigMap }}
|
||||
configMap:
|
||||
name: {{ .Values.htdocsConfigMap }}
|
||||
{{- else if .Values.htdocsPVC }}
|
||||
{{- else if .Values.htdocsPVC }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.htdocsPVC }}
|
||||
{{- end }}
|
||||
@@ -216,4 +234,17 @@ Get the httpd.conf config map name.
|
||||
{{- else -}}
|
||||
{{- printf "%s-httpd-conf" (include "apache.fullname" . ) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Renders a value that contains template.
|
||||
Usage:
|
||||
{{ include "apache.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
|
||||
*/}}
|
||||
{{- define "apache.tplValue" -}}
|
||||
{{- if typeIs "string" .value }}
|
||||
{{- tpl .value .context }}
|
||||
{{- else }}
|
||||
{{- tpl (.value | toYaml) .context }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -3,11 +3,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "apache.fullname" . }}-vhosts
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "apache.fullname" . }}
|
||||
helm.sh/chart: {{ include "apache.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
labels: {{- include "apache.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{ (.Files.Glob "files/vhosts/*.conf").AsConfig | indent 2 }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -3,11 +3,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "apache.fullname" . }}-httpd-conf
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "apache.fullname" . }}
|
||||
helm.sh/chart: {{ include "apache.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
labels: {{- include "apache.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{ (.Files.Glob "files/httpd.conf").AsConfig | indent 2 }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -1,26 +1,16 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "apache.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "apache.fullname" . }}
|
||||
helm.sh/chart: {{ include "apache.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
name: {{ include "apache.fullname" . }}
|
||||
labels: {{- include "apache.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ template "apache.fullname" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
matchLabels: {{- include "apache.matchLabels" . | nindent 6 }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "apache.fullname" . }}
|
||||
helm.sh/chart: {{ include "apache.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
|
||||
labels: {{- include "apache.labels" . | nindent 8 }}
|
||||
{{- if or .Values.podAnnotations (and .Values.metrics.enabled .Values.metrics.podAnnotations) }}
|
||||
annotations:
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{- toYaml .Values.podAnnotations | nindent 8 }}
|
||||
@@ -30,125 +20,137 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "apache.imagePullSecrets" . | nindent 6 }}
|
||||
{{- include "apache.imagePullSecrets" . | nindent 6 }}
|
||||
hostAliases:
|
||||
- ip: "127.0.0.1"
|
||||
hostnames:
|
||||
- "status.localhost"
|
||||
- ip: "127.0.0.1"
|
||||
hostnames:
|
||||
- "status.localhost"
|
||||
{{- if .Values.affinity }}
|
||||
affinity: {{- include "apache.tplValue" (dict "value" .Values.affinity "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector: {{- include "apache.tplValue" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tolerations }}
|
||||
tolerations: {{- include "apache.tplValue" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.cloneHtdocsFromGit.enabled }}
|
||||
initContainers:
|
||||
- name: git-clone-repository
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
git clone {{ .Values.cloneHtdocsFromGit.repository }} --branch {{ .Values.cloneHtdocsFromGit.branch }} /app
|
||||
volumeMounts:
|
||||
- name: htdocs
|
||||
mountPath: /app
|
||||
- name: git-clone-repository
|
||||
image: {{ include "git.image" . }}
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
git clone {{ .Values.cloneHtdocsFromGit.repository }} --branch {{ .Values.cloneHtdocsFromGit.branch }} /app
|
||||
volumeMounts:
|
||||
- name: htdocs
|
||||
mountPath: /app
|
||||
containers:
|
||||
- name: git-repo-syncer
|
||||
image: "{{ template "git.image" . }}"
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
while true; do
|
||||
cd /app && git pull origin {{ .Values.cloneHtdocsFromGit.branch }}
|
||||
sleep {{ .Values.cloneHtdocsFromGit.interval }}
|
||||
done
|
||||
volumeMounts:
|
||||
- name: htdocs
|
||||
mountPath: /app
|
||||
- name: git-repo-syncer
|
||||
image: {{ include "git.image" . }}
|
||||
imagePullPolicy: {{ .Values.git.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
while true; do
|
||||
cd /app && git pull origin {{ .Values.cloneHtdocsFromGit.branch }}
|
||||
sleep {{ .Values.cloneHtdocsFromGit.interval }}
|
||||
done
|
||||
volumeMounts:
|
||||
- name: htdocs
|
||||
mountPath: /app
|
||||
{{- else }}
|
||||
containers:
|
||||
{{- end }}
|
||||
- name: "{{ template "apache.fullname" . }}"
|
||||
image: "{{ template "apache.image" . }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
- name: https
|
||||
containerPort: 8443
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
- name: apache
|
||||
image: {{ include "apache.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
- name: https
|
||||
containerPort: 8443
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.livenessProbe.path }}
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.readinessProbe.path }}
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.resources }}
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if (include "apache.useHtdocs" .) }}
|
||||
- name: htdocs
|
||||
mountPath: /app
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/vhosts/*.conf") (.Values.vhostsConfigMap) }}
|
||||
- name: vhosts
|
||||
mountPath: /vhosts
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/httpd.conf") (.Values.httpdConfConfigMap) }}
|
||||
- name: httpd-conf
|
||||
mountPath: /opt/bitnami/apache/conf/httpd.conf
|
||||
subPath: httpd.conf
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
image: {{ template "apache.metrics.image" . }}
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
command: ['/bin/apache_exporter', '-scrape_uri', 'http://status.localhost:8080/server-status/?auto']
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9117
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 1
|
||||
{{- if .Values.metrics.resources }}
|
||||
resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
resources: {{ toYaml .Values.resources | nindent 10 }}
|
||||
volumeMounts:
|
||||
volumes:
|
||||
{{- if (include "apache.useHtdocs" .) }}
|
||||
- name: htdocs
|
||||
mountPath: /app
|
||||
{{- include "apache.htdocsVolume" . | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/vhosts/*.conf") (.Values.vhostsConfigMap) }}
|
||||
- name: vhosts
|
||||
mountPath: /vhosts
|
||||
configMap:
|
||||
name: {{ include "apache.vhostsConfigMap" . }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/httpd.conf") (.Values.httpdConfConfigMap) }}
|
||||
- name: httpd-conf
|
||||
mountPath: /opt/bitnami/apache/conf/httpd.conf
|
||||
subPath: httpd.conf
|
||||
configMap:
|
||||
name: {{ include "apache.httpdConfConfigMap" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
image: {{ template "apache.metrics.image" . }}
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
command: [ '/bin/apache_exporter', '-scrape_uri', 'http://status.localhost:8080/server-status/?auto']
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9117
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 1
|
||||
resources: {{ toYaml .Values.metrics.resources | nindent 10 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if (include "apache.useHtdocs" .) }}
|
||||
- name: htdocs
|
||||
{{- include "apache.htdocsVolume" . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/vhosts/*.conf") (.Values.vhostsConfigMap) }}
|
||||
- name: vhosts
|
||||
configMap:
|
||||
name: {{ include "apache.vhostsConfigMap" . }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/httpd.conf") (.Values.httpdConfConfigMap) }}
|
||||
- name: httpd-conf
|
||||
configMap:
|
||||
name: {{ include "apache.httpdConfConfigMap" . }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "apache.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "apache.fullname" . }}
|
||||
helm.sh/chart: {{ include "apache.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
name: {{ include "apache.fullname" . }}
|
||||
labels: {{- include "apache.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- if .Values.ingress.certManager }}
|
||||
kubernetes.io/tls-acme: "true"
|
||||
@@ -17,26 +13,25 @@ metadata:
|
||||
{{- end }}
|
||||
spec:
|
||||
rules:
|
||||
{{- if .Values.ingress.hostname }}
|
||||
- host: {{ .Values.ingress.hostname }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: "{{ template "apache.fullname" $ }}"
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .name }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
backend:
|
||||
serviceName: "{{ template "apache.fullname" $ }}"
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.hostname }}
|
||||
- host: {{ .Values.ingress.hostname }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: "{{ template "apache.fullname" $ }}"
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .name }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
backend:
|
||||
serviceName: "{{ template "apache.fullname" $ }}"
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{ toYaml .Values.ingress.tls | indent 4 }}
|
||||
tls: {{- toYaml .Values.ingress.tls | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,32 +1,28 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "apache.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "apache.fullname" . }}
|
||||
helm.sh/chart: {{ include "apache.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
name: {{ include "apache.fullname" . }}
|
||||
labels: {{- include "apache.labels" . | nindent 4 }}
|
||||
annotations: {{ include "apache.tplValue" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
|
||||
{{- if or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort") }}
|
||||
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.http)))}}
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.http }}
|
||||
{{- end }}
|
||||
- name: https
|
||||
port: {{ .Values.service.httpsPort }}
|
||||
targetPort: https
|
||||
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.https)))}}
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.https)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.https }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ template "apache.fullname" . }}
|
||||
selector: {{- include "apache.matchLabels" . | nindent 4 }}
|
||||
|
||||
@@ -4,32 +4,39 @@
|
||||
"properties": {
|
||||
"ingress": {
|
||||
"type": "object",
|
||||
"form": "ingress",
|
||||
"form": true,
|
||||
"title": "Ingress Details",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"form": "enableIngress",
|
||||
"enables": "ingress",
|
||||
"form": true,
|
||||
"title": "Use a custom hostname",
|
||||
"description": "Enable the ingress resource that allows you to access the WordPress installation."
|
||||
"description": "Enable the ingress resource that allows you to access the Apache installation."
|
||||
},
|
||||
"certManager": {
|
||||
"type": "boolean",
|
||||
"form": "enableCertManager",
|
||||
"form": true,
|
||||
"title": "Enable TLS annotations via cert-manager",
|
||||
"description": "Set this to true in order to add the corresponding annotations for cert-manager"
|
||||
"description": "Set this to true in order to add the corresponding annotations for cert-manager",
|
||||
"hidden": {
|
||||
"condition": false,
|
||||
"value": "ingress.enabled"
|
||||
}
|
||||
},
|
||||
"hostname": {
|
||||
"type": "string",
|
||||
"form": "hostname",
|
||||
"title": "Hostname"
|
||||
"form": true,
|
||||
"title": "Hostname",
|
||||
"hidden": {
|
||||
"condition": false,
|
||||
"value": "ingress.enabled"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"replicaCount": {
|
||||
"type": "integer",
|
||||
"form": "replicaCount",
|
||||
"form": true,
|
||||
"title": "Number of Replicas"
|
||||
},
|
||||
"metrics": {
|
||||
@@ -38,7 +45,7 @@
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"title": "Configure metrics exporter",
|
||||
"form": "enableMetrics"
|
||||
"form": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+100
-43
@@ -13,7 +13,7 @@
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/apache
|
||||
tag: 2.4.41-debian-9-r66
|
||||
tag: 2.4.41-debian-9-r89
|
||||
## Specify a imagePullPolicy
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
@@ -25,13 +25,18 @@ image:
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Bitnami git image version
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
##
|
||||
debug: false
|
||||
|
||||
## Bitnami Git image version
|
||||
## ref: https://hub.docker.com/r/bitnami/git/tags/
|
||||
##
|
||||
git:
|
||||
registry: docker.io
|
||||
repository: bitnami/git
|
||||
tag: 2.23.0-debian-9-r59
|
||||
tag: 2.24.0-debian-9-r12
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
@@ -40,8 +45,35 @@ git:
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## String to partially override apache.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override apache.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
|
||||
## Number of Apache replicas to deploy
|
||||
##
|
||||
replicaCount: 1
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
|
||||
## Get the server static content from a git repository
|
||||
##
|
||||
cloneHtdocsFromGit:
|
||||
enabled: false
|
||||
# repository:
|
||||
@@ -64,60 +96,61 @@ cloneHtdocsFromGit:
|
||||
##
|
||||
# httpdConfConfigMap:
|
||||
|
||||
## String to partially override apache.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override apache.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
|
||||
## Pod annotations
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
## Configure resource requests and limits
|
||||
## Apache pods' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# limits:
|
||||
# cpu: 200m
|
||||
# memory: 1Gi
|
||||
# requests:
|
||||
# memory: 256Mi
|
||||
# cpu: 250m
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
## Apache container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
path: "/"
|
||||
port: http
|
||||
initialDelaySeconds: 180
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
path: "/"
|
||||
port: http
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
## Configure the ingress resource that allows you to access the
|
||||
## Apache installation. Set up the URL
|
||||
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||
## Ingress paramaters
|
||||
##
|
||||
ingress:
|
||||
## Set to true to enable ingress record generation
|
||||
##
|
||||
enabled: false
|
||||
|
||||
## Set this to true in order to add the corresponding annotations for cert-manager
|
||||
##
|
||||
certManager: false
|
||||
|
||||
## When the ingress is enabled, a host pointing to this will be created
|
||||
##
|
||||
hostname: example.local
|
||||
|
||||
## Ingress annotations done as key:value pairs
|
||||
@@ -126,7 +159,7 @@ ingress:
|
||||
##
|
||||
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
|
||||
annotations:
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
|
||||
## The list of additional hostnames to be covered with this ingress record.
|
||||
@@ -136,11 +169,12 @@ ingress:
|
||||
## path: /
|
||||
|
||||
## The tls configuration for the ingress
|
||||
## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
|
||||
##
|
||||
tls:
|
||||
- hosts:
|
||||
- example.local
|
||||
secretName: example.local-tls
|
||||
- hosts:
|
||||
- example.local
|
||||
secretName: example.local-tls
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
@@ -156,19 +190,17 @@ ingress:
|
||||
# key:
|
||||
# certificate:
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Prometheus Exporter / Metrics
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
## Bitnami Apache Prometheus Exporter image
|
||||
## ref: https://hub.docker.com/r/bitnami/apache-exporter/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/apache-exporter
|
||||
tag: 0.7.0-debian-9-r84
|
||||
tag: 0.7.0-debian-9-r112
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
@@ -182,24 +214,49 @@ metrics:
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9117"
|
||||
## Metrics exporter resource requests and limits
|
||||
## Apache Prometheus exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
# resources: {}
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Service paramaters
|
||||
##
|
||||
service:
|
||||
## Service type
|
||||
##
|
||||
type: LoadBalancer
|
||||
# HTTP Port
|
||||
## HTTP Port
|
||||
##
|
||||
port: 80
|
||||
# HTTPS Port
|
||||
## HTTPS Port
|
||||
##
|
||||
httpsPort: 443
|
||||
## Specify the nodePort(s) value(s) for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
## nodePorts:
|
||||
## http: <to set explicitly, choose port between 30000-32767>
|
||||
## https: <to set explicitly, choose port between 30000-32767>
|
||||
## loadBalancerIP:
|
||||
nodePorts:
|
||||
http: ""
|
||||
https: ""
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## Enable client source IP preservation
|
||||
## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
|
||||
##
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
apiVersion: v1
|
||||
name: cassandra
|
||||
version: 4.1.6
|
||||
version: 4.1.11
|
||||
appVersion: 3.11.5
|
||||
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. Cassandra offers robust support for clusters spanning multiple datacenters, with asynchronous masterless replication allowing low latency operations for all clients.
|
||||
keywords:
|
||||
- cassandra
|
||||
- database
|
||||
- nosql
|
||||
icon: https://bitnami.com/assets/stacks/cassandra/img/cassandra-stack-220x234.png
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-cassandra
|
||||
- https://github.com/bitnami/bitnami-docker-cassandra
|
||||
home: http://cassandra.apache.org
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
|
||||
@@ -42,6 +42,25 @@ Create chart name and version as used by the chart label.
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "cassandra.labels" -}}
|
||||
app: {{ include "cassandra.name" . }}
|
||||
chart: {{ include "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
|
||||
*/}}
|
||||
{{- define "cassandra.matchLabels" -}}
|
||||
app: {{ include "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Return the proper Cassandra image name
|
||||
*/}}
|
||||
@@ -208,3 +227,16 @@ but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Renders a value that contains template.
|
||||
Usage:
|
||||
{{ include "cassandra.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
|
||||
*/}}
|
||||
{{- define "cassandra.tplValue" -}}
|
||||
{{- if typeIs "string" .value }}
|
||||
{{- tpl .value .context }}
|
||||
{{- else }}
|
||||
{{- tpl (.value | toYaml) .context }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
name: {{ include "cassandra.fullname" . }}
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- if .Values.dbUser.password }}
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}-configuration
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
name: {{ include "cassandra.fullname" . }}-configuration
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{ (.Files.Glob "files/conf/*").AsConfig | indent 2 }}
|
||||
{{ end }}
|
||||
|
||||
@@ -1,33 +1,27 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}-headless
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
name: {{ include "cassandra.fullname" . }}-headless
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
spec:
|
||||
clusterIP: None
|
||||
publishNotReadyAddresses: true
|
||||
ports:
|
||||
- name: intra
|
||||
port: 7000
|
||||
targetPort: intra
|
||||
- name: tls
|
||||
port: 7001
|
||||
targetPort: tls
|
||||
- name: jmx
|
||||
port: 7199
|
||||
targetPort: jmx
|
||||
- name: cql
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: cql
|
||||
{{- if .Values.cluster.enableRPC }}
|
||||
- name: thrift
|
||||
port: {{ .Values.service.thriftPort }}
|
||||
targetPort: thrift
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
- name: intra
|
||||
port: 7000
|
||||
targetPort: intra
|
||||
- name: tls
|
||||
port: 7001
|
||||
targetPort: tls
|
||||
- name: jmx
|
||||
port: 7199
|
||||
targetPort: jmx
|
||||
- name: cql
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: cql
|
||||
{{- if .Values.cluster.enableRPC }}
|
||||
- name: thrift
|
||||
port: {{ .Values.service.thriftPort }}
|
||||
targetPort: thrift
|
||||
{{- end }}
|
||||
selector: {{- include "cassandra.matchLabels" . | nindent 4 }}
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}-init-scripts
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
name: {{ include "cassandra.fullname" . }}-init-scripts
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*").AsConfig | indent 2 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,47 +1,37 @@
|
||||
{{- if .Values.networkPolicy.enabled }}
|
||||
kind: NetworkPolicy
|
||||
apiVersion: {{ template "networkPolicy.apiVersion" . }}
|
||||
apiVersion: {{ include "networkPolicy.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
name: {{ include "cassandra.fullname" . }}
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
matchLabels: {{- include "cassandra.matchLabels" . | nindent 6 }}
|
||||
ingress:
|
||||
# Allow inbound connections
|
||||
# CQL and Thrift ports
|
||||
- ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
- port: {{ .Values.service.thriftPort }}
|
||||
{{- if not .Values.networkPolicy.allowExternal }}
|
||||
- port: {{ .Values.service.port }}
|
||||
- port: {{ .Values.service.thriftPort }}
|
||||
from:
|
||||
{{- if not .Values.networkPolicy.allowExternal }}
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
{{ template "cassandra.fullname" . }}-client: "true"
|
||||
{{ include "cassandra.fullname" . }}-client: "true"
|
||||
{{- end }}
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
matchLabels: {{- include "cassandra.matchLabels" . | nindent 14 }}
|
||||
# Internal ports
|
||||
- ports:
|
||||
- port: intra
|
||||
- port: tls
|
||||
- port: jmx
|
||||
- port: intra
|
||||
- port: tls
|
||||
- port: jmx
|
||||
from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
matchLabels: {{- include "cassandra.matchLabels" . | nindent 14 }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
# Allow prometheus scrapes for metrics
|
||||
- ports:
|
||||
- port: 8080
|
||||
- port: 8080
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}-headless
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
name: {{ include "cassandra.fullname" . }}-headless
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
matchLabels: {{- include "cassandra.matchLabels" . | nindent 6 }}
|
||||
{{- if .Values.minAvailable }}
|
||||
minAvailable: {{ .Values.cluster.minimumAvailable }}
|
||||
{{- else }}
|
||||
|
||||
@@ -1,40 +1,31 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.service.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
name: {{ include "cassandra.fullname" . }}
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
annotations: {{ include "cassandra.tplValue" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }}
|
||||
spec:
|
||||
{{- if eq .Values.service.type "LoadBalancer" }} {{- if .Values.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }} {{- end }}
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: cql
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: cql
|
||||
{{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.cql)))}}
|
||||
nodePort: {{ .Values.service.nodePorts.cql }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
- name: cql
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: cql
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.cql)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.cql }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if .Values.cluster.enableRPC }}
|
||||
- name: thrift
|
||||
port: {{ .Values.service.thriftPort }}
|
||||
targetPort: thrift
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.thrift)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.thrift }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.cluster.enableRPC }}
|
||||
- name: thrift
|
||||
port: {{ .Values.service.thriftPort }}
|
||||
targetPort: thrift
|
||||
{{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.thrift)))}}
|
||||
nodePort: {{ .Values.service.nodePorts.thrift }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
selector: {{- include "cassandra.matchLabels" . | nindent 4 }}
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ template "cassandra.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
name: {{ include "cassandra.fullname" . }}
|
||||
labels: {{- include "cassandra.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
serviceName: {{ template "cassandra.fullname" . }}-headless
|
||||
matchLabels: {{- include "cassandra.matchLabels" . | nindent 6 }}
|
||||
serviceName: {{ include "cassandra.fullname" . }}-headless
|
||||
replicas: {{ .Values.cluster.replicaCount }}
|
||||
updateStrategy:
|
||||
type: {{ .Values.statefulset.updateStrategy }}
|
||||
@@ -24,60 +18,61 @@ spec:
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
{{- if .Values.podLabels }}
|
||||
{{ toYaml .Values.podLabels | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
|
||||
labels: {{- include "cassandra.labels" . | nindent 8 }}
|
||||
{{- if .Values.podLabels }}
|
||||
{{- toYaml .Values.podLabels | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.podAnnotations (and .Values.metrics.enabled .Values.metrics.podAnnotations) }}
|
||||
annotations:
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{ toYaml .Values.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
{{ toYaml .Values.metrics.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{- toYaml .Values.podAnnotations | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.podAnnotations }}
|
||||
{{- toYaml .Values.metrics.podAnnotations | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.selector }}
|
||||
{{ toYaml .Values.selector | indent 6 }}
|
||||
{{- end }}
|
||||
{{- include "cassandra.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity: {{- include "cassandra.tplValue" (dict "value" .Values.affinity "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector: {{- include "cassandra.tplValue" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tolerations }}
|
||||
tolerations: {{- include "cassandra.tplValue" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- include "cassandra.imagePullSecrets" . | indent 6 }}
|
||||
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
|
||||
initContainers:
|
||||
- name: volume-permissions
|
||||
image: "{{ template "cassandra.volumePermissions.image" . }}"
|
||||
imagePullPolicy: {{ default "" .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/cassandra"]
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
resources: {{ toYaml .Values.volumePermissions.resources | nindent 10 }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/cassandra
|
||||
- name: volume-permissions
|
||||
image: {{ include "cassandra.volumePermissions.image" . }}
|
||||
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }} /bitnami/cassandra
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
{{- if .Values.volumePermissions.resources }}
|
||||
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/cassandra
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: cassandra
|
||||
command:
|
||||
- bash
|
||||
- -ec
|
||||
# Node 0 is the password seeder
|
||||
- |
|
||||
- name: cassandra
|
||||
command:
|
||||
- bash
|
||||
- -ec
|
||||
# Node 0 is the password seeder
|
||||
- |
|
||||
if [[ $HOSTNAME =~ (.*)-0$ ]]; then
|
||||
echo "Setting node as password seeder"
|
||||
export CASSANDRA_PASSWORD_SEEDER=yes
|
||||
@@ -86,188 +81,188 @@ spec:
|
||||
export CASSANDRA_IGNORE_INITDB_SCRIPTS=1
|
||||
fi
|
||||
{{ .Values.entrypoint }} {{ .Values.cmd }}
|
||||
image: {{ template "cassandra.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
resources: {{ toYaml .Values.resources | nindent 10 }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: CASSANDRA_CLUSTER_NAME
|
||||
value: {{ .Values.cluster.name }}
|
||||
- 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:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.dbUser.existingSecret }}{{ .Values.dbUser.existingSecret }}{{- else }}{{ template "cassandra.fullname" . }}{{- end }}
|
||||
key: cassandra-password
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: CASSANDRA_USER
|
||||
value: {{ .Values.dbUser.user | quote }}
|
||||
- name: CASSANDRA_NUM_TOKENS
|
||||
value: {{ .Values.cluster.numTokens | quote }}
|
||||
- name: CASSANDRA_DATACENTER
|
||||
value: {{ .Values.cluster.datacenter }}
|
||||
- name: CASSANDRA_ENDPOINT_SNITCH
|
||||
value: {{ .Values.cluster.endpointSnitch }}
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: CASSANDRA_INTERNODE_ENCRYPTION
|
||||
value: {{ .Values.cluster.internodeEncryption | quote }}
|
||||
- name: CASSANDRA_CLIENT_ENCRYPTION
|
||||
value: {{ .Values.cluster.clientEncryption | quote }}
|
||||
- name: CASSANDRA_TRUSTSTORE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.tlsEncryptionSecretName }}
|
||||
key: truststore-password
|
||||
- name: CASSANDRA_KEYSTORE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.tlsEncryptionSecretName }}
|
||||
key: keystore-password
|
||||
{{- end }}
|
||||
- name: CASSANDRA_ENDPOINT_SNITCH
|
||||
value: {{ .Values.cluster.endpointSnitch }}
|
||||
- name: CASSANDRA_RACK
|
||||
value: {{ .Values.cluster.rack }}
|
||||
{{- if .Values.jvm.maxHeapSize }}
|
||||
- name: MAX_HEAP_SIZE
|
||||
value: {{ .Values.jvm.maxHeapSize | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.jvm.newHeapSize }}
|
||||
- name: HEAP_NEWSIZE
|
||||
value: {{ .Values.jvm.newHeapSize | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.jvm.extraOpts }}
|
||||
- name: JVM_EXTRA_OPTS
|
||||
value: {{ .Values.jvm.extraOpts | quote }}
|
||||
{{- end }}
|
||||
- name: CASSANDRA_ENABLE_RPC
|
||||
value: {{ .Values.cluster.enableRPC | quote }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: [ "/bin/sh", "-c", "nodetool status" ]
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: [ "/bin/sh", "-c", "nodetool status | grep -E \"^UN\\s+${POD_IP}\"" ]
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if not .Values.persistence.enabled }}
|
||||
lifecycle:
|
||||
preStop:
|
||||
image: {{ include "cassandra.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: CASSANDRA_CLUSTER_NAME
|
||||
value: {{ .Values.cluster.name }}
|
||||
- name: CASSANDRA_SEEDS
|
||||
{{- $global := . }}
|
||||
{{- $replicas := .Values.cluster.seedCount | int }}
|
||||
{{- $domain := .Values.cluster.domain }}
|
||||
value: "{{- range $i, $e := until $replicas }}{{ include "cassandra.fullname" $global }}-{{ $i }}.{{ include "cassandra.fullname" $global }}-headless.{{ $global.Release.Namespace }}.svc.{{ $domain }}{{- if (lt ( add1 $i ) $replicas ) }},{{- end }}{{- end }}"
|
||||
- name: CASSANDRA_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.dbUser.existingSecret }}{{ .Values.dbUser.existingSecret }}{{- else }}{{ include "cassandra.fullname" . }}{{- end }}
|
||||
key: cassandra-password
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: CASSANDRA_USER
|
||||
value: {{ .Values.dbUser.user | quote }}
|
||||
- name: CASSANDRA_NUM_TOKENS
|
||||
value: {{ .Values.cluster.numTokens | quote }}
|
||||
- name: CASSANDRA_DATACENTER
|
||||
value: {{ .Values.cluster.datacenter }}
|
||||
- name: CASSANDRA_ENDPOINT_SNITCH
|
||||
value: {{ .Values.cluster.endpointSnitch }}
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: CASSANDRA_INTERNODE_ENCRYPTION
|
||||
value: {{ .Values.cluster.internodeEncryption | quote }}
|
||||
- name: CASSANDRA_CLIENT_ENCRYPTION
|
||||
value: {{ .Values.cluster.clientEncryption | quote }}
|
||||
- name: CASSANDRA_TRUSTSTORE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.tlsEncryptionSecretName }}
|
||||
key: truststore-password
|
||||
- name: CASSANDRA_KEYSTORE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.tlsEncryptionSecretName }}
|
||||
key: keystore-password
|
||||
{{- end }}
|
||||
- name: CASSANDRA_ENDPOINT_SNITCH
|
||||
value: {{ .Values.cluster.endpointSnitch }}
|
||||
- name: CASSANDRA_RACK
|
||||
value: {{ .Values.cluster.rack }}
|
||||
{{- if .Values.jvm.maxHeapSize }}
|
||||
- name: MAX_HEAP_SIZE
|
||||
value: {{ .Values.jvm.maxHeapSize | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.jvm.newHeapSize }}
|
||||
- name: HEAP_NEWSIZE
|
||||
value: {{ .Values.jvm.newHeapSize | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.jvm.extraOpts }}
|
||||
- name: JVM_EXTRA_OPTS
|
||||
value: {{ .Values.jvm.extraOpts | quote }}
|
||||
{{- end }}
|
||||
- name: CASSANDRA_ENABLE_RPC
|
||||
value: {{ .Values.cluster.enableRPC | quote }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/sh", "-c", "nodetool decommission"]
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: intra
|
||||
containerPort: 7000
|
||||
- name: tls
|
||||
containerPort: 7001
|
||||
- name: jmx
|
||||
containerPort: 7199
|
||||
- name: cql
|
||||
containerPort: 9042
|
||||
{{- if .Values.cluster.enableRPC }}
|
||||
- name: thrift
|
||||
containerPort: 9160
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/cassandra
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: encryption-secrets
|
||||
mountPath: /bitnami/cassandra/secrets
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*") (.Values.initDBConfigMap) }}
|
||||
- name: init-db
|
||||
mountPath: /docker-entrypoint-initdb.d
|
||||
{{- end }}
|
||||
{{ if or (.Files.Glob "files/conf/*") .Values.existingConfiguration }}
|
||||
- name: configurations
|
||||
mountPath: /bitnami/cassandra/conf
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
image: {{ template "cassandra.metrics.image" . }}
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
- name: jmx
|
||||
containerPort: 5555
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: metrics
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 20
|
||||
timeoutSeconds: 45
|
||||
{{- end }}
|
||||
command: ["/bin/sh", "-c", "nodetool status"]
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/bin/sh", "-c", "nodetool status | grep -E \"^UN\\s+${POD_IP}\""]
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if not .Values.persistence.enabled }}
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- bash
|
||||
- -ec
|
||||
- nodetool decommission
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: intra
|
||||
containerPort: 7000
|
||||
- name: tls
|
||||
containerPort: 7001
|
||||
- name: jmx
|
||||
containerPort: 7199
|
||||
- name: cql
|
||||
containerPort: 9042
|
||||
{{- if .Values.cluster.enableRPC }}
|
||||
- name: thrift
|
||||
containerPort: 9160
|
||||
{{- end }}
|
||||
{{- if .Values.resources }}
|
||||
resources: {{ toYaml .Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/cassandra
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: encryption-secrets
|
||||
mountPath: /bitnami/cassandra/secrets
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*") (.Values.initDBConfigMap) }}
|
||||
- name: init-db
|
||||
mountPath: /docker-entrypoint-initdb.d
|
||||
{{- end }}
|
||||
{{ if or (.Files.Glob "files/conf/*") .Values.existingConfiguration }}
|
||||
- name: configurations
|
||||
mountPath: /bitnami/cassandra/conf
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
image: {{ include "cassandra.metrics.image" . }}
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
- name: jmx
|
||||
containerPort: 5555
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: metrics
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 20
|
||||
timeoutSeconds: 45
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: encryption-secrets
|
||||
secret:
|
||||
secretName: {{ .Values.tlsEncryptionSecretName }}
|
||||
items:
|
||||
- key: keystore
|
||||
path: keystore
|
||||
- key: truststore
|
||||
path: truststore
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/conf/*") .Values.existingConfiguration }}
|
||||
- name: configurations
|
||||
configMap:
|
||||
name: {{ template "cassandra.configurationCM" . }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*") (.Values.initDBConfigMap) }}
|
||||
- name: init-db
|
||||
configMap:
|
||||
name: {{ template "cassandra.initDbCM" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: encryption-secrets
|
||||
secret:
|
||||
secretName: {{ .Values.tlsEncryptionSecretName }}
|
||||
items:
|
||||
- key: keystore
|
||||
path: keystore
|
||||
- key: truststore
|
||||
path: truststore
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/conf/*") .Values.existingConfiguration }}
|
||||
- name: configurations
|
||||
configMap:
|
||||
name: {{ include "cassandra.configurationCM" . }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*") (.Values.initDBConfigMap) }}
|
||||
- name: init-db
|
||||
configMap:
|
||||
name: {{ include "cassandra.initDbCM" . }}
|
||||
{{- end }}
|
||||
{{- if not .Values.persistence.enabled }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- else }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
labels:
|
||||
app: {{ template "cassandra.name" . }}
|
||||
chart: {{ template "cassandra.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- if .Values.persistence.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.persistence.annotations | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- range .Values.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
- metadata:
|
||||
name: data
|
||||
labels: {{- include "cassandra.labels" . | nindent 10 }}
|
||||
{{- if .Values.persistence.annotations }}
|
||||
annotations: {{- toYaml .Values.persistence.annotations | nindent 10 }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{ include "cassandra.storageClass" . }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- range .Values.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{ include "cassandra.storageClass" . }}
|
||||
{{- end }}
|
||||
|
||||
@@ -17,7 +17,7 @@ image:
|
||||
## Bitnami Cassandra image tag
|
||||
## ref: https://github.com/bitnami/bitnami-docker-cassandra#supported-tags-and-respective-dockerfile-links
|
||||
##
|
||||
tag: 3.11.5-debian-9-r0
|
||||
tag: 3.11.5-debian-9-r21
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -58,17 +58,34 @@ volumePermissions:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Init container' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Specify a service type
|
||||
## ref: http://kubernetes.io/docs/user-guide/services/
|
||||
## Service parameters
|
||||
##
|
||||
service:
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## CQL Port
|
||||
## CQL port
|
||||
##
|
||||
port: 9042
|
||||
## Thrift Client API port
|
||||
##
|
||||
thriftPort: 9160
|
||||
## Specify the nodePort(s) value for the LoadBalancer and NodePort service types.
|
||||
## Specify the nodePort(s) value(s) for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
nodePorts:
|
||||
@@ -78,7 +95,6 @@ service:
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
@@ -106,28 +122,34 @@ persistence:
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
|
||||
## Configure resource requests and limits
|
||||
## Cassandra pods' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
## Minimum memory for development is 4GB and 2 CPU cores
|
||||
## Minimum memory for production is 8GB and 4 CPU cores
|
||||
## ref: http://docs.datastax.com/en/archived/cassandra/2.0/cassandra/architecture/architecturePlanningHardware_c.html
|
||||
##
|
||||
resources: {}
|
||||
# requests:
|
||||
# memory: 4Gi
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 2
|
||||
# limits:
|
||||
# memory: 4Gi
|
||||
requests: {}
|
||||
# cpu: 2
|
||||
# memory: 4Gi
|
||||
|
||||
## Secret with keystore, keystore password, truststore, truststore password
|
||||
##
|
||||
# tlsEncryptionSecretName:
|
||||
## ConfigMap with custom cassandra configuration files. This overrides any other Cassandra configuration set in the chart
|
||||
##
|
||||
# existingConfiguration:
|
||||
|
||||
## Cluster parameters
|
||||
@@ -143,12 +165,15 @@ cluster:
|
||||
endpointSnitch: SimpleSnitch
|
||||
minimumAvailable: 2
|
||||
## Encryption values. NOTE: They require tlsEncryptionSecretName
|
||||
##
|
||||
internodeEncryption: none
|
||||
clientEncryption: false
|
||||
domain: cluster.local
|
||||
|
||||
## JVM Settings
|
||||
##
|
||||
jvm:
|
||||
## Extra JVM Settings
|
||||
## Extra JVM options
|
||||
##
|
||||
extraOpts:
|
||||
|
||||
@@ -171,7 +196,7 @@ dbUser:
|
||||
##
|
||||
# initDBConfigMap:
|
||||
|
||||
## Liveness and Readiness probe values.
|
||||
## Cassandra container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
|
||||
##
|
||||
livenessProbe:
|
||||
@@ -199,6 +224,21 @@ podAnnotations: {}
|
||||
##
|
||||
podLabels: {}
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## StatefulSet settings
|
||||
##
|
||||
statefulset:
|
||||
@@ -213,17 +253,6 @@ securityContext:
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
##
|
||||
## Container entrypoint and cmd (useful for using different images)
|
||||
##
|
||||
entrypoint: "/entrypoint.sh"
|
||||
@@ -244,23 +273,39 @@ networkPolicy:
|
||||
##
|
||||
# allowExternal: true
|
||||
|
||||
## Cassandra exporter configuration
|
||||
## Ref: https://github.com/criteo/cassandra_exporter
|
||||
## Cassandra Prometheus exporter configuration
|
||||
## ref: https://hub.docker.com/r/bitnami/cassandra-exporter/tags/
|
||||
##
|
||||
metrics:
|
||||
enabled: true
|
||||
enabled: false
|
||||
image:
|
||||
registry: docker.io
|
||||
pullPolicy: IfNotPresent
|
||||
repository: bitnami/cassandra-exporter
|
||||
tag: 2.3.0-debian-9-r77
|
||||
tag: 2.3.0-debian-9-r102
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Cassandra Prometheus exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
## Metrics exporter pod Annotation and Labels
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "8080"
|
||||
|
||||
@@ -17,7 +17,7 @@ image:
|
||||
## Bitnami Cassandra image tag
|
||||
## ref: https://github.com/bitnami/bitnami-docker-cassandra#supported-tags-and-respective-dockerfile-links
|
||||
##
|
||||
tag: 3.11.5-debian-9-r0
|
||||
tag: 3.11.5-debian-9-r21
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -58,17 +58,34 @@ volumePermissions:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Init container' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Specify a service type
|
||||
## ref: http://kubernetes.io/docs/user-guide/services/
|
||||
## Service parameters
|
||||
##
|
||||
service:
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## CQL Port
|
||||
## CQL port
|
||||
##
|
||||
port: 9042
|
||||
## Thrift Client API port
|
||||
##
|
||||
thriftPort: 9160
|
||||
## Specify the nodePort(s) value for the LoadBalancer and NodePort service types.
|
||||
## Specify the nodePort(s) value(s) for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
nodePorts:
|
||||
@@ -78,7 +95,6 @@ service:
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
@@ -106,28 +122,34 @@ persistence:
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
|
||||
## Configure resource requests and limits
|
||||
## Cassandra pods' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
## Minimum memory for development is 4GB and 2 CPU cores
|
||||
## Minimum memory for production is 8GB and 4 CPU cores
|
||||
## ref: http://docs.datastax.com/en/archived/cassandra/2.0/cassandra/architecture/architecturePlanningHardware_c.html
|
||||
##
|
||||
resources: {}
|
||||
# requests:
|
||||
# memory: 4Gi
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 2
|
||||
# limits:
|
||||
# memory: 4Gi
|
||||
requests: {}
|
||||
# cpu: 2
|
||||
# memory: 4Gi
|
||||
|
||||
## Secret with keystore, keystore password, truststore, truststore password
|
||||
##
|
||||
# tlsEncryptionSecretName:
|
||||
## ConfigMap with custom cassandra configuration files. This overrides any other Cassandra configuration set in the chart
|
||||
##
|
||||
# existingConfiguration:
|
||||
|
||||
## Cluster parameters
|
||||
@@ -143,12 +165,15 @@ cluster:
|
||||
endpointSnitch: SimpleSnitch
|
||||
minimumAvailable: 1
|
||||
## Encryption values. NOTE: They require tlsEncryptionSecretName
|
||||
##
|
||||
internodeEncryption: none
|
||||
clientEncryption: false
|
||||
domain: cluster.local
|
||||
|
||||
## JVM Settings
|
||||
##
|
||||
jvm:
|
||||
## Extra JVM Settings
|
||||
## Extra JVM options
|
||||
##
|
||||
extraOpts:
|
||||
|
||||
@@ -171,8 +196,8 @@ dbUser:
|
||||
##
|
||||
# initDBConfigMap:
|
||||
|
||||
## Liveness and Readiness probe values.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
|
||||
## Cassandra container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
@@ -199,6 +224,21 @@ podAnnotations: {}
|
||||
##
|
||||
podLabels: {}
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## StatefulSet settings
|
||||
##
|
||||
statefulset:
|
||||
@@ -213,17 +253,6 @@ securityContext:
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
##
|
||||
## Container entrypoint and cmd (useful for using different images)
|
||||
##
|
||||
entrypoint: "/entrypoint.sh"
|
||||
@@ -244,8 +273,8 @@ networkPolicy:
|
||||
##
|
||||
# allowExternal: true
|
||||
|
||||
## Cassandra exporter configuration
|
||||
## Ref: https://github.com/criteo/cassandra_exporter
|
||||
## Cassandra Prometheus exporter configuration
|
||||
## ref: https://hub.docker.com/r/bitnami/cassandra-exporter/tags/
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
@@ -253,14 +282,30 @@ metrics:
|
||||
registry: docker.io
|
||||
pullPolicy: IfNotPresent
|
||||
repository: bitnami/cassandra-exporter
|
||||
tag: 2.3.0-debian-9-r77
|
||||
tag: 2.3.0-debian-9-r102
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Cassandra Prometheus exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
## Metrics exporter pod Annotation and Labels
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "8080"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
apiVersion: v1
|
||||
name: consul
|
||||
version: 6.0.7
|
||||
appVersion: 1.6.1
|
||||
version: 6.0.11
|
||||
appVersion: 1.6.2
|
||||
description: Highly available and distributed service discovery and key-value store designed with support for the modern data center to make distributed systems and configuration easy.
|
||||
home: https://www.consul.io/
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-consul
|
||||
- https://github.com/bitnami/bitnami-docker-consul
|
||||
icon: https://bitnami.com/assets/stacks/consul/img/consul-stack-220x234.png
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
|
||||
+42
-31
@@ -55,7 +55,7 @@ The following tables lists the configurable parameters of the HashiCorp Consul c
|
||||
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| `global.imageRegistry` | Global Docker image registry | `nil` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
|
||||
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
|
||||
| `image.registry` | HashiCorp Consul image registry | `docker.io` |
|
||||
| `image.repository` | HashiCorp Consul image name | `bitnami/consul` |
|
||||
| `image.tag` | HashiCorp Consul image tag | `{TAG_NAME}` |
|
||||
@@ -66,38 +66,54 @@ The following tables lists the configurable parameters of the HashiCorp Consul c
|
||||
| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` |
|
||||
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` |
|
||||
| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` |
|
||||
| `volumePermissions.image.tag` | Init container volume-permissions image tag | `stretch` |
|
||||
| `volumePermissions.image.tag` | Init container volume-permissions image tag | `stretch` |
|
||||
| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` |
|
||||
| `volumePermissions.resources` | Init container resource requests/limit | `nil` |
|
||||
| `replicas` | Number of replicas | `3` |
|
||||
| `port` | HashiCorp Consul http listening port | `8500` |
|
||||
| `service.rpcPort` | HashiCorp Consul rpc listening port | `8400` |
|
||||
| `service.serflanPort` | Container serf lan listening port | `8301` |
|
||||
| `service.serverPort` | Container server listening port | `8300` |
|
||||
| `service.consulDnsPort` | Container dns listening port | `8600` |
|
||||
| `service.uiPort` | HashiCorp Consul UI port | `80` |
|
||||
| `clusterDomain` | Kubernetes cluster domain | `cluster.local` |
|
||||
| `datacenterName` | HashiCorp Consul datacenter name | `dc1` |
|
||||
| `gossipKey` | Gossip key for all members | `nil` |
|
||||
| `domain` | HashiCorp Consul domain | `consul` |
|
||||
| `clientAddress` | Address in which HashiCorp Consul will bind client interfaces | `0.0.0.0` |
|
||||
| `serflanAddress` | Address used for Serf LAN communications | `0.0.0.0` |
|
||||
| `raftMultiplier` | Multiplier used to scale key Raft timing parameters | `10Gi` |
|
||||
| `gossipKey` | Gossip key for all members | `nil` |
|
||||
| `tlsEncryptionSecretName` | Name of existing secret with TLS encryption data | `nil` |
|
||||
| `configmap` | HashiCorp Consul configuration to be injected as ConfigMap | `nil` |
|
||||
| `localConfig` | Extra configuration that will be added to the default one | `nil` |
|
||||
| `replicas` | Number of replicas | `3` |
|
||||
| `updateStrategy.type` | Statefulset update strategy policy | `RollingUpdate` |
|
||||
| `securityContext.enabled` | Enable security context | `true` |
|
||||
| `securityContext.fsGroup` | Group ID for the container | `1001` |
|
||||
| `securityContext.runAsUser` | User ID for the container | `1001` |
|
||||
| `clusterDomain` | Kubernetes cluster domain | `cluster.local` |
|
||||
| `updateStrategy.type` | Statefulset update strategy policy | `RollingUpdate` |
|
||||
| `resources` | Container resource requests and limits | `{}` |
|
||||
| `affinity` | Map of node/pod affinities | `{}` (The value is evaluated as a template) |
|
||||
| `nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) |
|
||||
| `tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) |
|
||||
| `podAnnotations` | Pod annotations | `{}` |
|
||||
| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 30 |
|
||||
| `livenessProbe.periodSeconds` | How often to perform the probe | 10 |
|
||||
| `livenessProbe.timeoutSeconds` | When the probe times out | 5 |
|
||||
| `livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
|
||||
| `livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 6 |
|
||||
| `readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | 5 |
|
||||
| `readinessProbe.periodSeconds` | How often to perform the probe | 10 |
|
||||
| `readinessProbe.timeoutSeconds` | When the probe times out | 5 |
|
||||
| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
|
||||
| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 6 |
|
||||
| `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` |
|
||||
| `persistence.size` | Size of data volume | `8Gi` |
|
||||
| `persistence.annotations` | Annotations for the persistent volume | `nil` |
|
||||
| `resources` | Container resource requests and limits | `{}` |
|
||||
| `maxUnavailable` | Pod disruption Budget maxUnavailable | `1` |
|
||||
| `nodeAffinity` | HashiCorp Consul pod node-affinity setting | `nil` |
|
||||
| `antiAffinity` | HashiCorp Consul pod anti-affinity setting | `soft` |
|
||||
| `pdb.create` | If true, create a pod disruption budget for HashiCorp Consul pods. | `false` |
|
||||
| `pdb.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
|
||||
| `pdb.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` |
|
||||
| `service.port` | HashiCorp Consul http listening port | `8500` |
|
||||
| `service.rpcPort` | HashiCorp Consul rpc listening port | `8400` |
|
||||
| `service.serflanPort` | Container serf lan listening port | `8301` |
|
||||
| `service.serverPort` | Container server listening port | `8300` |
|
||||
| `service.consulDnsPort` | Container dns listening port | `8600` |
|
||||
| `service.uiPort` | HashiCorp Consul UI port | `80` |
|
||||
| `ui.service.enabled` | Use a service to access HashiCorp Consul Ui | `true` |
|
||||
| `ui.service.type` | Kubernetes Service Type | `ClusterIP` |
|
||||
| `ui.service.nodePort` | Kubernetes node port for HashiCorp Consul UI | `""` |
|
||||
| `ui.service.annotations` | Annotations for HashiCorp Consul UI service | {} |
|
||||
| `ui.service.loadBalancerIP` | IP if HashiCorp Consul UI service type is `LoadBalancer` | `nil` |
|
||||
| `ingress.enabled` | Enable ingress controller resource | `false` |
|
||||
@@ -110,25 +126,12 @@ The following tables lists the configurable parameters of the HashiCorp Consul c
|
||||
| `ingress.secrets[0].name` | TLS Secret Name | `nil` |
|
||||
| `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` |
|
||||
| `ingress.secrets[0].key` | TLS Secret Key | `nil` |
|
||||
| `configmap` | HashiCorp Consul configuration to be injected as ConfigMap | `nil` |
|
||||
| `metrics.enabled` | Start a side-car prometheus exporter | `false` |
|
||||
| `metrics.image` | Exporter image | `bitnami/consul-exporter` |
|
||||
| `metrics.imageTag` | Exporter image tag | `{TAG_NAME}` |
|
||||
| `metrics.imagePullPolicy` | Exporter image pull policy | `IfNotPresent` |
|
||||
| `metrics.resources` | Exporter resource requests/limit | `{}` |
|
||||
| `metrics.podAnnotations` | Exporter annotations | `{}` |
|
||||
| `nodeSelector` | Node labels for pod assignment | `{}` |
|
||||
| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 30 |
|
||||
| `livenessProbe.periodSeconds` | How often to perform the probe | 10 |
|
||||
| `livenessProbe.timeoutSeconds` | When the probe times out | 5 |
|
||||
| `livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
|
||||
| `livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 6 |
|
||||
| `podAnnotations` | Pod annotations | `{}` |
|
||||
| `readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | 5 |
|
||||
| `readinessProbe.periodSeconds` | How often to perform the probe | 10 |
|
||||
| `readinessProbe.timeoutSeconds` | When the probe times out | 5 |
|
||||
| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
|
||||
| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 6 |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
@@ -158,11 +161,19 @@ Bitnami will release a new chart updating its containers if a new version of the
|
||||
This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one.
|
||||
|
||||
- Start a side-car prometheus exporter:
|
||||
|
||||
```diff
|
||||
- metrics.enabled: false
|
||||
+ metrics.enabled: true
|
||||
```
|
||||
|
||||
- Create a Pod disruption budget:
|
||||
|
||||
```diff
|
||||
- pdb.create: false
|
||||
+ pdb.create: true
|
||||
```
|
||||
|
||||
### Ingress
|
||||
|
||||
This chart provides support for ingress resources. If you have an ingress controller installed on your cluster, such as [nginx-ingress](https://kubeapps.com/charts/stable/nginx-ingress) or [traefik](https://kubeapps.com/charts/stable/traefik) you can utilize the ingress controller to service your HashiCorp Consul UI application.
|
||||
|
||||
@@ -30,6 +30,24 @@ Create chart name and version as used by the chart label.
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "consul.labels" -}}
|
||||
app: {{ include "consul.name" . }}
|
||||
chart: {{ include "consul.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
|
||||
*/}}
|
||||
{{- define "consul.matchLabels" -}}
|
||||
app: {{ include "consul.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Consul image name
|
||||
*/}}
|
||||
@@ -174,3 +192,16 @@ but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Renders a value that contains template.
|
||||
Usage:
|
||||
{{ include "consul.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
|
||||
*/}}
|
||||
{{- define "consul.tplValue" -}}
|
||||
{{- if typeIs "string" .value }}
|
||||
{{- tpl .value .context }}
|
||||
{{- else }}
|
||||
{{- tpl (.value | toYaml) .context }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
{{ if .Values.configmap }}
|
||||
{{- if .Values.configmap }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "consul.fullname" . }}-configuration
|
||||
labels:
|
||||
app: "{{ template "consul.name" . }}"
|
||||
chart: {{ template "consul.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
name: {{ include "consul.fullname" . }}-configuration
|
||||
labels: {{- include "consul.labels" . | nindent 4 }}
|
||||
data:
|
||||
config.json:
|
||||
{{ toYaml .Values.configmap | indent 4}}
|
||||
|
||||
connection.json: |
|
||||
config.json: {{- toYaml .Values.configmap | nindent 4}}
|
||||
connection.json: |
|
||||
{
|
||||
"retry_join": ["{{ template "consul.fullname" . }}-0.{{ template "consul.fullname" . }}.{{ .Release.Namespace }}.svc"]
|
||||
}
|
||||
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,32 +1,26 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ template "consul.fullname" . }}"
|
||||
labels:
|
||||
app: "{{ template "consul.name" . }}"
|
||||
chart: {{ template "consul.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
name: {{ include "consul.fullname" . }}
|
||||
labels: {{- include "consul.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
|
||||
spec:
|
||||
ports:
|
||||
- name: rpc
|
||||
port: {{ .Values.service.rpcPort }}
|
||||
- name: serflan-tcp
|
||||
protocol: "TCP"
|
||||
port: {{ .Values.service.serflanPort }}
|
||||
- name: serflan-udp
|
||||
protocol: "UDP"
|
||||
port: {{ .Values.service.serflanPort }}
|
||||
- name: server
|
||||
port: {{.Values.service.serverPort}}
|
||||
- name: consuldns-tcp
|
||||
port: {{.Values.service.consulDnsPort}}
|
||||
- name: consuldns-udp
|
||||
protocol: "UDP"
|
||||
port: {{.Values.service.consulDnsPort}}
|
||||
- name: rpc
|
||||
port: {{ .Values.service.rpcPort }}
|
||||
- name: serflan-tcp
|
||||
protocol: "TCP"
|
||||
port: {{ .Values.service.serflanPort }}
|
||||
- name: serflan-udp
|
||||
protocol: "UDP"
|
||||
port: {{ .Values.service.serflanPort }}
|
||||
- name: server
|
||||
port: {{.Values.service.serverPort}}
|
||||
- name: consuldns-tcp
|
||||
port: {{.Values.service.consulDnsPort}}
|
||||
- name: consuldns-udp
|
||||
protocol: "UDP"
|
||||
port: {{.Values.service.consulDnsPort}}
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: "{{ template "consul.name" . }}"
|
||||
release: {{ .Release.Name | quote }}
|
||||
selector: {{- include "consul.matchLabels" . | nindent 4 }}
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
{{ if .Values.gossipKey}}
|
||||
{{- if .Values.gossipKey}}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "consul.fullname" . }}-gossip-key
|
||||
labels:
|
||||
app: "{{ template "consul.name" . }}"
|
||||
chart: {{ template "consul.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
labels: {{- include "consul.labels" . | nindent 4 }}
|
||||
type: Opaque
|
||||
data:
|
||||
gossip-key: {{ .Values.gossipKey | b64enc }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -3,11 +3,7 @@ apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "consul.fullname" . }}
|
||||
labels:
|
||||
app: "{{ template "consul.name" . }}"
|
||||
chart: "{{ template "consul.chart" . }}"
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
labels: {{- include "consul.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- if .Values.ingress.certManager }}
|
||||
kubernetes.io/tls-acme: "true"
|
||||
@@ -17,21 +13,21 @@ metadata:
|
||||
{{- end }}
|
||||
spec:
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .name }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
backend:
|
||||
serviceName: {{ template "consul.fullname" $ }}-ui
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .name }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
backend:
|
||||
serviceName: {{ template "consul.fullname" $ }}-ui
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
tls:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
{{- if .tls }}
|
||||
- hosts:
|
||||
- {{ .name }}
|
||||
secretName: {{ .tlsSecret }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
{{- if .tls }}
|
||||
- hosts:
|
||||
- {{ .name }}
|
||||
secretName: {{ .tlsSecret }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
{{- if .Values.maxUnavailable }}
|
||||
{{- if .Values.pdb.create }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: "{{ template "consul.fullname" . }}-pdb"
|
||||
labels:
|
||||
app: "{{ template "consul.name" . }}"
|
||||
chart: {{ template "consul.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
name: {{ include "consul.fullname" . }}-pdb
|
||||
labels: {{- include "consul.labels" . | nindent 4 }}
|
||||
spec:
|
||||
maxUnavailable: {{ .Values.maxUnavailable }}
|
||||
{{- if .Values.pdb.minAvailable }}
|
||||
minAvailable: {{ .Values.pdb.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: {{ template "consul.chart" . }}
|
||||
matchLabels: {{- include "consul.matchLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: "{{ template "consul.fullname" . }}"
|
||||
labels:
|
||||
app: "{{ template "consul.name" . }}"
|
||||
chart: {{ template "consul.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
name: {{ template "consul.fullname" . }}
|
||||
labels: {{- include "consul.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "consul.name" . }}
|
||||
release: "{{ .Release.Name }}"
|
||||
serviceName: "{{ template "consul.fullname" . }}"
|
||||
replicas: {{ default 3 .Values.replicas }}
|
||||
matchLabels: {{- include "consul.matchLabels" . | nindent 6 }}
|
||||
serviceName: {{ template "consul.fullname" . }}
|
||||
replicas: {{ .Values.replicas }}
|
||||
updateStrategy:
|
||||
type: {{ .Values.updateStrategy.type }}
|
||||
{{- if (eq "Recreate" .Values.updateStrategy.type) }}
|
||||
@@ -21,228 +15,217 @@ spec:
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
name: "{{ template "consul.fullname" . }}"
|
||||
labels:
|
||||
app: "{{ template "consul.name" . }}"
|
||||
chart: {{ template "consul.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
|
||||
labels: {{- include "consul.labels" . | nindent 8 }}
|
||||
{{- if or .Values.podAnnotations (and .Values.metrics.enabled .Values.metrics.podAnnotations) }}
|
||||
annotations:
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{ toYaml .Values.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.podAnnotations }}
|
||||
{{ toYaml .Values.metrics.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{- toYaml .Values.podAnnotations | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.podAnnotations }}
|
||||
{{- toYaml .Values.metrics.podAnnotations | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "consul.imagePullSecrets" . | indent 6 }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity: {{- include "consul.tplValue" (dict "value" .Values.affinity "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector: {{- include "consul.tplValue" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tolerations }}
|
||||
tolerations: {{- include "consul.tplValue" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- include "consul.imagePullSecrets" . | indent 6 }}
|
||||
{{- if eq .Values.antiAffinity "hard" }}
|
||||
affinity:
|
||||
{{- if .Values.nodeAffinity }}
|
||||
nodeAffinity:
|
||||
{{ toYaml .Values.nodeAffinity | indent 10 }}
|
||||
{{- end }}
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- "{{ template "consul.name" . }}"
|
||||
topologyKey: kubernetes.io/hostname
|
||||
{{- else if eq .Values.antiAffinity "soft" }}
|
||||
affinity:
|
||||
{{- if .Values.nodeAffinity }}
|
||||
nodeAffinity:
|
||||
{{ toYaml .Values.nodeAffinity | indent 10 }}
|
||||
{{- end }}
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- "{{ template "consul.name" . }}"
|
||||
{{- end }}
|
||||
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
|
||||
initContainers:
|
||||
- name: volume-permissions
|
||||
image: "{{ template "consul.volumePermissions.image" . }}"
|
||||
imagePullPolicy: {{ default "" .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/consul/data"]
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
resources: {{ toYaml .Values.volumePermissions.resources | nindent 10 }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/consul/data
|
||||
{{- end }}
|
||||
- name: volume-permissions
|
||||
image: {{ include "consul.volumePermissions.image" . }}
|
||||
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }} /bitnami/consul/data
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
{{- if .Values.volumePermissions.resources }}
|
||||
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/consul/data
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: consul
|
||||
image: "{{ template "consul.image" . }}"
|
||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.port }}
|
||||
- name: rpc
|
||||
containerPort: {{ .Values.service.rpcPort }}
|
||||
- name: serflan-tcp
|
||||
protocol: "TCP"
|
||||
containerPort: {{ .Values.service.serflanPort }}
|
||||
- name: serflan-udp
|
||||
protocol: "UDP"
|
||||
containerPort: {{ .Values.service.serflanPort }}
|
||||
- name: server
|
||||
containerPort: {{ .Values.service.serverPort }}
|
||||
- name: consuldns-tcp
|
||||
containerPort: {{ .Values.service.consulDnsPort }}
|
||||
- name: consuldns-udp
|
||||
protocol: "UDP"
|
||||
containerPort: {{ .Values.service.consulDnsPort }}
|
||||
resources:
|
||||
{{ toYaml .Values.Resources | indent 10 }}
|
||||
env:
|
||||
- name: CONSUL_RETRY_JOIN
|
||||
value: "{{ template "consul.fullname" . }}-0.{{ template "consul.fullname" . }}.{{ .Release.Namespace }}.svc"
|
||||
- name: CONSUL_DISABLE_KEYRING_FILE
|
||||
value: "true"
|
||||
- name: CONSUL_BOOTSTRAP_EXPECT
|
||||
value: {{ default 3 .Values.replicas | quote }}
|
||||
- name: CONSUL_BOOTSTRAP_EXPECT
|
||||
value: {{ .Values.replicas | quote }}
|
||||
- name: CONSUL_RAFT_MULTIPLIER
|
||||
value: {{ .Values.raftMultiplier | quote }}
|
||||
- name: CONSUL_DOMAIN
|
||||
value: "{{ .Values.domain }}"
|
||||
- name: CONSUL_DATACENTER
|
||||
value: "{{ .Values.datacenterName }}"
|
||||
{{ if .Values.gossipKey }}
|
||||
- name: CONSUL_GOSSIP_ENCRYPTION_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "consul.fullname" . }}-gossip-key
|
||||
key: gossip-key
|
||||
{{ end }}
|
||||
{{ if .Values.localConfig }}
|
||||
- name: CONSUL_LOCAL_CONFIG
|
||||
value: |-
|
||||
{{ .Values.localConfig | indent 12 }}
|
||||
{{ end }}
|
||||
- name: CONSUL_UI
|
||||
value: "{{ .Values.ui.service.enabled }}"
|
||||
- name: CONSUL_HTTP_PORT_NUMBER
|
||||
value: {{ .Values.port | quote}}
|
||||
- name: CONSUL_DNS_PORT_NUMBER
|
||||
value: {{ .Values.service.consulDnsPort | quote }}
|
||||
- name: CONSUL_RPC_PORT_NUMBER
|
||||
value: {{ .Values.service.serverPort | quote }}
|
||||
- name: CONSUL_SERF_LAN_PORT_NUMBER
|
||||
value: {{ .Values.service.serflanPort | quote }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- consul
|
||||
- operator
|
||||
- raft
|
||||
- list-peers
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- consul
|
||||
- members
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
lifecycle:
|
||||
preStop:
|
||||
- name: consul
|
||||
image: {{ include "consul.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.port }}
|
||||
- name: rpc
|
||||
containerPort: {{ .Values.service.rpcPort }}
|
||||
- name: serflan-tcp
|
||||
protocol: "TCP"
|
||||
containerPort: {{ .Values.service.serflanPort }}
|
||||
- name: serflan-udp
|
||||
protocol: "UDP"
|
||||
containerPort: {{ .Values.service.serflanPort }}
|
||||
- name: server
|
||||
containerPort: {{ .Values.service.serverPort }}
|
||||
- name: consuldns-tcp
|
||||
containerPort: {{ .Values.service.consulDnsPort }}
|
||||
- name: consuldns-udp
|
||||
protocol: "UDP"
|
||||
containerPort: {{ .Values.service.consulDnsPort }}
|
||||
{{- if .Values.resources }}
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- $consulFullName := include "consul.fullname" . }}
|
||||
{{- $consulHeadlessSvcName := include "consul.fullname" . }}
|
||||
{{- $clusterDomain := .Values.clusterDomain }}
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: CONSUL_RETRY_JOIN
|
||||
value: {{ printf "%s-0.%s.%s.svc.%s" $consulFullName $consulHeadlessSvcName .Release.Namespace $clusterDomain | quote }}
|
||||
- name: CONSUL_DISABLE_KEYRING_FILE
|
||||
value: "true"
|
||||
- name: CONSUL_BOOTSTRAP_EXPECT
|
||||
value: {{ default 3 .Values.replicas | quote }}
|
||||
- name: CONSUL_BOOTSTRAP_EXPECT
|
||||
value: {{ .Values.replicas | quote }}
|
||||
- name: CONSUL_RAFT_MULTIPLIER
|
||||
value: {{ .Values.raftMultiplier | quote }}
|
||||
- name: CONSUL_DOMAIN
|
||||
value: "{{ .Values.domain }}"
|
||||
- name: CONSUL_DATACENTER
|
||||
value: "{{ .Values.datacenterName }}"
|
||||
{{- if .Values.gossipKey }}
|
||||
- name: CONSUL_GOSSIP_ENCRYPTION_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "consul.fullname" . }}-gossip-key
|
||||
key: gossip-key
|
||||
{{- end }}
|
||||
{{- if .Values.localConfig }}
|
||||
- name: CONSUL_LOCAL_CONFIG
|
||||
value: |- {{- .Values.localConfig | nindent 12 }}
|
||||
{{- end }}
|
||||
- name: CONSUL_UI
|
||||
value: "{{ .Values.ui.service.enabled }}"
|
||||
- name: CONSUL_HTTP_PORT_NUMBER
|
||||
value: {{ .Values.service.port | quote}}
|
||||
- name: CONSUL_DNS_PORT_NUMBER
|
||||
value: {{ .Values.service.consulDnsPort | quote }}
|
||||
- name: CONSUL_RPC_PORT_NUMBER
|
||||
value: {{ .Values.service.serverPort | quote }}
|
||||
- name: CONSUL_SERF_LAN_PORT_NUMBER
|
||||
value: {{ .Values.service.serflanPort | quote }}
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- consul
|
||||
- leave
|
||||
volumeMounts:
|
||||
{{ if .Values.tlsEncryptionSecretName }}
|
||||
- name: consul-tls-certs
|
||||
mountPath: "/opt/bitnami/consul/certificates/"
|
||||
readOnly: true
|
||||
{{ end }}
|
||||
{{- if .Values.persistence.enabled }}
|
||||
- name: data
|
||||
mountPath: /bitnami/consul/data
|
||||
{{ end }}
|
||||
{{ if .Values.configmap }}
|
||||
- name: consul-config
|
||||
mountPath: /opt/bitnami/consul/conf/config.json
|
||||
subPath: config.json
|
||||
- name: consul-config
|
||||
mountPath: /opt/bitnami/consul/conf/connection.json
|
||||
subPath: connection.json
|
||||
{{ end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
image: "{{ template "consul.metrics.image" . }}"
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
env:
|
||||
command: [ '/bin/consul_exporter' , '--consul.server={{ template "consul.fullname" . }}:{{ .Values.port }}']
|
||||
ports:
|
||||
- consul
|
||||
- operator
|
||||
- raft
|
||||
- list-peers
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- consul
|
||||
- members
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- consul
|
||||
- leave
|
||||
volumeMounts:
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: consul-tls-certs
|
||||
mountPath: "/opt/bitnami/consul/certificates/"
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.enabled }}
|
||||
- name: data
|
||||
mountPath: /bitnami/consul/data
|
||||
{{- end }}
|
||||
{{- if .Values.configmap }}
|
||||
- name: consul-config
|
||||
mountPath: /opt/bitnami/consul/conf/config.json
|
||||
subPath: config.json
|
||||
- name: consul-config
|
||||
mountPath: /opt/bitnami/consul/conf/connection.json
|
||||
subPath: connection.json
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
containerPort: 9107
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 1
|
||||
resources:
|
||||
{{ toYaml .Values.metrics.resources | indent 10 }}
|
||||
{{- end }}
|
||||
image: "{{ template "consul.metrics.image" . }}"
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/consul_exporter
|
||||
- --consul.server={{ template "consul.fullname" . }}:{{ .Values.port }}'
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9107
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 1
|
||||
{{- if .Values.metrics.resources }}
|
||||
resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or .Values.configmap .Values.tlsEncryptionSecretName (not .Values.persistence.enabled) }}
|
||||
volumes:
|
||||
{{ if .Values.configmap }}
|
||||
- name: consul-config
|
||||
configMap:
|
||||
name: {{ template "consul.fullname" . }}-configuration
|
||||
{{ end }}
|
||||
{{ if .Values.tlsEncryptionSecretName }}
|
||||
- name: consul-tls-certs
|
||||
secret:
|
||||
secretName: {{ .Values.tlsEncryptionSecretName }}
|
||||
items:
|
||||
- key: ca.pem
|
||||
path: ca.pem
|
||||
- key: consul.pem
|
||||
path: consul.pem
|
||||
- key: consul-key.pem
|
||||
path: consul.key.pem
|
||||
{{ end }}
|
||||
{{- if .Values.persistence.enabled }}
|
||||
{{- end }}
|
||||
{{- if .Values.configmap }}
|
||||
- name: consul-config
|
||||
configMap:
|
||||
name: {{ template "consul.fullname" . }}-configuration
|
||||
{{- end }}
|
||||
{{- if .Values.tlsEncryptionSecretName }}
|
||||
- name: consul-tls-certs
|
||||
secret:
|
||||
secretName: {{ .Values.tlsEncryptionSecretName }}
|
||||
items:
|
||||
- key: ca.pem
|
||||
path: ca.pem
|
||||
- key: consul.pem
|
||||
path: consul.pem
|
||||
- key: consul-key.pem
|
||||
path: consul.key.pem
|
||||
{{- end }}
|
||||
{{- if not .Values.persistence.enabled }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- else }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
@@ -259,7 +242,4 @@ spec:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{ include "consul.storageClass" . }}
|
||||
{{- else }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,29 +2,20 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ template "consul.fullname" . }}-ui"
|
||||
labels:
|
||||
app: "{{ template "consul.name" . }}"
|
||||
chart: {{ template "consul.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
component: ui
|
||||
{{- with .Values.ui.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ include "consul.fullname" . }}-ui
|
||||
labels: {{- include "consul.labels" . | nindent 4 }}
|
||||
annotations: {{- include "consul.tplValue" ( dict "value" .Values.ui.service.annotations "context" $) | nindent 4 }}
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.uiPort }}
|
||||
targetPort: http
|
||||
type: "{{ .Values.ui.service.type }}"
|
||||
{{- if and (eq .Values.ui.service.type "LoadBalancer") .Values.ui.service.loadBalancerIP }}
|
||||
type: {{ .Values.ui.service.type }}
|
||||
{{- if and (eq .Values.ui.service.type "LoadBalancer") (not (empty .Values.ui.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.ui.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app: "{{ template "consul.name" . }}"
|
||||
chart: {{ template "consul.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.uiPort }}
|
||||
targetPort: http
|
||||
{{- if and (or (eq .Values.ui.service.type "NodePort") (eq .Values.ui.service.type "LoadBalancer")) (not (empty .Values.ui.service.nodePort)) }}
|
||||
nodePort: {{ .Values.ui.service.nodePort }}
|
||||
{{- end }}
|
||||
selector: {{- include "consul.matchLabels" . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/consul
|
||||
tag: 1.6.1-debian-9-r35
|
||||
tag: 1.6.2-debian-9-r0
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -27,6 +27,11 @@ image:
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
##
|
||||
debug: false
|
||||
|
||||
## String to partially override consul.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
@@ -40,6 +45,9 @@ image:
|
||||
##
|
||||
volumePermissions:
|
||||
enabled: false
|
||||
## Bitnami Minideb image version
|
||||
## ref: https://hub.docker.com/r/bitnami/minideb/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/minideb
|
||||
@@ -51,168 +59,49 @@ volumePermissions:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Init container' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Consul replicas
|
||||
replicas: 3
|
||||
|
||||
service:
|
||||
## Consul service ports
|
||||
port: 8500
|
||||
rpcPort: 8400
|
||||
serflanPort: 8301
|
||||
serverPort: 8300
|
||||
consulDnsPort: 8600
|
||||
uiPort: 80
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
## Consul cluster domain
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
# Cluster domain
|
||||
clusterDomain: cluster.local
|
||||
|
||||
## Datacenter name for consul. If not supplied, will use the consul
|
||||
## default 'dc1'
|
||||
##
|
||||
datacenterName: dc1
|
||||
|
||||
## Consul domain name
|
||||
##
|
||||
domain: consul
|
||||
|
||||
## Consul raft multiplier.
|
||||
##
|
||||
raftMultiplier: '1'
|
||||
|
||||
## Predefined value for gossip key.
|
||||
## The key must be 16-bytes, can be generated with $(consul keygen)
|
||||
##
|
||||
# gossipKey: 887Syd/BOvbtvRAKviazMg==
|
||||
|
||||
## Use TLS to verify the authenticity of servers and clients.
|
||||
## Check README for more information.
|
||||
##
|
||||
# tlsEncryptionSecretName: your-already-created-secret
|
||||
|
||||
## Extra configuration that will be added to the default one.
|
||||
#localConfig: |-
|
||||
# {
|
||||
# "key": "value"
|
||||
# }
|
||||
|
||||
## Consul domain name.
|
||||
domain: consul
|
||||
|
||||
## Consul raft multiplier.
|
||||
raftMultiplier: '1'
|
||||
|
||||
## updateStrategy for Consul statefulset
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
## Consul data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
# storageClass: "-"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
size: 8Gi
|
||||
annotations: {}
|
||||
|
||||
resources: {}
|
||||
# requests:
|
||||
# memory: 256Mi
|
||||
# cpu: 100m
|
||||
|
||||
## Setting maxUnavailable will create a pod disruption budget that will prevent
|
||||
## voluntarty cluster administration from taking down too many consul pods. If
|
||||
## you set maxUnavailable, you should set it to ceil((n/2) - 1), where
|
||||
## n = Replicas. For example, if you have 5 or 6 Replicas, you'll want to set
|
||||
## maxUnavailable = 2. If you are using the default of 3 Replicas, you'll want
|
||||
## to set maxUnavailable to 1.
|
||||
maxUnavailable: 1
|
||||
|
||||
## nodeAffinity settings
|
||||
# nodeAffinity:
|
||||
# requiredDuringSchedulingIgnoredDuringExecution:
|
||||
# nodeSelectorTerms:
|
||||
# - matchExpressions:
|
||||
# - key: cloud.google.com/gke-preemptible
|
||||
# operator: NotIn
|
||||
# values:
|
||||
# - true
|
||||
|
||||
## Anti-Affinity setting. The default "hard" will use pod anti-affinity that is
|
||||
## requiredDuringSchedulingIgnoredDuringExecution to ensure 2 services don't
|
||||
## end up on the same node. Setting this to "soft" will use
|
||||
## preferredDuringSchedulingIgnoredDuringExecution. If set to anything else,
|
||||
## no anti-affinity rules will be configured.
|
||||
antiAffinity: "soft"
|
||||
|
||||
## Create dedicated UI service
|
||||
##
|
||||
ui:
|
||||
service:
|
||||
enabled: true
|
||||
type: "ClusterIP"
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
# cloud.google.com/load-balancer-type: "Internal"
|
||||
# service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
|
||||
# service.beta.kubernetes.io/azure-load-balancer-internal: "true"
|
||||
loadBalancerIP:
|
||||
|
||||
## Configure the ingress resource that allows you to access the
|
||||
## Consul UI. Set up the URL
|
||||
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||
##
|
||||
ingress:
|
||||
## Set to true to enable ingress record generation
|
||||
enabled: false
|
||||
|
||||
## Set this to true in order to add the corresponding annotations for cert-manager
|
||||
certManager: false
|
||||
|
||||
## Ingress annotations done as key:value pairs
|
||||
## For a full list of possible ingress annotations, please see
|
||||
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
|
||||
##
|
||||
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
|
||||
annotations:
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
|
||||
## The list of hostnames to be covered with this ingress record.
|
||||
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||
hosts:
|
||||
- name: consul-ui.local
|
||||
path: /
|
||||
|
||||
# Set this to true in order to enable TLS on the ingress record
|
||||
tls: false
|
||||
|
||||
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||
tlsSecret: consul-ui.local-tls
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
||||
## -----BEGIN RSA PRIVATE KEY-----
|
||||
##
|
||||
## name should line up with a tlsSecret set further up
|
||||
## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
|
||||
##
|
||||
## It is also possible to create and manage the certificates outside of this helm chart
|
||||
## Please see README.md for more information
|
||||
# - name: consul-ui.local-tls
|
||||
# key:
|
||||
# certificate:
|
||||
|
||||
## Consul configmap
|
||||
##
|
||||
# configmap: |
|
||||
# {
|
||||
# "datacenter":"dc2",
|
||||
@@ -234,35 +123,69 @@ ingress:
|
||||
# "serf_lan":"0.0.0.0"
|
||||
# }
|
||||
|
||||
## Extra configuration that will be added to the default one.
|
||||
##
|
||||
# localConfig: |-
|
||||
# {
|
||||
# "key": "value"
|
||||
# }
|
||||
|
||||
## Number of HashiCorp Consul replicas to deploy
|
||||
##
|
||||
replicas: 3
|
||||
|
||||
## updateStrategy for Consul statefulset
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
##
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## HashiCorp Consul container's resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# memory: 256Mi
|
||||
# cpu: 100m
|
||||
requests: {}
|
||||
# memory: 256Mi
|
||||
# cpu: 100m
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## Pod annotations
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/consul-exporter
|
||||
tag: 0.5.0-debian-9-r69
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9107"
|
||||
|
||||
## Node selector
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
nodeSelector: {"beta.kubernetes.io/arch": "amd64"}
|
||||
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
## HashiCorp Consul container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
@@ -270,7 +193,6 @@ livenessProbe:
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
@@ -278,3 +200,161 @@ readinessProbe:
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
## If true, use a Persistent Volume Claim, If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
## Persistent Volume Claim annotations
|
||||
##
|
||||
annotations: {}
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
|
||||
## Pod disruption budget configuration
|
||||
##
|
||||
pdb:
|
||||
## Specifies whether a Pod disruption budget should be created
|
||||
##
|
||||
create: true
|
||||
## Minimum number / percentage of pods that should remain scheduled
|
||||
##
|
||||
minAvailable: 1
|
||||
## Maximum number / percentage of pods that may be made unavailable
|
||||
##
|
||||
# maxUnavailable: 1
|
||||
|
||||
## HashiCorp Consul service parameters
|
||||
##
|
||||
service:
|
||||
## Consul service ports
|
||||
##
|
||||
port: 8500
|
||||
rpcPort: 8400
|
||||
serflanPort: 8301
|
||||
serverPort: 8300
|
||||
consulDnsPort: 8600
|
||||
uiPort: 80
|
||||
|
||||
## HashiCorp Consul UI service parameters
|
||||
##
|
||||
ui:
|
||||
service:
|
||||
enabled: true
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
nodePort: ""
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## Ingress paramaters
|
||||
##
|
||||
ingress:
|
||||
## Set to true to enable ingress record generation
|
||||
##
|
||||
enabled: false
|
||||
|
||||
## Set this to true in order to add the corresponding annotations for cert-manager
|
||||
##
|
||||
certManager: false
|
||||
|
||||
## Ingress annotations done as key:value pairs
|
||||
## For a full list of possible ingress annotations, please see
|
||||
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
|
||||
##
|
||||
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
|
||||
annotations:
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
|
||||
## The list of hostnames to be covered with this ingress record.
|
||||
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||
hosts:
|
||||
- name: consul-ui.local
|
||||
path: /
|
||||
|
||||
# Set this to true in order to enable TLS on the ingress record
|
||||
tls: false
|
||||
|
||||
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||
tlsSecret: consul-ui.local-tls
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
||||
## -----BEGIN RSA PRIVATE KEY-----
|
||||
##
|
||||
## name should line up with a tlsSecret set further up
|
||||
## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
|
||||
##
|
||||
## It is also possible to create and manage the certificates outside of this helm chart
|
||||
## Please see README.md for more information
|
||||
# - name: consul-ui.local-tls
|
||||
# key:
|
||||
# certificate:
|
||||
|
||||
## Prometheus Exporter / Metrics
|
||||
##
|
||||
metrics:
|
||||
enabled: true
|
||||
## Bitnami HashiCorp Consul Prometheus Exporter image
|
||||
## ref: https://hub.docker.com/r/bitnami/consul-exporter/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/consul-exporter
|
||||
tag: 0.5.0-debian-9-r93
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
## Metrics exporter pod Annotation and Labels
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9107"
|
||||
## HashiCorp Consul Prometheus exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
+252
-172
@@ -14,7 +14,7 @@
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/consul
|
||||
tag: 1.6.1-debian-9-r35
|
||||
tag: 1.6.2-debian-9-r0
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -27,6 +27,11 @@ image:
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
##
|
||||
debug: false
|
||||
|
||||
## String to partially override consul.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
@@ -40,6 +45,9 @@ image:
|
||||
##
|
||||
volumePermissions:
|
||||
enabled: false
|
||||
## Bitnami Minideb image version
|
||||
## ref: https://hub.docker.com/r/bitnami/minideb/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/minideb
|
||||
@@ -51,168 +59,49 @@ volumePermissions:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Init container' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Consul replicas
|
||||
replicas: 3
|
||||
|
||||
service:
|
||||
## Consul service ports
|
||||
port: 8500
|
||||
rpcPort: 8400
|
||||
serflanPort: 8301
|
||||
serverPort: 8300
|
||||
consulDnsPort: 8600
|
||||
uiPort: 80
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
## Consul cluster domain
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
# Cluster domain
|
||||
clusterDomain: cluster.local
|
||||
|
||||
## Datacenter name for consul. If not supplied, will use the consul
|
||||
## default 'dc1'
|
||||
##
|
||||
datacenterName: dc1
|
||||
|
||||
## Consul domain name
|
||||
##
|
||||
domain: consul
|
||||
|
||||
## Consul raft multiplier.
|
||||
##
|
||||
raftMultiplier: '1'
|
||||
|
||||
## Predefined value for gossip key.
|
||||
## The key must be 16-bytes, can be generated with $(consul keygen)
|
||||
##
|
||||
# gossipKey: 887Syd/BOvbtvRAKviazMg==
|
||||
|
||||
## Use TLS to verify the authenticity of servers and clients.
|
||||
## Check README for more information.
|
||||
##
|
||||
# tlsEncryptionSecretName: your-already-created-secret
|
||||
|
||||
## Extra configuration that will be added to the default one.
|
||||
#localConfig: |-
|
||||
# {
|
||||
# "key": "value"
|
||||
# }
|
||||
|
||||
## Consul domain name.
|
||||
domain: consul
|
||||
|
||||
## Consul raft multiplier.
|
||||
raftMultiplier: '1'
|
||||
|
||||
## updateStrategy for Consul statefulset
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
## Consul data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
# storageClass: "-"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
size: 8Gi
|
||||
annotations: {}
|
||||
|
||||
resources: {}
|
||||
# requests:
|
||||
# memory: 256Mi
|
||||
# cpu: 100m
|
||||
|
||||
## Setting maxUnavailable will create a pod disruption budget that will prevent
|
||||
## voluntarty cluster administration from taking down too many consul pods. If
|
||||
## you set maxUnavailable, you should set it to ceil((n/2) - 1), where
|
||||
## n = Replicas. For example, if you have 5 or 6 Replicas, you'll want to set
|
||||
## maxUnavailable = 2. If you are using the default of 3 Replicas, you'll want
|
||||
## to set maxUnavailable to 1.
|
||||
maxUnavailable: 1
|
||||
|
||||
## nodeAffinity settings
|
||||
# nodeAffinity:
|
||||
# requiredDuringSchedulingIgnoredDuringExecution:
|
||||
# nodeSelectorTerms:
|
||||
# - matchExpressions:
|
||||
# - key: cloud.google.com/gke-preemptible
|
||||
# operator: NotIn
|
||||
# values:
|
||||
# - true
|
||||
|
||||
## Anti-Affinity setting. The default "hard" will use pod anti-affinity that is
|
||||
## requiredDuringSchedulingIgnoredDuringExecution to ensure 2 services don't
|
||||
## end up on the same node. Setting this to "soft" will use
|
||||
## preferredDuringSchedulingIgnoredDuringExecution. If set to anything else,
|
||||
## no anti-affinity rules will be configured.
|
||||
antiAffinity: "soft"
|
||||
|
||||
## Create dedicated UI service
|
||||
##
|
||||
ui:
|
||||
service:
|
||||
enabled: true
|
||||
type: "ClusterIP"
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
# cloud.google.com/load-balancer-type: "Internal"
|
||||
# service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
|
||||
# service.beta.kubernetes.io/azure-load-balancer-internal: "true"
|
||||
loadBalancerIP:
|
||||
|
||||
## Configure the ingress resource that allows you to access the
|
||||
## Consul UI. Set up the URL
|
||||
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||
##
|
||||
ingress:
|
||||
## Set to true to enable ingress record generation
|
||||
enabled: false
|
||||
|
||||
## Set this to true in order to add the corresponding annotations for cert-manager
|
||||
certManager: false
|
||||
|
||||
## Ingress annotations done as key:value pairs
|
||||
## For a full list of possible ingress annotations, please see
|
||||
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
|
||||
##
|
||||
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
|
||||
annotations:
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
|
||||
## The list of hostnames to be covered with this ingress record.
|
||||
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||
hosts:
|
||||
- name: consul-ui.local
|
||||
path: /
|
||||
|
||||
# Set this to true in order to enable TLS on the ingress record
|
||||
tls: false
|
||||
|
||||
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||
tlsSecret: consul-ui.local-tls
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
||||
## -----BEGIN RSA PRIVATE KEY-----
|
||||
##
|
||||
## name should line up with a tlsSecret set further up
|
||||
## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
|
||||
##
|
||||
## It is also possible to create and manage the certificates outside of this helm chart
|
||||
## Please see README.md for more information
|
||||
# - name: consul-ui.local-tls
|
||||
# key:
|
||||
# certificate:
|
||||
|
||||
## Consul configmap
|
||||
##
|
||||
# configmap: |
|
||||
# {
|
||||
# "datacenter":"dc2",
|
||||
@@ -234,35 +123,69 @@ ingress:
|
||||
# "serf_lan":"0.0.0.0"
|
||||
# }
|
||||
|
||||
## Extra configuration that will be added to the default one.
|
||||
##
|
||||
# localConfig: |-
|
||||
# {
|
||||
# "key": "value"
|
||||
# }
|
||||
|
||||
## Number of HashiCorp Consul replicas to deploy
|
||||
##
|
||||
replicas: 3
|
||||
|
||||
## updateStrategy for Consul statefulset
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
##
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## HashiCorp Consul container's resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# memory: 256Mi
|
||||
# cpu: 100m
|
||||
requests: {}
|
||||
# memory: 256Mi
|
||||
# cpu: 100m
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## Pod annotations
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
metrics:
|
||||
enabled: false
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/consul-exporter
|
||||
tag: 0.5.0-debian-9-r69
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9107"
|
||||
|
||||
## Node selector
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
nodeSelector: {"beta.kubernetes.io/arch": "amd64"}
|
||||
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
## HashiCorp Consul container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
@@ -270,7 +193,6 @@ livenessProbe:
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
@@ -278,3 +200,161 @@ readinessProbe:
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
## If true, use a Persistent Volume Claim, If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
## Persistent Volume Claim annotations
|
||||
##
|
||||
annotations: {}
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
|
||||
## Pod disruption budget configuration
|
||||
##
|
||||
pdb:
|
||||
## Specifies whether a Pod disruption budget should be created
|
||||
##
|
||||
create: false
|
||||
## Minimum number / percentage of pods that should remain scheduled
|
||||
##
|
||||
minAvailable: 1
|
||||
## Maximum number / percentage of pods that may be made unavailable
|
||||
##
|
||||
# maxUnavailable: 1
|
||||
|
||||
## HashiCorp Consul service parameters
|
||||
##
|
||||
service:
|
||||
## Consul service ports
|
||||
##
|
||||
port: 8500
|
||||
rpcPort: 8400
|
||||
serflanPort: 8301
|
||||
serverPort: 8300
|
||||
consulDnsPort: 8600
|
||||
uiPort: 80
|
||||
|
||||
## HashiCorp Consul UI service parameters
|
||||
##
|
||||
ui:
|
||||
service:
|
||||
enabled: true
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
nodePort: ""
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## Ingress paramaters
|
||||
##
|
||||
ingress:
|
||||
## Set to true to enable ingress record generation
|
||||
##
|
||||
enabled: false
|
||||
|
||||
## Set this to true in order to add the corresponding annotations for cert-manager
|
||||
##
|
||||
certManager: false
|
||||
|
||||
## Ingress annotations done as key:value pairs
|
||||
## For a full list of possible ingress annotations, please see
|
||||
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
|
||||
##
|
||||
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
|
||||
annotations:
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
|
||||
## The list of hostnames to be covered with this ingress record.
|
||||
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||
hosts:
|
||||
- name: consul-ui.local
|
||||
path: /
|
||||
|
||||
# Set this to true in order to enable TLS on the ingress record
|
||||
tls: false
|
||||
|
||||
## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
|
||||
tlsSecret: consul-ui.local-tls
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
||||
## -----BEGIN RSA PRIVATE KEY-----
|
||||
##
|
||||
## name should line up with a tlsSecret set further up
|
||||
## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
|
||||
##
|
||||
## It is also possible to create and manage the certificates outside of this helm chart
|
||||
## Please see README.md for more information
|
||||
# - name: consul-ui.local-tls
|
||||
# key:
|
||||
# certificate:
|
||||
|
||||
## Prometheus Exporter / Metrics
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
## Bitnami HashiCorp Consul Prometheus Exporter image
|
||||
## ref: https://hub.docker.com/r/bitnami/consul-exporter/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/consul-exporter
|
||||
tag: 0.5.0-debian-9-r93
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
## Metrics exporter pod Annotation and Labels
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9107"
|
||||
## HashiCorp Consul Prometheus exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
apiVersion: v1
|
||||
name: elasticsearch
|
||||
version: 7.1.0
|
||||
appVersion: 7.4.1
|
||||
version: 10.1.0
|
||||
appVersion: 7.5.0
|
||||
description: A highly scalable open-source full-text search and analytics engine
|
||||
keywords:
|
||||
- elasticsearch
|
||||
- elasticsearch
|
||||
home: https://www.elastic.co/products/elasticsearch
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-elasticsearch
|
||||
- https://github.com/bitnami/bitnami-docker-elasticsearch
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
icon: https://bitnami.com/assets/stacks/elasticsearch/img/elasticsearch-stack-110x117.png
|
||||
|
||||
+225
-144
@@ -52,150 +52,204 @@ $ helm delete --purge my-release
|
||||
|
||||
The following table lists the configurable parameters of the Elasticsearch chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|---------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
|
||||
| `global.imageRegistry` | Global Docker image registry | `nil` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
|
||||
| `image.registry` | Elasticsearch image registry | `docker.io` |
|
||||
| `image.repository` | Elasticsearch image repository | `bitnami/elasticsearch` |
|
||||
| `image.tag` | Elasticsearch image tag | `{TAG_NAME}` |
|
||||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
|
||||
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `nameOverride` | String to partially override elasticsearch.fullname template with a string (will prepend the release name) | `nil` |
|
||||
| `fullnameOverride` | String to fully override elasticsearch.fullname template with a string | `nil` |
|
||||
| `name` | Elasticsearch cluster name | `elastic` |
|
||||
| `plugins` | Comma, semi-colon or space separated list of plugins to install at initialization | `nil` |
|
||||
| `config` | Elasticsearch node custom configuration | `` |
|
||||
| `master.name` | Master-eligible node pod name | `master` |
|
||||
| `master.replicas` | Desired number of Elasticsearch master-eligible nodes | `2` |
|
||||
| `master.heapSize` | Master-eligible node heap size | `128m` |
|
||||
| `master.antiAffinity` | Master-eligible node pod anti-affinity policy | `soft` |
|
||||
| `master.nodeAffinity` | Master-eligible node affinity policy | `nil` |
|
||||
| `master.service.type` | Kubernetes Service type (master-eligible nodes) | `ClusterIP` |
|
||||
| `master.service.port` | Kubernetes Service port for Elasticsearch transport port (master-eligible nodes) | `9300` |
|
||||
| `master.service.nodePort` | Kubernetes Service nodePort (master-eligible nodes) | `nil` |
|
||||
| `master.service.annotations` | Annotations for master-eligible nodes service | {} |
|
||||
| `master.service.loadBalancerIP` | loadBalancerIP if master-eligible nodes service type is `LoadBalancer` | `nil` |
|
||||
| `master.resources` | CPU/Memory resource requests/limits for master-eligible nodes pods | `requests: { cpu: "25m", memory: "256Mi" }` |
|
||||
| `master.livenessProbe.enabled` | Enable/disable the liveness probe (master-eligible nodes pod) | `true` |
|
||||
| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master-eligible nodes pod) | `90` |
|
||||
| `master.livenessProbe.periodSeconds` | How often to perform the probe (master-eligible nodes pod) | `10` |
|
||||
| `master.livenessProbe.timeoutSeconds` | When the probe times out (master-eligible nodes pod) | `5` |
|
||||
| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (master-eligible nodes pod) | `1` |
|
||||
| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `master.podAnnotations` | Annotations for master pods. | `{}` |
|
||||
| `master.readinessProbe.enabled` | Enable/disable the readiness probe (master-eligible nodes pod) | `true` |
|
||||
| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master-eligible nodes pod) | `90` |
|
||||
| `master.readinessProbe.periodSeconds` | How often to perform the probe (master-eligible nodes pod) | `10` |
|
||||
| `master.readinessProbe.timeoutSeconds` | When the probe times out (master-eligible nodes pod) | `5` |
|
||||
| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (master-eligible nodes pod) | `1` |
|
||||
| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `securityContext.enabled` | Enable security context | `true` |
|
||||
| `securityContext.fsGroup` | Group ID for the container | `1001` |
|
||||
| `securityContext.runAsUser` | User ID for the container | `1001` |
|
||||
| `clusterDomain` | Kubernetes cluster domain | `cluster.local` |
|
||||
| `discovery.name` | Discover node pod name | `discovery` |
|
||||
| `coordinating.name` | Coordinating-only node pod name | `coordinating-only` |
|
||||
| `coordinating.replicas` | Desired number of Elasticsearch coordinating-only nodes | `2` |
|
||||
| `coordinating.heapSize` | Coordinating-only node heap size | `128m` |
|
||||
| `coordinating.antiAffinity` | Coordinating-only node pod anti-affinity policy | `soft` |
|
||||
| `coordinating.nodeAffinity` | Coordinating-only node affinity policy | `nil` |
|
||||
| `coordinating.podAnnotations` | Annotations for coordniating pods. | `{}` |
|
||||
| `coordinating.service.type` | Kubernetes Service type (coordinating-only nodes) | `ClusterIP` |
|
||||
| `coordinating.service.port` | Kubernetes Service port for REST API (coordinating-only nodes) | `9200` |
|
||||
| `coordinating.service.nodePort` | Kubernetes Service nodePort (coordinating-only nodes) | `nil` |
|
||||
| `coordinating.service.annotations` | Annotations for coordinating-only nodes service | {} |
|
||||
| `coordinating.service.loadBalancerIP` | loadBalancerIP if coordinating-only nodes service type is `LoadBalancer` | `nil` |
|
||||
| `coordinating.resources` | CPU/Memory resource requests/limits for coordinating-only nodes pods | `requests: { cpu: "25m", memory: "256Mi" }` |
|
||||
| `coordinating.livenessProbe.enabled` | Enable/disable the liveness probe (coordinating-only nodes pod) | `true` |
|
||||
| `coordinating.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (coordinating-only nodes pod) | `90` |
|
||||
| `coordinating.livenessProbe.periodSeconds` | How often to perform the probe (coordinating-only nodes pod) | `10` |
|
||||
| `coordinating.livenessProbe.timeoutSeconds` | When the probe times out (coordinating-only nodes pod) | `5` |
|
||||
| `coordinating.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (coordinating-only nodes pod) | `1` |
|
||||
| `coordinating.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `coordinating.readinessProbe.enabled` | Enable/disable the readiness probe (coordinating-only nodes pod) | `true` |
|
||||
| `coordinating.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (coordinating-only nodes pod) | `90` |
|
||||
| `coordinating.readinessProbe.periodSeconds` | How often to perform the probe (coordinating-only nodes pod) | `10` |
|
||||
| `coordinating.readinessProbe.timeoutSeconds` | When the probe times out (coordinating-only nodes pod) | `5` |
|
||||
| `coordinating.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (coordinating-only nodes pod) | `1` |
|
||||
| `coordinating.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `data.name` | Data node pod name | `data` |
|
||||
| `data.replicas` | Desired number of Elasticsearch data nodes | `3` |
|
||||
| `data.updateStrategy.type` | Update strategy for Data statefulset | `RollingUpdate` |
|
||||
| `data.updateStrategy.rollingUpdatePartition` | Partition update strategy for Data statefulset | `nil` |
|
||||
| `data.heapSize` | Data node heap size | `1024m` |
|
||||
| `data.antiAffinity` | Data pod anti-affinity policy | `soft` |
|
||||
| `data.nodeAffinity` | Data pod node affinity policy | `nil` |
|
||||
| `data.resources` | CPU/Memory resource requests/limits for data nodes | `requests: { cpu: "25m", memory: "1152Mi" }` |
|
||||
| `data.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` |
|
||||
| `data.persistence.annotations` | Persistent Volume Claim annotations | `{}` |
|
||||
| `data.persistence.storageClass` | Persistent Volume Storage Class | `` |
|
||||
| `data.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` |
|
||||
| `data.persistence.size` | Persistent Volume Size | `8Gi` |
|
||||
| `data.livenessProbe.enabled` | Enable/disable the liveness probe (data nodes pod) | `true` |
|
||||
| `data.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (data nodes pod) | `90` |
|
||||
| `data.livenessProbe.periodSeconds` | How often to perform the probe (data nodes pod) | `10` |
|
||||
| `data.livenessProbe.timeoutSeconds` | When the probe times out (data nodes pod) | `5` |
|
||||
| `data.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (data nodes pod) | `1` |
|
||||
| `data.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `data.podAnnotations` | Annotations for data pods. | `{}` |
|
||||
| `data.readinessProbe.enabled` | Enable/disable the readiness probe (data nodes pod) | `true` |
|
||||
| `data.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (data nodes pod) | `90` |
|
||||
| `data.readinessProbe.periodSeconds` | How often to perform the probe (data nodes pod) | `10` |
|
||||
| `data.readinessProbe.timeoutSeconds` | When the probe times out (data nodes pod) | `5` |
|
||||
| `data.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (data nodes pod) | `1` |
|
||||
| `data.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `ingest.enabled` | Enable ingest nodes | `false` |
|
||||
| `ingest.name` | Ingest node pod name | `ingest` |
|
||||
| `ingest.replicas` | Desired number of Elasticsearch ingest nodes | `2` |
|
||||
| `ingest.heapSize` | Ingest node heap size | `128m` |
|
||||
| `ingest.antiAffinity` | Ingest node pod anti-affinity policy | `soft` |
|
||||
| `ingest.nodeAffinity` | Ingest node pod affinity policy | `nil` |
|
||||
| `ingest.service.type` | Kubernetes Service type (ingest nodes) | `ClusterIP` |
|
||||
| `ingest.service.port` | Kubernetes Service port Elasticsearch transport port (ingest nodes) | `9300` |
|
||||
| `ingest.service.nodePort` | Kubernetes Service nodePort (ingest nodes) | `nil` |
|
||||
| `ingest.service.annotations` | Annotations for ingest nodes service | {} |
|
||||
| `ingest.service.loadBalancerIP` | loadBalancerIP if ingest nodes service type is `LoadBalancer` | `nil` |
|
||||
| `ingest.resources` | CPU/Memory resource requests/limits for ingest nodes pods | `requests: { cpu: "25m", memory: "256Mi" }` |
|
||||
| `ingest.livenessProbe.enabled` | Enable/disable the liveness probe (ingest nodes pod) | `true` |
|
||||
| `ingest.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (ingest nodes pod) | `90` |
|
||||
| `ingest.livenessProbe.periodSeconds` | How often to perform the probe (ingest nodes pod) | `10` |
|
||||
| `ingest.livenessProbe.timeoutSeconds` | When the probe times out (ingest nodes pod) | `5` |
|
||||
| `ingest.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (ingest nodes pod) | `1` |
|
||||
| `ingest.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `ingest.podAnnotations` | Annotations for ingest pods. | `{}` |
|
||||
| `ingest.readinessProbe.enabled` | Enable/disable the readiness probe (ingest nodes pod) | `true` |
|
||||
| `ingest.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (ingest nodes pod) | `90` |
|
||||
| `ingest.readinessProbe.periodSeconds` | How often to perform the probe (ingest nodes pod) | `10` |
|
||||
| `ingest.readinessProbe.timeoutSeconds` | When the probe times out (ingest nodes pod) | `5` |
|
||||
| `ingest.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (ingest nodes pod) | `1` |
|
||||
| `ingest.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `metrics.enabled` | Enable prometheus exporter | `false` |
|
||||
| `metrics.name` | Metrics pod name | `metrics` |
|
||||
| `metrics.image.registry` | Metrics exporter image registry | `docker.io` |
|
||||
| `metrics.image.repository` | Metrics exporter image repository | `bitnami/elasticsearch-exporter` |
|
||||
| `metrics.image.tag` | Metrics exporter image tag | `1.0.2` |
|
||||
| `metrics.image.pullPolicy` | Metrics exporter image pull policy | `IfNotPresent` |
|
||||
| `metrics.service.type` | Metrics exporter endpoint service type | `ClusterIP` |
|
||||
| `metrics.resources` | Metrics exporter resource requests/limit | `requests: { cpu: "25m" }` |
|
||||
| `metrics.podAnnotations` | Annotations for metrics pods. | `{}` |
|
||||
| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
|
||||
| `metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `nil` |
|
||||
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `nil` (Prometheus Operator default value) |
|
||||
| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `nil` (Prometheus Operator default value) |
|
||||
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `nil` |
|
||||
| `sysctlImage.enabled` | Enable kernel settings modifier image | `true` |
|
||||
| `sysctlImage.registry` | Kernel settings modifier image registry | `docker.io` |
|
||||
| `sysctlImage.repository` | Kernel settings modifier image repository | `bitnami/minideb` |
|
||||
| `sysctlImage.tag` | Kernel settings modifier image tag | `stretch` |
|
||||
| `sysctlImage.pullPolicy` | Kernel settings modifier image pull policy | `Always` |
|
||||
| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` |
|
||||
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` |
|
||||
| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` |
|
||||
| `volumePermissions.image.tag` | Init container volume-permissions image tag | `stretch` |
|
||||
| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` |
|
||||
| `volumePermissions.resources` | Init container resource requests/limit | `nil` |
|
||||
| Parameter | Description | Default |
|
||||
|---------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|
|
||||
| `global.imageRegistry` | Global Docker image registry | `nil` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
|
||||
| `global.coordinating.name` | Coordinating-only node pod name at global level to be used also in the Kibana subchart | `coordinating-only` |
|
||||
| `image.registry` | Elasticsearch image registry | `docker.io` |
|
||||
| `image.repository` | Elasticsearch image repository | `bitnami/elasticsearch` |
|
||||
| `image.tag` | Elasticsearch image tag | `{TAG_NAME}` |
|
||||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
|
||||
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `nameOverride` | String to partially override elasticsearch.fullname template with a string (will prepend the release name) | `nil` |
|
||||
| `fullnameOverride` | String to fully override elasticsearch.fullname template with a string | `nil` |
|
||||
| `name` | Elasticsearch cluster name | `elastic` |
|
||||
| `plugins` | Comma, semi-colon or space separated list of plugins to install at initialization | `nil` |
|
||||
| `config` | Elasticsearch node custom configuration | `` |
|
||||
| `extraVolumes` | Extra volumes | |
|
||||
| `extraVolumeMounts` | Mount extra volume(s), | |
|
||||
| `master.name` | Master-eligible node pod name | `master` |
|
||||
| `master.replicas` | Desired number of Elasticsearch master-eligible nodes | `2` |
|
||||
| `master.heapSize` | Master-eligible node heap size | `128m` |
|
||||
| `master.antiAffinity` | Master-eligible node pod anti-affinity policy | `soft` |
|
||||
| `master.nodeAffinity` | Master-eligible node affinity policy | `nil` |
|
||||
| `master.service.type` | Kubernetes Service type (master-eligible nodes) | `ClusterIP` |
|
||||
| `master.service.port` | Kubernetes Service port for Elasticsearch transport port (master-eligible nodes) | `9300` |
|
||||
| `master.service.nodePort` | Kubernetes Service nodePort (master-eligible nodes) | `nil` |
|
||||
| `master.service.annotations` | Annotations for master-eligible nodes service | `{}` |
|
||||
| `master.service.loadBalancerIP` | loadBalancerIP if master-eligible nodes service type is `LoadBalancer` | `nil` |
|
||||
| `master.resources` | CPU/Memory resource requests/limits for master-eligible nodes pods | `requests: { cpu: "25m", memory: "256Mi" }` |
|
||||
| `master.podAnnotations` | Annotations for master pods. | `{}` |
|
||||
| `master.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` |
|
||||
| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` |
|
||||
| `master.persistence.storageClass` | Persistent Volume Storage Class | `` |
|
||||
| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` |
|
||||
| `master.persistence.size` | Persistent Volume Size | `8Gi` |
|
||||
| `master.securityContext.enabled` | Enable security context for master-eligible pods | `true` |
|
||||
| `master.securityContext.fsGroup` | Group ID for the container for master-eligible pods | `1001` |
|
||||
| `master.securityContext.runAsUser` | User ID for the container for master-eligible pods | `1001` |
|
||||
| `master.livenessProbe.enabled` | Enable/disable the liveness probe (master-eligible nodes pod) | `true` |
|
||||
| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master-eligible nodes pod) | `90` |
|
||||
| `master.livenessProbe.periodSeconds` | How often to perform the probe (master-eligible nodes pod) | `10` |
|
||||
| `master.livenessProbe.timeoutSeconds` | When the probe times out (master-eligible nodes pod) | `5` |
|
||||
| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (master-eligible nodes pod) | `1` |
|
||||
| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `master.readinessProbe.enabled` | Enable/disable the readiness probe (master-eligible nodes pod) | `true` |
|
||||
| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master-eligible nodes pod) | `90` |
|
||||
| `master.readinessProbe.periodSeconds` | How often to perform the probe (master-eligible nodes pod) | `10` |
|
||||
| `master.readinessProbe.timeoutSeconds` | When the probe times out (master-eligible nodes pod) | `5` |
|
||||
| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (master-eligible nodes pod) | `1` |
|
||||
| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `clusterDomain` | Kubernetes cluster domain | `cluster.local` |
|
||||
| `discovery.name` | Discover node pod name | `discovery` |
|
||||
| `coordinating.replicas` | Desired number of Elasticsearch coordinating-only nodes | `2` |
|
||||
| `coordinating.heapSize` | Coordinating-only node heap size | `128m` |
|
||||
| `coordinating.antiAffinity` | Coordinating-only node pod anti-affinity policy | `soft` |
|
||||
| `coordinating.nodeAffinity` | Coordinating-only node affinity policy | `nil` |
|
||||
| `coordinating.podAnnotations` | Annotations for coordniating pods. | `{}` |
|
||||
| `coordinating.service.type` | Kubernetes Service type (coordinating-only nodes) | `ClusterIP` |
|
||||
| `coordinating.service.port` | Kubernetes Service port for REST API (coordinating-only nodes) | `9200` |
|
||||
| `coordinating.service.nodePort` | Kubernetes Service nodePort (coordinating-only nodes) | `nil` |
|
||||
| `coordinating.service.annotations` | Annotations for coordinating-only nodes service | `{}` |
|
||||
| `coordinating.service.loadBalancerIP` | loadBalancerIP if coordinating-only nodes service type is `LoadBalancer` | `nil` |
|
||||
| `coordinating.resources` | CPU/Memory resource requests/limits for coordinating-only nodes pods | `requests: { cpu: "25m", memory: "256Mi" }` |
|
||||
| `coordinating.securityContext.enabled` | Enable security context for coordinating-only pods | `true` |
|
||||
| `coordinating.securityContext.fsGroup` | Group ID for the container for coordinating-only pods | `1001` |
|
||||
| `coordinating.securityContext.runAsUser` | User ID for the container for coordinating-only pods | `1001` |
|
||||
| `coordinating.livenessProbe.enabled` | Enable/disable the liveness probe (coordinating-only nodes pod) | `true` |
|
||||
| `coordinating.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (coordinating-only nodes pod) | `90` |
|
||||
| `coordinating.livenessProbe.periodSeconds` | How often to perform the probe (coordinating-only nodes pod) | `10` |
|
||||
| `coordinating.livenessProbe.timeoutSeconds` | When the probe times out (coordinating-only nodes pod) | `5` |
|
||||
| `coordinating.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (coordinating-only nodes pod) | `1` |
|
||||
| `coordinating.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `coordinating.readinessProbe.enabled` | Enable/disable the readiness probe (coordinating-only nodes pod) | `true` |
|
||||
| `coordinating.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (coordinating-only nodes pod) | `90` |
|
||||
| `coordinating.readinessProbe.periodSeconds` | How often to perform the probe (coordinating-only nodes pod) | `10` |
|
||||
| `coordinating.readinessProbe.timeoutSeconds` | When the probe times out (coordinating-only nodes pod) | `5` |
|
||||
| `coordinating.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (coordinating-only nodes pod) | `1` |
|
||||
| `coordinating.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `data.name` | Data node pod name | `data` |
|
||||
| `data.replicas` | Desired number of Elasticsearch data nodes | `3` |
|
||||
| `data.updateStrategy.type` | Update strategy for Data statefulset | `RollingUpdate` |
|
||||
| `data.updateStrategy.rollingUpdatePartition` | Partition update strategy for Data statefulset | `nil` |
|
||||
| `data.heapSize` | Data node heap size | `1024m` |
|
||||
| `data.antiAffinity` | Data pod anti-affinity policy | `soft` |
|
||||
| `data.nodeAffinity` | Data pod node affinity policy | `nil` |
|
||||
| `data.resources` | CPU/Memory resource requests/limits for data nodes | `requests: { cpu: "25m", memory: "1152Mi" }` |
|
||||
| `data.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` |
|
||||
| `data.persistence.annotations` | Persistent Volume Claim annotations | `{}` |
|
||||
| `data.persistence.storageClass` | Persistent Volume Storage Class | `` |
|
||||
| `data.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` |
|
||||
| `data.persistence.size` | Persistent Volume Size | `8Gi` |
|
||||
| `data.securityContext.enabled` | Enable security context for data pods | `true` |
|
||||
| `data.securityContext.fsGroup` | Group ID for the container for data pods | `1001` |
|
||||
| `data.securityContext.runAsUser` | User ID for the container for data pods | `1001` |
|
||||
| `data.livenessProbe.enabled` | Enable/disable the liveness probe (data nodes pod) | `true` |
|
||||
| `data.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (data nodes pod) | `90` |
|
||||
| `data.livenessProbe.periodSeconds` | How often to perform the probe (data nodes pod) | `10` |
|
||||
| `data.livenessProbe.timeoutSeconds` | When the probe times out (data nodes pod) | `5` |
|
||||
| `data.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (data nodes pod) | `1` |
|
||||
| `data.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `data.podAnnotations` | Annotations for data pods. | `{}` |
|
||||
| `data.readinessProbe.enabled` | Enable/disable the readiness probe (data nodes pod) | `true` |
|
||||
| `data.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (data nodes pod) | `90` |
|
||||
| `data.readinessProbe.periodSeconds` | How often to perform the probe (data nodes pod) | `10` |
|
||||
| `data.readinessProbe.timeoutSeconds` | When the probe times out (data nodes pod) | `5` |
|
||||
| `data.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (data nodes pod) | `1` |
|
||||
| `data.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `ingest.enabled` | Enable ingest nodes | `false` |
|
||||
| `ingest.name` | Ingest node pod name | `ingest` |
|
||||
| `ingest.replicas` | Desired number of Elasticsearch ingest nodes | `2` |
|
||||
| `ingest.heapSize` | Ingest node heap size | `128m` |
|
||||
| `ingest.antiAffinity` | Ingest node pod anti-affinity policy | `soft` |
|
||||
| `ingest.nodeAffinity` | Ingest node pod affinity policy | `nil` |
|
||||
| `ingest.service.type` | Kubernetes Service type (ingest nodes) | `ClusterIP` |
|
||||
| `ingest.service.port` | Kubernetes Service port Elasticsearch transport port (ingest nodes) | `9300` |
|
||||
| `ingest.service.nodePort` | Kubernetes Service nodePort (ingest nodes) | `nil` |
|
||||
| `ingest.service.annotations` | Annotations for ingest nodes service | `{}` |
|
||||
| `ingest.service.loadBalancerIP` | loadBalancerIP if ingest nodes service type is `LoadBalancer` | `nil` |
|
||||
| `ingest.resources` | CPU/Memory resource requests/limits for ingest nodes pods | `requests: { cpu: "25m", memory: "256Mi" }` |
|
||||
| `ingest.securityContext.enabled` | Enable security context for ingest pods | `true` |
|
||||
| `ingest.securityContext.fsGroup` | Group ID for the container for ingest pods | `1001` |
|
||||
| `ingest.securityContext.runAsUser` | User ID for the container for ingest pods | `1001` |
|
||||
| `ingest.livenessProbe.enabled` | Enable/disable the liveness probe (ingest nodes pod) | `true` |
|
||||
| `ingest.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (ingest nodes pod) | `90` |
|
||||
| `ingest.livenessProbe.periodSeconds` | How often to perform the probe (ingest nodes pod) | `10` |
|
||||
| `ingest.livenessProbe.timeoutSeconds` | When the probe times out (ingest nodes pod) | `5` |
|
||||
| `ingest.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (ingest nodes pod) | `1` |
|
||||
| `ingest.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `ingest.podAnnotations` | Annotations for ingest pods. | `{}` |
|
||||
| `ingest.readinessProbe.enabled` | Enable/disable the readiness probe (ingest nodes pod) | `true` |
|
||||
| `ingest.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (ingest nodes pod) | `90` |
|
||||
| `ingest.readinessProbe.periodSeconds` | How often to perform the probe (ingest nodes pod) | `10` |
|
||||
| `ingest.readinessProbe.timeoutSeconds` | When the probe times out (ingest nodes pod) | `5` |
|
||||
| `ingest.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (ingest nodes pod) | `1` |
|
||||
| `ingest.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded | `5` |
|
||||
| `curator.enabled` | Enable Elasticsearch Curator cron job | `false` |
|
||||
| `curator.name` | Elasticsearch Curator pod name | `curator` |
|
||||
| `curator.image.registry` | Elasticsearch Curator image registry | `docker.io` |
|
||||
| `curator.image.repository` | Elasticsearch Curator image repository | `bitnami/elasticsearch-curator` |
|
||||
| `curator.image.tag` | Elasticsearch Curator image tag | `{TAG_NAME}` |
|
||||
| `curator.image.pullPolicy` | Elasticsearch Curator image pull policy | `{TAG_NAME}` |
|
||||
| `curator.cronjob.schedule` | Schedule for the CronJob | `0 1 * * *` |
|
||||
| `curator.cronjob.annotations` | Annotations to add to the cronjob | `{}` |
|
||||
| `curator.cronjob.concurrencyPolicy` | `Allow,Forbid,Replace` concurrent jobs | `nil` |
|
||||
| `curator.cronjob.failedJobsHistoryLimit` | Specify the number of failed Jobs to keep | `nil` |
|
||||
| `curator.cronjob.successfulJobsHistoryLimit` | Specify the number of completed Jobs to keep | `nil` |
|
||||
| `curator.cronjob.jobRestartPolicy` | Control the Job restartPolicy | `Never` |
|
||||
| `curator.podAnnotations` | Annotations to add to the pod | `{}` |
|
||||
| `curator.rbac.enabled` | Enable RBAC resources | `false` |
|
||||
| `curator.serviceAccount.create` | Create a default serviceaccount for elasticsearch curator | `true` |
|
||||
| `curator.serviceAccount.name` | Name for elasticsearch curator serviceaccount | `""` |
|
||||
| `curator.hooks` | Whether to run job on selected hooks | `{ "install": false, "upgrade": false }` |
|
||||
| `curator.psp.create` | Create pod security policy resources | `false` |
|
||||
| `curator.dryrun` | Run Curator in dry-run mode | `false` |
|
||||
| `curator.command` | Command to execute | `["/curator/curator"]` |
|
||||
| `curator.env` | Environment variables to add to the cronjob container | `{}` |
|
||||
| `curator.configMaps.action_file_yml` | Contents of the Curator action_file.yml | See values.yaml |
|
||||
| `curator.configMaps.config_yml` | Contents of the Curator config.yml (overrides config) | See values.yaml |
|
||||
| `curator.resources` | Resource requests and limits | `{}` |
|
||||
| `curator.priorityClassName` | priorityClassName | `nil` |
|
||||
| `curator.extraVolumes` | Extra volumes | |
|
||||
| `curator.extraVolumeMounts` | Mount extra volume(s), | |
|
||||
| `curator.extraInitContainers` | Init containers to add to the cronjob container | `{}` |
|
||||
| `curator.envFromSecrets` | Environment variables from secrets to the cronjob container | `{}` |
|
||||
| `curator.envFromSecrets.*.from.secret` | - `secretKeyRef.name` used for environment variable | |
|
||||
| `curator.envFromSecrets.*.from.key` | - `secretKeyRef.key` used for environment variable | |
|
||||
| `metrics.enabled` | Enable prometheus exporter | `false` |
|
||||
| `metrics.name` | Metrics pod name | `metrics` |
|
||||
| `metrics.image.registry` | Metrics exporter image registry | `docker.io` |
|
||||
| `metrics.image.repository` | Metrics exporter image repository | `bitnami/elasticsearch-exporter` |
|
||||
| `metrics.image.tag` | Metrics exporter image tag | `1.0.2` |
|
||||
| `metrics.image.pullPolicy` | Metrics exporter image pull policy | `IfNotPresent` |
|
||||
| `metrics.service.type` | Metrics exporter endpoint service type | `ClusterIP` |
|
||||
| `metrics.service.annotations` | Annotations for metrics service. | `{prometheus.io/scrape: "true", prometheus.io/port: "8080"}` |
|
||||
| `metrics.resources` | Metrics exporter resource requests/limit | `requests: { cpu: "25m" }` |
|
||||
| `metrics.podAnnotations` | Annotations for metrics pods. | `{prometheus.io/scrape: "true", prometheus.io/port: "8080"}` |
|
||||
| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
|
||||
| `metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `nil` |
|
||||
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `nil` (Prometheus Operator default value) |
|
||||
| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `nil` (Prometheus Operator default value) |
|
||||
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `nil` |
|
||||
| `sysctlImage.enabled` | Enable kernel settings modifier image | `true` |
|
||||
| `sysctlImage.registry` | Kernel settings modifier image registry | `docker.io` |
|
||||
| `sysctlImage.repository` | Kernel settings modifier image repository | `bitnami/minideb` |
|
||||
| `sysctlImage.tag` | Kernel settings modifier image tag | `stretch` |
|
||||
| `sysctlImage.pullPolicy` | Kernel settings modifier image pull policy | `Always` |
|
||||
| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` |
|
||||
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` |
|
||||
| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` |
|
||||
| `volumePermissions.image.tag` | Init container volume-permissions image tag | `stretch` |
|
||||
| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` |
|
||||
| `volumePermissions.resources` | Init container resource requests/limit | `nil` |
|
||||
|
||||
### Kibana Parameters
|
||||
|
||||
| `global.kibanaEnabled` | Use bundled Kibana | `false` |
|
||||
| `kibana.elasticsearch.hosts` | Array containing hostnames for the ES instances. Used to generate the URL | `{{ include "elasticsearch.coordinating.fullname" . }}` Coordinating service (fullname) |
|
||||
| `kibana.elasticsearch.port` | Port to connect Kibana and ES instance. Used to generate the URL | `9200` |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
@@ -385,6 +439,12 @@ This chart includes a `values-production.yaml` file where you can find some para
|
||||
+ metrics.enabled: true
|
||||
```
|
||||
|
||||
- Enable bundled Kibana:
|
||||
```diff
|
||||
- global.kibanaEnabled: false
|
||||
+ global.kibanaEnabled: true
|
||||
```
|
||||
|
||||
### Default kernel settings
|
||||
|
||||
Currently, Elasticsearch requires some changes in the kernel of the host machine to work as expected. If those values are not set in the underlying operating system, the ES containers fail to boot with ERROR messages. More information about these requirements can be found in the links below:
|
||||
@@ -395,6 +455,11 @@ Currently, Elasticsearch requires some changes in the kernel of the host machine
|
||||
This chart uses a **privileged** initContainer to change those settings in the Kernel by running: `sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536`.
|
||||
You can disable the initContainer using the `sysctlImage.enabled=false` parameter.
|
||||
|
||||
### Enable bundled Kibana
|
||||
|
||||
This Elasticsearch chart contains Kibana as subchart, you can enable it just setting the `global.kibanaEnabled=true` parameter. It is enabled by default using the `values-production.yaml` file.
|
||||
To see the notes with some operational instructions from the Kibana chart, please use the `--render-subchart-notes` as part of your `helm install` command, in this way you can see the Kibana and ES notes in your terminal.
|
||||
|
||||
## Persistence
|
||||
|
||||
The [Bitnami Elasticsearch](https://github.com/bitnami/bitnami-docker-elasticsearch) image stores the Elasticsearch data at the `/bitnami/elasticsearch/data` path of the container.
|
||||
@@ -412,6 +477,22 @@ You can enable this initContainer by setting `volumePermissions.enabled` to `tru
|
||||
|
||||
## Notable changes
|
||||
|
||||
### 10.0.0
|
||||
|
||||
In this version, Kibana was added as dependant chart. More info about how to enable and work with this bundled Kibana in the ["Enable bundled Kibana"](#enable-bundled-kibana) section.
|
||||
|
||||
### 9.0.0
|
||||
|
||||
Elasticsearch master nodes store the cluster status at `/bitnami/elasticsearch/data`. Among other things this includes the UUID of the elasticsearch cluster. Without a persistent data store for this data, the UUID of a cluster could change if k8s node(s) hosting the es master nodes go down and are scheduled on some other master node. In the event that this happens, the data nodes will no longer be able to join a cluster as the uuid changed resulting in a broken cluster.
|
||||
|
||||
To resolve such issues, PVC's are now attached for master node data persistence.
|
||||
|
||||
---
|
||||
|
||||
Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec.
|
||||
|
||||
In [4dfac075aacf74405e31ae5b27df4369e84eb0b0](https://github.com/bitnami/charts/commit/4dfac075aacf74405e31ae5b27df4369e84eb0b0) the `apiVersion` of the deployment resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage.
|
||||
|
||||
### 7.0.0
|
||||
|
||||
This version enabled by default the initContainer that modify some kernel settings to meet the Elasticsearch requirements. More info in the ["Default kernel settings"](#default-kernel-settings) section.
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: kibana
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 5.0.0
|
||||
digest: sha256:4970b5ac3743b773c6608e77e28eb0928d45c3379bbe6660a35d8d4ef07613df
|
||||
generated: "2019-12-13T12:46:10.381126027Z"
|
||||
@@ -0,0 +1,5 @@
|
||||
dependencies:
|
||||
- name: kibana
|
||||
version: 5.x.x
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: global.kibanaEnabled
|
||||
@@ -59,6 +59,17 @@
|
||||
|
||||
** Please be patient while the chart is being deployed **
|
||||
|
||||
{{- if .Values.curator.enabled }}
|
||||
|
||||
A CronJob will run with schedule {{ .Values.curator.cronjob.schedule }}.
|
||||
|
||||
The Jobs will not be removed automagically when deleting this Helm chart.
|
||||
To remove these jobs, run the following:
|
||||
|
||||
kubectl -n {{ .Release.Namespace }} delete job -l app={{ template "elasticsearch.name" . }},role=curator
|
||||
|
||||
{{- end }}
|
||||
|
||||
Elasticsearch can be accessed within the cluster on port {{ .Values.coordinating.service.port }} at {{ template "elasticsearch.coordinating.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
|
||||
|
||||
To access from outside the cluster execute the following commands:
|
||||
|
||||
@@ -2,6 +2,29 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for statefulset.
|
||||
*/}}
|
||||
{{- define "statefulset.apiVersion" -}}
|
||||
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- print "apps/v1beta1" -}}
|
||||
{{- else -}}
|
||||
{{- print "apps/v1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for deployment.
|
||||
*/}}
|
||||
{{- define "deployment.apiVersion" -}}
|
||||
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- print "extensions/v1beta1" -}}
|
||||
{{- else -}}
|
||||
{{- print "apps/v1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "elasticsearch.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
@@ -30,6 +53,24 @@ Create chart name and version as used by the chart label.
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "elasticsearch.labels" -}}
|
||||
app: {{ include "elasticsearch.name" . }}
|
||||
chart: {{ include "elasticsearch.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
|
||||
*/}}
|
||||
{{- define "elasticsearch.matchLabels" -}}
|
||||
app: {{ include "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper ES image name
|
||||
*/}}
|
||||
@@ -85,8 +126,12 @@ Create a default fully qualified coordinating name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "elasticsearch.coordinating.fullname" -}}
|
||||
{{- if .Values.global.kibanaEnabled -}}
|
||||
{{- printf "%s-%s" .Release.Name .Values.global.coordinating.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.coordinating.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.global.coordinating.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
@@ -157,46 +202,21 @@ Also, we can't use a single if because lazy evaluation is not an option
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "elasticsearch.imagePullSecrets" -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
|
||||
Also, we can not use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.global.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.sysctlImage.pullSecrets .Values.volumePermissions.image.pullSecrets }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- $imagePullSecrets := coalesce .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.curator.image.pullSecrets .Values.sysctlImage.pullSecrets .Values.volumePermissions.image.pullSecrets -}}
|
||||
{{- if $imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
{{- range $imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.metrics.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.sysctlImage.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.volumePermissions.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.sysctlImage.pullSecrets .Values.volumePermissions.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.metrics.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.sysctlImage.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.volumePermissions.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -257,3 +277,96 @@ but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for cronjob APIs.
|
||||
*/}}
|
||||
{{- define "cronjob.apiVersion" -}}
|
||||
{{- if semverCompare "< 1.8-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- print "batch/v2alpha1" }}
|
||||
{{- else if semverCompare ">=1.8-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- print "batch/v1beta1" }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for podsecuritypolicy.
|
||||
*/}}
|
||||
{{- define "podsecuritypolicy.apiVersion" -}}
|
||||
{{- if semverCompare "<1.10-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- print "extensions/v1beta1" -}}
|
||||
{{- else -}}
|
||||
{{- print "policy/v1beta1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "elasticsearch.curator.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}-curator
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "elasticsearch.curator.fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.curator.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "elasticsearch.curator.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "elasticsearch.curator.serviceAccountName" -}}
|
||||
{{- if .Values.curator.serviceAccount.create -}}
|
||||
{{ default (include "elasticsearch.curator.fullname" .) .Values.curator.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.curator.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper ES curator image name
|
||||
*/}}
|
||||
{{- define "elasticsearch.curator.image" -}}
|
||||
{{- $registryName := .Values.curator.image.registry -}}
|
||||
{{- $repositoryName := .Values.curator.image.repository -}}
|
||||
{{- $tag := .Values.curator.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Renders a value that contains template.
|
||||
Usage:
|
||||
{{ include "elasticsearch.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
|
||||
*/}}
|
||||
{{- define "elasticsearch.tplValue" -}}
|
||||
{{- if typeIs "string" .value }}
|
||||
{{- tpl .value .context }}
|
||||
{{- else }}
|
||||
{{- tpl (.value | toYaml) .context }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
{{- if .Values.config }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
data:
|
||||
elasticsearch.yml: |-
|
||||
{{ toYaml .Values.config | indent 4 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,11 @@
|
||||
{{- if .Values.curator.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.curator.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: curator
|
||||
data:
|
||||
action_file.yml: {{ required "A valid .Values.curator.configMaps.action_file_yml entry is required!" (toYaml .Values.curator.configMaps.action_file_yml | indent 2) }}
|
||||
config.yml: {{ required "A valid .Values.curator.configMaps.config_yml entry is required!" (tpl (toYaml .Values.curator.configMaps.config_yml | indent 2) $) }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,9 @@
|
||||
{{- if .Values.config }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
data:
|
||||
elasticsearch.yml: |- {{- toYaml .Values.config | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,28 @@
|
||||
{{- if .Values.sysctlImage.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.fullname" . }}-initcontainer
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
data:
|
||||
sysctl.sh: |-
|
||||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
if ! [ -x "$(command -v sysctl)" ]; then
|
||||
echo 'sysctl not installed. Installing it...'
|
||||
distro=$(awk -F= '/^ID=/{print $2}' /etc/os-release | tr -d '"')
|
||||
case $distro in
|
||||
ol | centos)
|
||||
yum install -y procps
|
||||
rm -rf /var/cache/yum;;
|
||||
ubuntu | debian)
|
||||
apt-get update -qq && apt-get install -y --no-install-recommends procps
|
||||
rm -rf /var/lib/apt/lists /var/cache/apt/archives;;
|
||||
esac
|
||||
fi
|
||||
sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536
|
||||
{{- end }}
|
||||
@@ -1,136 +1,131 @@
|
||||
apiVersion: apps/v1
|
||||
apiVersion: {{ template "deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.coordinating.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "coordinating-only"
|
||||
name: {{ include "elasticsearch.coordinating.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: coordinating-only
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: "{{ .Release.Name }}"
|
||||
role: "coordinating-only"
|
||||
matchLabels: {{- include "elasticsearch.matchLabels" . | nindent 6 }}
|
||||
role: coordinating-only
|
||||
replicas: {{ .Values.coordinating.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "coordinating-only"
|
||||
{{- with .Values.coordinating.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 8 }}
|
||||
role: coordinating-only
|
||||
{{- with .Values.coordinating.podAnnotations }}
|
||||
annotations: {{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
{{- include "elasticsearch.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.coordinating.affinity }}
|
||||
affinity: {{- include "elasticsearch.tplValue" (dict "value" .Values.coordinating.affinity "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.coordinating.nodeSelector }}
|
||||
nodeSelector: {{- include "elasticsearch.tplValue" (dict "value" .Values.coordinating.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.coordinating.tolerations }}
|
||||
tolerations: {{- include "elasticsearch.tplValue" (dict "value" .Values.coordinating.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.coordinating.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
fsGroup: {{ .Values.coordinating.securityContext.fsGroup }}
|
||||
{{- end }}
|
||||
affinity:
|
||||
{{- if eq .Values.coordinating.antiAffinity "hard" }}
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "coordinating-only"
|
||||
{{- else if eq .Values.coordinating.antiAffinity "soft" }}
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "coordinating-only"
|
||||
{{- end }}
|
||||
{{- if .Values.coordinating.nodeAffinity }}
|
||||
{{ toYaml .Values.coordinating.nodeAffinity | indent 8 }}
|
||||
{{- end }}
|
||||
{{- include "elasticsearch.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.sysctlImage.enabled }}
|
||||
## Image that performs the sysctl operation to modify Kernel settings (needed sometimes to avoid boot errors)
|
||||
initContainers:
|
||||
- name: sysctl
|
||||
image: {{ template "elasticsearch.sysctl.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
command: ['sh', '-c', 'install_packages procps && sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536']
|
||||
securityContext:
|
||||
privileged: true
|
||||
- name: sysctl
|
||||
image: {{ include "elasticsearch.sysctl.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /scripts/sysctl.sh
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: initcontainer-script
|
||||
mountPath: /scripts/sysctl.sh
|
||||
subPath: sysctl.sh
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: "elasticsearch"
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
image: {{ template "elasticsearch.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
env:
|
||||
- name: ELASTICSEARCH_CLUSTER_NAME
|
||||
value: {{ .Values.name | quote }}
|
||||
- name: ELASTICSEARCH_CLUSTER_HOSTS
|
||||
value: {{ template "elasticsearch.discovery.fullname" . }}
|
||||
{{- if .Values.plugins }}
|
||||
- name: ELASTICSEARCH_PLUGINS
|
||||
value: {{ .Values.plugins | quote }}
|
||||
{{- end }}
|
||||
- name: ELASTICSEARCH_HEAP_SIZE
|
||||
value: {{ .Values.coordinating.heapSize | quote }}
|
||||
- name: ELASTICSEARCH_IS_DEDICATED_NODE
|
||||
value: "yes"
|
||||
- name: ELASTICSEARCH_NODE_TYPE
|
||||
value: "coordinating"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9200
|
||||
- name: transport
|
||||
containerPort: 9300
|
||||
{{- if .Values.coordinating.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: {{ .Values.coordinating.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.coordinating.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.coordinating.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.coordinating.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.coordinating.livenessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: http
|
||||
{{- end }}
|
||||
{{- if .Values.coordinating.readinessProbe.enabled}}
|
||||
readinessProbe:
|
||||
initialDelaySeconds: {{ .Values.coordinating.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.coordinating.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.coordinating.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.coordinating.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.coordinating.readinessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: http
|
||||
{{- end }}
|
||||
resources:
|
||||
{{ toYaml .Values.coordinating.resources | indent 10 }}
|
||||
volumeMounts:
|
||||
{{- if .Values.config }}
|
||||
- mountPath: /opt/bitnami/elasticsearch/config/elasticsearch.yml
|
||||
name: "config"
|
||||
subPath: elasticsearch.yml
|
||||
{{- end }}
|
||||
- name: "data"
|
||||
mountPath: "/bitnami/elasticsearch/data/"
|
||||
- name: elasticsearch
|
||||
image: {{ include "elasticsearch.image" . }}
|
||||
{{- if .Values.coordinating.securityContext.enabled }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.coordinating.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: ELASTICSEARCH_CLUSTER_NAME
|
||||
value: {{ .Values.name | quote }}
|
||||
- name: ELASTICSEARCH_CLUSTER_HOSTS
|
||||
value: {{ template "elasticsearch.discovery.fullname" . }}
|
||||
{{- if .Values.plugins }}
|
||||
- name: ELASTICSEARCH_PLUGINS
|
||||
value: {{ .Values.plugins | quote }}
|
||||
{{- end }}
|
||||
- name: ELASTICSEARCH_HEAP_SIZE
|
||||
value: {{ .Values.coordinating.heapSize | quote }}
|
||||
- name: ELASTICSEARCH_IS_DEDICATED_NODE
|
||||
value: "yes"
|
||||
- name: ELASTICSEARCH_NODE_TYPE
|
||||
value: "coordinating"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9200
|
||||
- name: transport
|
||||
containerPort: 9300
|
||||
{{- if .Values.coordinating.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: {{ .Values.coordinating.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.coordinating.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.coordinating.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.coordinating.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.coordinating.livenessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: http
|
||||
{{- end }}
|
||||
{{- if .Values.coordinating.readinessProbe.enabled}}
|
||||
readinessProbe:
|
||||
initialDelaySeconds: {{ .Values.coordinating.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.coordinating.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.coordinating.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.coordinating.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.coordinating.readinessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: http
|
||||
{{- end }}
|
||||
{{- if .Values.coordinating.resources }}
|
||||
resources: {{- toYaml .Values.coordinating.resources | nindent 12 }}
|
||||
{{- end}}
|
||||
volumeMounts:
|
||||
{{- if .Values.config }}
|
||||
- mountPath: /opt/bitnami/elasticsearch/config/elasticsearch.yml
|
||||
name: config
|
||||
subPath: elasticsearch.yml
|
||||
{{- end }}
|
||||
- name: data
|
||||
mountPath: "/bitnami/elasticsearch/data/"
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.config }}
|
||||
- name: "config"
|
||||
configMap:
|
||||
name: {{ template "elasticsearch.fullname" . }}
|
||||
{{- end }}
|
||||
- name: "data"
|
||||
emptyDir: {}
|
||||
{{- if .Values.sysctlImage.enabled }}
|
||||
- name: initcontainer-script
|
||||
configMap:
|
||||
name: {{ include "elasticsearch.fullname" . }}-initcontainer
|
||||
defaultMode: 0755
|
||||
{{- end }}
|
||||
{{- if .Values.config }}
|
||||
- name: config
|
||||
configMap:
|
||||
name: {{ include "elasticsearch.fullname" . }}
|
||||
{{- end }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- if .Values.extraVolumes }}
|
||||
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,30 +1,23 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.coordinating.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . |}}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "coordinating-only"
|
||||
{{- with .Values.coordinating.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ include "elasticsearch.coordinating.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: coordinating-only
|
||||
annotations: {{ include "elasticsearch.tplValue" ( dict "value" .Values.coordinating.service.annotations "context" $) | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.coordinating.service.type | quote }}
|
||||
{{- if and (eq .Values.coordinating.service.type "LoadBalancer") .Values.coordinating.service.loadBalancerIP }}
|
||||
{{- if and (eq .Values.coordinating.service.type "LoadBalancer") (not (empty .Values.coordinating.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.coordinating.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.coordinating.service.port }}
|
||||
targetPort: http
|
||||
{{- if .Values.coordinating.service.nodePort }}
|
||||
nodePort: {{ .Values.coordinating.service.nodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "coordinating-only"
|
||||
- name: http
|
||||
port: {{ .Values.coordinating.service.port }}
|
||||
targetPort: http
|
||||
{{- if and (or (eq .Values.coordinating.service.type "NodePort") (eq .Values.coordinating.service.type "LoadBalancer")) (not (empty .Values.coordinating.service.nodePort)) }}
|
||||
nodePort: {{ .Values.coordinating.service.nodePort }}
|
||||
{{- else if eq .Values.coordinating.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
selector: {{- include "elasticsearch.matchLabels" . | nindent 4 }}
|
||||
role: coordinating-only
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
{{- if .Values.curator.enabled }}
|
||||
apiVersion: {{ template "cronjob.apiVersion" . }}
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.curator.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: curator
|
||||
{{- if .Values.curator.cronjob.annotations }}
|
||||
annotations: {{- toYaml .Values.curator.cronjob.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
schedule: "{{ .Values.curator.cronjob.schedule }}"
|
||||
{{- with .Values.curator.cronjob.concurrencyPolicy }}
|
||||
concurrencyPolicy: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.curator.cronjob.failedJobsHistoryLimit }}
|
||||
failedJobsHistoryLimit: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.curator.cronjob.successfulJobsHistoryLimit }}
|
||||
successfulJobsHistoryLimit: {{ . }}
|
||||
{{- end }}
|
||||
jobTemplate:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
{{- if .Values.curator.podAnnotations }}
|
||||
annotations: {{- toYaml .Values.curator.podAnnotations | nindent 12 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: {{ template "elasticsearch.curator.fullname" . }}
|
||||
{{- if .Values.curator.extraVolumes }}
|
||||
{{- toYaml .Values.curator.extraVolumes | nindent 12 }}
|
||||
{{- end }}
|
||||
restartPolicy: {{ .Values.curator.cronjob.jobRestartPolicy }}
|
||||
{{- if .Values.curator.priorityClassName }}
|
||||
priorityClassName: {{ .Values.curator.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- include "elasticsearch.imagePullSecrets" . | indent 10 }}
|
||||
{{- if .Values.curator.extraInitContainers }}
|
||||
initContainers:
|
||||
{{- range $key, $value := .Values.curator.extraInitContainers }}
|
||||
- name: "{{ $key }}"
|
||||
{{- toYaml $value | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.curator.rbac.enabled }}
|
||||
serviceAccountName: {{ include "elasticsearch.curator.serviceAccountName" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.curator.affinity }}
|
||||
affinity: {{- include "elasticsearch.tplValue" (dict "value" .Values.curator.affinity "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.curator.nodeSelector }}
|
||||
nodeSelector: {{- include "elasticsearch.tplValue" (dict "value" .Values.curator.nodeSelector "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.curator.tolerations }}
|
||||
tolerations: {{- include "elasticsearch.tplValue" (dict "value" .Values.curator.tolerations "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.curator.securityContext }}
|
||||
securityContext: {{- toYaml .Values.curator.securityContext | nindent 12 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "elasticsearch.curator.fullname" . }}
|
||||
image: {{ template "elasticsearch.curator.image" . }}
|
||||
imagePullPolicy: {{ .Values.curator.image.pullPolicy | quote }}
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/es-curator
|
||||
{{- if .Values.curator.extraVolumeMounts }}
|
||||
{{- toYaml .Values.curator.extraVolumeMounts | nindent 16 }}
|
||||
{{- end }}
|
||||
{{ if .Values.curator.command }}
|
||||
command: {{ toYaml .Values.curator.command | nindent 16 }}
|
||||
{{- end }}
|
||||
{{- if .Values.curator.dryrun }}
|
||||
args: [ "--dry-run", "--config", "/etc/es-curator/config.yml", "/etc/es-curator/action_file.yml" ]
|
||||
{{- else }}
|
||||
args: [ "--config", "/etc/es-curator/config.yml", "/etc/es-curator/action_file.yml" ]
|
||||
{{- end }}
|
||||
env:
|
||||
{{- if .Values.curator.env }}
|
||||
{{- range $key,$value := .Values.curator.env }}
|
||||
- name: {{ $key | upper | quote}}
|
||||
value: {{ $value | quote}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.curator.envFromSecrets }}
|
||||
{{- range $key,$value := .Values.curator.envFromSecrets }}
|
||||
- name: {{ $key | upper | quote}}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ $value.from.secret | quote}}
|
||||
key: {{ $value.from.key | quote}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.curator.resources }}
|
||||
resources: {{- toYaml .Values.curator.resources | nindent 16 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,13 +1,9 @@
|
||||
apiVersion: apps/v1
|
||||
apiVersion: {{ template "statefulset.apiVersion" . }}
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.data.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "data"
|
||||
name: {{ include "elasticsearch.data.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: data
|
||||
spec:
|
||||
updateStrategy:
|
||||
type: {{ .Values.data.updateStrategy.type }}
|
||||
@@ -18,156 +14,160 @@ spec:
|
||||
partition: {{ .Values.data.updateStrategy.rollingUpdatePartition }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "data"
|
||||
serviceName: "{{ template "elasticsearch.data.fullname" . }}"
|
||||
matchLabels: {{- include "elasticsearch.matchLabels" . | nindent 6 }}
|
||||
role: data
|
||||
serviceName: {{ include "elasticsearch.data.fullname" . }}
|
||||
replicas: {{ .Values.data.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "data"
|
||||
{{- with .Values.data.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 8 }}
|
||||
role: data
|
||||
{{- with .Values.data.podAnnotations }}
|
||||
annotations: {{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "elasticsearch.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
{{- include "elasticsearch.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.data.affinity }}
|
||||
affinity: {{- include "elasticsearch.tplValue" (dict "value" .Values.data.affinity "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.data.nodeSelector }}
|
||||
nodeSelector: {{- include "elasticsearch.tplValue" (dict "value" .Values.data.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.data.tolerations }}
|
||||
tolerations: {{- include "elasticsearch.tplValue" (dict "value" .Values.data.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.data.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
{{- end }}
|
||||
affinity:
|
||||
{{- if eq .Values.data.antiAffinity "hard" }}
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "data"
|
||||
{{- else if eq .Values.data.antiAffinity "soft" }}
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "data"
|
||||
{{- end }}
|
||||
{{- if .Values.data.nodeAffinity }}
|
||||
{{ toYaml .Values.data.nodeAffinity | indent 8 }}
|
||||
fsGroup: {{ .Values.data.securityContext.fsGroup }}
|
||||
{{- end }}
|
||||
{{- if or .Values.sysctlImage.enabled (and .Values.volumePermissions.enabled .Values.data.persistence.enabled) }}
|
||||
initContainers:
|
||||
{{- if .Values.sysctlImage.enabled }}
|
||||
## Image that performs the sysctl operation to modify Kernel settings (needed sometimes to avoid boot errors)
|
||||
- name: sysctl
|
||||
image: {{ template "elasticsearch.sysctl.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
command: ['sh', '-c', 'install_packages procps && sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536']
|
||||
securityContext:
|
||||
privileged: true
|
||||
{{- end }}
|
||||
{{- if and .Values.volumePermissions.enabled .Values.data.persistence.enabled }}
|
||||
- name: volume-permissions
|
||||
image: "{{ template "elasticsearch.volumePermissions.image" . }}"
|
||||
imagePullPolicy: {{ default "" .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/elasticsearch/data"]
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
resources: {{ toYaml .Values.volumePermissions.resources | nindent 10 }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: "/bitnami/elasticsearch/data"
|
||||
{{- if .Values.sysctlImage.enabled }}
|
||||
## Image that performs the sysctl operation to modify Kernel settings (needed sometimes to avoid boot errors)
|
||||
- name: sysctl
|
||||
image: {{ include "elasticsearch.sysctl.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /scripts/sysctl.sh
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: initcontainer-script
|
||||
mountPath: /scripts/sysctl.sh
|
||||
subPath: sysctl.sh
|
||||
{{- end }}
|
||||
{{- if and .Values.volumePermissions.enabled .Values.data.persistence.enabled }}
|
||||
- name: volume-permissions
|
||||
image: {{ include "elasticsearch.volumePermissions.image" . }}
|
||||
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
chown -R {{ .Values.data.securityContext.runAsUser }}:{{ .Values.data.securityContext.fsGroup }} //bitnami/elasticsearch/data
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
{{- if .Values.volumePermissions.resource }}
|
||||
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: "/bitnami/elasticsearch/data"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: "elasticsearch"
|
||||
image: {{ template "elasticsearch.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: ELASTICSEARCH_CLUSTER_NAME
|
||||
value: {{ .Values.name | quote }}
|
||||
- name: ELASTICSEARCH_CLUSTER_HOSTS
|
||||
value: {{ template "elasticsearch.discovery.fullname" . }}
|
||||
{{- if .Values.plugins }}
|
||||
- name: ELASTICSEARCH_PLUGINS
|
||||
value: {{ .Values.plugins | quote }}
|
||||
{{- end }}
|
||||
- name: ELASTICSEARCH_HEAP_SIZE
|
||||
value: {{ .Values.data.heapSize | quote }}
|
||||
- name: ELASTICSEARCH_IS_DEDICATED_NODE
|
||||
value: "yes"
|
||||
- name: ELASTICSEARCH_NODE_TYPE
|
||||
value: "data"
|
||||
ports:
|
||||
- name: transport
|
||||
containerPort: 9300
|
||||
{{- if .Values.data.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: {{ .Values.data.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.data.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.data.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.data.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.data.livenessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
{{- end }}
|
||||
{{- if .Values.data.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
initialDelaySeconds: {{ .Values.data.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.data.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.data.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.data.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.data.livenessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
{{- end }}
|
||||
resources:
|
||||
{{ toYaml .Values.data.resources | indent 10 }}
|
||||
volumeMounts:
|
||||
{{- if .Values.config }}
|
||||
- mountPath: /opt/bitnami/elasticsearch/config/elasticsearch.yml
|
||||
name: "config"
|
||||
subPath: elasticsearch.yml
|
||||
{{- end }}
|
||||
- name: "data"
|
||||
mountPath: "/bitnami/elasticsearch/data"
|
||||
- name: elasticsearch
|
||||
image: {{ include "elasticsearch.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.data.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.data.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: ELASTICSEARCH_CLUSTER_NAME
|
||||
value: {{ .Values.name | quote }}
|
||||
- name: ELASTICSEARCH_CLUSTER_HOSTS
|
||||
value: {{ template "elasticsearch.discovery.fullname" . }}
|
||||
{{- if .Values.plugins }}
|
||||
- name: ELASTICSEARCH_PLUGINS
|
||||
value: {{ .Values.plugins | quote }}
|
||||
{{- end }}
|
||||
- name: ELASTICSEARCH_HEAP_SIZE
|
||||
value: {{ .Values.data.heapSize | quote }}
|
||||
- name: ELASTICSEARCH_IS_DEDICATED_NODE
|
||||
value: "yes"
|
||||
- name: ELASTICSEARCH_NODE_TYPE
|
||||
value: "data"
|
||||
ports:
|
||||
- name: transport
|
||||
containerPort: 9300
|
||||
{{- if .Values.data.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: {{ .Values.data.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.data.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.data.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.data.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.data.livenessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
{{- end }}
|
||||
{{- if .Values.data.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
initialDelaySeconds: {{ .Values.data.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.data.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.data.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.data.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.data.livenessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
{{- end }}
|
||||
{{- if .Values.data.resources }}
|
||||
resources: {{- toYaml .Values.data.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Values.config }}
|
||||
- mountPath: /opt/bitnami/elasticsearch/config/elasticsearch.yml
|
||||
name: "config"
|
||||
subPath: elasticsearch.yml
|
||||
{{- end }}
|
||||
- name: "data"
|
||||
mountPath: "/bitnami/elasticsearch/data"
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.config }}
|
||||
- name: "config"
|
||||
configMap:
|
||||
name: {{ template "elasticsearch.fullname" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.data.persistence.enabled }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: "data"
|
||||
{{- if .Values.data.persistence.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.data.persistence.annotations | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{ toYaml .Values.data.persistence.accessModes | indent 8 }}
|
||||
{{ include "elasticsearch.data.storageClass" . }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.data.persistence.size | quote }}
|
||||
{{- if .Values.sysctlImage.enabled }}
|
||||
- name: initcontainer-script
|
||||
configMap:
|
||||
name: {{ include "elasticsearch.fullname" . }}-initcontainer
|
||||
defaultMode: 0755
|
||||
{{- end }}
|
||||
{{- if .Values.config }}
|
||||
- name: "config"
|
||||
configMap:
|
||||
name: {{ template "elasticsearch.fullname" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumes }}
|
||||
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.data.persistence.enabled }}
|
||||
- name: "data"
|
||||
emptyDir: {}
|
||||
{{- else }}
|
||||
- name: "data"
|
||||
emptyDir: {}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: "data"
|
||||
{{- if .Values.data.persistence.annotations }}
|
||||
annotations: {{- toYaml .Values.data.persistence.annotations | nindent 10 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes: {{- toYaml .Values.data.persistence.accessModes | nindent 10 }}
|
||||
{{ include "elasticsearch.data.storageClass" . }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.data.persistence.size | quote }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,23 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.discovery.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
|
||||
name: {{ template "elasticsearch.discovery.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . |}}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
- port: 9300
|
||||
name: transport
|
||||
targetPort: transport
|
||||
- port: 9300
|
||||
name: transport
|
||||
targetPort: transport
|
||||
publishNotReadyAddresses: true
|
||||
sessionAffinity: None
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
selector: {{- include "elasticsearch.matchLabels" . | nindent 4 }}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
{{- if .Values.curator.enabled }}
|
||||
{{- range $kind, $enabled := .Values.curator.hooks }}
|
||||
{{- if $enabled }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.curator.fullname" . }}-curator-on-{{ $kind }}
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "curator"
|
||||
annotations:
|
||||
"helm.sh/hook": post-{{ $kind }}
|
||||
"helm.sh/hook-weight": "1"
|
||||
{{- if $.Values.cronjob.annotations }}
|
||||
{{ toYaml $.Values.cronjob.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
{{- if $.Values.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml $.Values.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: {{ template "elasticsearch.curator.fullname" . }}
|
||||
{{- if $.Values.curator.extraVolumes }}
|
||||
{{ toYaml $.Values.curator.extraVolumes | indent 8 }}
|
||||
{{- end }}
|
||||
restartPolicy: Never
|
||||
{{- if $.Values.curator.priorityClassName }}
|
||||
priorityClassName: "{{ $.Values.curator.priorityClassName }}"
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "elasticsearch.curator.fullname" . }}
|
||||
image: {{ template "elasticsearch.curator.image" . }}
|
||||
imagePullPolicy: {{ .Values.curator.image.pullPolicy | quote }}
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/es-curator
|
||||
{{- if $.Values.curator.extraVolumeMounts }}
|
||||
{{ toYaml $.Values.curator.extraVolumeMounts | indent 12 }}
|
||||
{{- end }}
|
||||
command: [ "curator" ]
|
||||
args: [ "--config", "/etc/es-curator/config.yml", "/etc/es-curator/action_file.yml" ]
|
||||
resources:
|
||||
{{ toYaml $.Values.curator.resources | indent 12 }}
|
||||
{{- with $.Values.curator.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with $.Values.curator.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with $.Values.curator.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,139 +1,133 @@
|
||||
{{- if .Values.ingest.enabled }}
|
||||
apiVersion: apps/v1
|
||||
apiVersion: {{ template "deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.ingest.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "ingest"
|
||||
name: {{ include "elasticsearch.ingest.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: ingest
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: "{{ .Release.Name }}"
|
||||
role: "ingest"
|
||||
matchLabels: {{- include "elasticsearch.matchLabels" . | nindent 6 }}
|
||||
role: ingest
|
||||
replicas: {{ .Values.ingest.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "ingest"
|
||||
{{- with .Values.ingest.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 8 }}
|
||||
role: ingest
|
||||
{{- with .Values.ingest.podAnnotations }}
|
||||
annotations: {{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "elasticsearch.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
{{- include "elasticsearch.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.ingest.affinity }}
|
||||
affinity: {{- include "elasticsearch.tplValue" (dict "value" .Values.ingest.affinity "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingest.nodeSelector }}
|
||||
nodeSelector: {{- include "elasticsearch.tplValue" (dict "value" .Values.ingest.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingest.tolerations }}
|
||||
tolerations: {{- include "elasticsearch.tplValue" (dict "value" .Values.ingest.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingest.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
fsGroup: {{ .Values.ingest.securityContext.fsGroup }}
|
||||
{{- end }}
|
||||
affinity:
|
||||
{{- if eq .Values.ingest.antiAffinity "hard" }}
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "ingest"
|
||||
{{- else if eq .Values.ingest.antiAffinity "soft" }}
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "ingest"
|
||||
{{- end }}
|
||||
{{- if .Values.ingest.nodeAffinity }}
|
||||
{{ toYaml .Values.ingest.nodeAffinity | indent 8 }}
|
||||
{{- end }}
|
||||
{{- include "elasticsearch.imagePullSecrets" . | indent 6 }}
|
||||
{{- if .Values.sysctlImage.enabled }}
|
||||
## Image that performs the sysctl operation to modify Kernel settings (needed sometimes to avoid boot errors)
|
||||
initContainers:
|
||||
- name: sysctl
|
||||
image: {{ template "elasticsearch.sysctl.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
command: ['sh', '-c', 'install_packages procps && sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536']
|
||||
securityContext:
|
||||
privileged: true
|
||||
- name: sysctl
|
||||
image: {{ include "elasticsearch.sysctl.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /scripts/sysctl.sh
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: initcontainer-script
|
||||
mountPath: /scripts/sysctl.sh
|
||||
subPath: sysctl.sh
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: "elasticsearch"
|
||||
image: {{ template "elasticsearch.image" . }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
env:
|
||||
- name: ELASTICSEARCH_CLUSTER_NAME
|
||||
value: {{ .Values.name | quote }}
|
||||
- name: ELASTICSEARCH_CLUSTER_HOSTS
|
||||
value: {{ template "elasticsearch.discovery.fullname" . }}
|
||||
{{- if .Values.plugins }}
|
||||
- name: ELASTICSEARCH_PLUGINS
|
||||
value: {{ .Values.plugins | quote }}
|
||||
{{- end }}
|
||||
- name: ELASTICSEARCH_HEAP_SIZE
|
||||
value: {{ .Values.ingest.heapSize | quote }}
|
||||
- name: ELASTICSEARCH_IS_DEDICATED_NODE
|
||||
value: "yes"
|
||||
- name: ELASTICSEARCH_NODE_TYPE
|
||||
value: "ingest"
|
||||
ports:
|
||||
- name: transport
|
||||
containerPort: 9300
|
||||
{{- if .Values.ingest.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: {{ .Values.ingest.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.ingest.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.ingest.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.ingest.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.ingest.livenessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
initialDelaySeconds: 90
|
||||
{{- end }}
|
||||
{{- if .Values.ingest.readinessProbe.enabled}}
|
||||
readinessProbe:
|
||||
initialDelaySeconds: {{ .Values.ingest.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.ingest.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.ingest.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.ingest.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.ingest.readinessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
initialDelaySeconds: 5
|
||||
{{- end}}
|
||||
resources:
|
||||
{{ toYaml .Values.ingest.resources | indent 10 }}
|
||||
volumeMounts:
|
||||
{{- if .Values.config }}
|
||||
- mountPath: /opt/bitnami/elasticsearch/config/elasticsearch.yml
|
||||
name: "config"
|
||||
subPath: elasticsearch.yml
|
||||
{{- end }}
|
||||
- name: "data"
|
||||
mountPath: "/bitnami/elasticsearch/data/"
|
||||
- name: elasticsearch
|
||||
image: {{ include "elasticsearch.image" . }}
|
||||
{{- if .Values.ingest.securityContext.enabled }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.ingest.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: ELASTICSEARCH_CLUSTER_NAME
|
||||
value: {{ .Values.name | quote }}
|
||||
- name: ELASTICSEARCH_CLUSTER_HOSTS
|
||||
value: {{ template "elasticsearch.discovery.fullname" . }}
|
||||
{{- if .Values.plugins }}
|
||||
- name: ELASTICSEARCH_PLUGINS
|
||||
value: {{ .Values.plugins | quote }}
|
||||
{{- end }}
|
||||
- name: ELASTICSEARCH_HEAP_SIZE
|
||||
value: {{ .Values.ingest.heapSize | quote }}
|
||||
- name: ELASTICSEARCH_IS_DEDICATED_NODE
|
||||
value: "yes"
|
||||
- name: ELASTICSEARCH_NODE_TYPE
|
||||
value: "ingest"
|
||||
ports:
|
||||
- name: transport
|
||||
containerPort: 9300
|
||||
{{- if .Values.ingest.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: {{ .Values.ingest.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.ingest.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.ingest.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.ingest.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.ingest.livenessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
initialDelaySeconds: 90
|
||||
{{- end }}
|
||||
{{- if .Values.ingest.readinessProbe.enabled}}
|
||||
readinessProbe:
|
||||
initialDelaySeconds: {{ .Values.ingest.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.ingest.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.ingest.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.ingest.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.ingest.readinessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
initialDelaySeconds: 5
|
||||
{{- end}}
|
||||
{{- if .Values.ingest.resources }}
|
||||
resources: {{- toYaml .Values.ingest.resources | nindent 12 }}
|
||||
{{- end}}
|
||||
volumeMounts:
|
||||
{{- if .Values.config }}
|
||||
- mountPath: /opt/bitnami/elasticsearch/config/elasticsearch.yml
|
||||
name: "config"
|
||||
subPath: elasticsearch.yml
|
||||
{{- end }}
|
||||
- name: "data"
|
||||
mountPath: "/bitnami/elasticsearch/data/"
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.config }}
|
||||
- name: "config"
|
||||
configMap:
|
||||
name: {{ template "elasticsearch.fullname" . }}
|
||||
{{- end }}
|
||||
- name: "data"
|
||||
emptyDir: {}
|
||||
{{- if .Values.sysctlImage.enabled }}
|
||||
- name: initcontainer-script
|
||||
configMap:
|
||||
name: {{ include "elasticsearch.fullname" . }}-initcontainer
|
||||
defaultMode: 0755
|
||||
{{- end }}
|
||||
{{- if .Values.config }}
|
||||
- name: config
|
||||
configMap:
|
||||
name: {{ include "elasticsearch.fullname" . }}
|
||||
{{- end }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- if .Values.extraVolumes }}
|
||||
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,31 +2,24 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.ingest.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "ingest"
|
||||
{{- with .Values.ingest.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ include "elasticsearch.ingest.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: ingest
|
||||
annotations: {{ include "elasticsearch.tplValue" ( dict "value" .Values.ingest.service.annotations "context" $) | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.ingest.service.type | quote }}
|
||||
{{- if and (eq .Values.ingest.service.type "LoadBalancer") .Values.ingest.service.loadBalancerIP }}
|
||||
{{- if and (eq .Values.ingest.service.type "LoadBalancer") (not (empty .Values.ingest.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.ingest.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: transport
|
||||
port: {{ .Values.ingest.service.port }}
|
||||
targetPort: transport
|
||||
{{- if .Values.ingest.service.nodePort }}
|
||||
nodePort: {{ .Values.ingest.service.nodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "ingest"
|
||||
- name: transport
|
||||
port: {{ .Values.ingest.service.port }}
|
||||
targetPort: transport
|
||||
{{- if and (or (eq .Values.ingest.service.type "NodePort") (eq .Values.ingest.service.type "LoadBalancer")) (not (empty .Values.ingest.service.nodePort)) }}
|
||||
nodePort: {{ .Values.ingest.service.nodePort }}
|
||||
{{- else if eq .Values.ingest.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
selector: {{- include "elasticsearch.matchLabels" . | nindent 4 }}
|
||||
role: ingest
|
||||
{{- end }}
|
||||
|
||||
@@ -1,140 +1,171 @@
|
||||
apiVersion: apps/v1
|
||||
apiVersion: {{ template "statefulset.apiVersion" . }}
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.master.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "master"
|
||||
name: {{ include "elasticsearch.master.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: master
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "master"
|
||||
matchLabels: {{- include "elasticsearch.matchLabels" . | nindent 6 }}
|
||||
role: master
|
||||
serviceName: {{ template "elasticsearch.master.fullname" . }}
|
||||
replicas: {{ .Values.master.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "master"
|
||||
{{- with .Values.master.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 8 }}
|
||||
role: master
|
||||
{{- with .Values.master.podAnnotations }}
|
||||
annotations: {{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "elasticsearch.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
{{- include "elasticsearch.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.master.affinity }}
|
||||
affinity: {{- include "elasticsearch.tplValue" (dict "value" .Values.master.affinity "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.master.nodeSelector }}
|
||||
nodeSelector: {{- include "elasticsearch.tplValue" (dict "value" .Values.master.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.master.tolerations }}
|
||||
tolerations: {{- include "elasticsearch.tplValue" (dict "value" .Values.master.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.master.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
fsGroup: {{ .Values.master.securityContext.fsGroup }}
|
||||
{{- end }}
|
||||
affinity:
|
||||
{{- if eq .Values.master.antiAffinity "hard" }}
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "master"
|
||||
{{- else if eq .Values.master.antiAffinity "soft" }}
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "master"
|
||||
{{- end }}
|
||||
{{- if .Values.master.nodeAffinity }}
|
||||
{{ toYaml .Values.master.nodeAffinity | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.sysctlImage.enabled }}
|
||||
## Image that performs the sysctl operation to modify Kernel settings (needed sometimes to avoid boot errors)
|
||||
{{- if or .Values.sysctlImage.enabled (and .Values.volumePermissions.enabled .Values.master.persistence.enabled) }}
|
||||
initContainers:
|
||||
- name: sysctl
|
||||
image: {{ template "elasticsearch.sysctl.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
command: ['sh', '-c', 'install_packages procps && sysctl -w vm.max_map_count=262144 && sysctl -w fs.file-max=65536']
|
||||
securityContext:
|
||||
privileged: true
|
||||
{{- if .Values.sysctlImage.enabled }}
|
||||
## Image that performs the sysctl operation to modify Kernel settings (needed sometimes to avoid boot errors)
|
||||
- name: sysctl
|
||||
image: {{ include "elasticsearch.sysctl.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /scripts/sysctl.sh
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: initcontainer-script
|
||||
mountPath: /scripts/sysctl.sh
|
||||
subPath: sysctl.sh
|
||||
{{- end }}
|
||||
{{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }}
|
||||
- name: volume-permissions
|
||||
image: {{ include "elasticsearch.volumePermissions.image" . }}
|
||||
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
chown -R {{ .Values.master.securityContext.runAsUser }}:{{ .Values.master.securityContext.fsGroup }} //bitnami/elasticsearch/data
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
{{- if .Values.volumePermissions.resource }}
|
||||
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: "/bitnami/elasticsearch/data"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: "elasticsearch"
|
||||
image: {{ template "elasticsearch.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: ELASTICSEARCH_CLUSTER_NAME
|
||||
value: {{ .Values.name | quote }}
|
||||
- name: ELASTICSEARCH_CLUSTER_HOSTS
|
||||
value: {{ template "elasticsearch.discovery.fullname" . }}
|
||||
- name: ELASTICSEARCH_CLUSTER_MASTER_HOSTS
|
||||
{{- $elasticsearchMasterFullname := include "elasticsearch.master.fullname" . }}
|
||||
{{- $replicas := int .Values.master.replicas }}
|
||||
value: {{range $i, $e := until $replicas }}{{ $elasticsearchMasterFullname }}-{{ $e }} {{ end }}
|
||||
{{- if .Values.plugins }}
|
||||
- name: ELASTICSEARCH_PLUGINS
|
||||
value: {{ .Values.plugins | quote }}
|
||||
{{- end }}
|
||||
- name: ELASTICSEARCH_HEAP_SIZE
|
||||
value: {{ .Values.master.heapSize | quote }}
|
||||
- name: ELASTICSEARCH_IS_DEDICATED_NODE
|
||||
value: "yes"
|
||||
- name: ELASTICSEARCH_NODE_TYPE
|
||||
value: "master"
|
||||
ports:
|
||||
- name: transport
|
||||
containerPort: 9300
|
||||
{{- if .Values.master.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.master.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
{{- end }}
|
||||
{{- if .Values.master.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.master.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
{{- end }}
|
||||
resources:
|
||||
{{ toYaml .Values.master.resources | indent 10 }}
|
||||
volumeMounts:
|
||||
{{- if .Values.config }}
|
||||
- mountPath: /opt/bitnami/elasticsearch/config/elasticsearch.yml
|
||||
name: "config"
|
||||
subPath: elasticsearch.yml
|
||||
{{- end }}
|
||||
- name: "data"
|
||||
mountPath: "/bitnami/elasticsearch/data"
|
||||
- name: elasticsearch
|
||||
image: {{ include "elasticsearch.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.master.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.master.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: ELASTICSEARCH_CLUSTER_NAME
|
||||
value: {{ .Values.name | quote }}
|
||||
- name: ELASTICSEARCH_CLUSTER_HOSTS
|
||||
value: {{ template "elasticsearch.discovery.fullname" . }}
|
||||
- name: ELASTICSEARCH_CLUSTER_MASTER_HOSTS
|
||||
{{- $elasticsearchMasterFullname := include "elasticsearch.master.fullname" . }}
|
||||
{{- $replicas := int .Values.master.replicas }}
|
||||
value: {{range $i, $e := until $replicas }}{{ $elasticsearchMasterFullname }}-{{ $e }} {{ end }}
|
||||
- name: ELASTICSEARCH_MINIMUM_MASTER_NODES
|
||||
value: {{ add (div .Values.master.replicas 2) 1 | quote }}
|
||||
{{- if .Values.plugins }}
|
||||
- name: ELASTICSEARCH_PLUGINS
|
||||
value: {{ .Values.plugins | quote }}
|
||||
{{- end }}
|
||||
- name: ELASTICSEARCH_HEAP_SIZE
|
||||
value: {{ .Values.master.heapSize | quote }}
|
||||
- name: ELASTICSEARCH_IS_DEDICATED_NODE
|
||||
value: "yes"
|
||||
- name: ELASTICSEARCH_NODE_TYPE
|
||||
value: "master"
|
||||
ports:
|
||||
- name: transport
|
||||
containerPort: 9300
|
||||
{{- if .Values.master.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.master.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
{{- end }}
|
||||
{{- if .Values.master.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.master.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }}
|
||||
httpGet:
|
||||
path: /_cluster/health?local=true
|
||||
port: 9200
|
||||
{{- end }}
|
||||
{{- if .Values.master.resources }}
|
||||
resources: {{- toYaml .Values.master.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Values.config }}
|
||||
- mountPath: /opt/bitnami/elasticsearch/config/elasticsearch.yml
|
||||
name: config
|
||||
subPath: elasticsearch.yml
|
||||
{{- end }}
|
||||
- name: data
|
||||
mountPath: /bitnami/elasticsearch/data
|
||||
{{- if .Values.extraVolumeMounts }}
|
||||
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.config }}
|
||||
- name: "config"
|
||||
configMap:
|
||||
name: {{ template "elasticsearch.fullname" . }}
|
||||
{{- end }}
|
||||
- name: "data"
|
||||
emptyDir: {}
|
||||
{{- if .Values.sysctlImage.enabled }}
|
||||
- name: initcontainer-script
|
||||
configMap:
|
||||
name: {{ include "elasticsearch.fullname" . }}-initcontainer
|
||||
defaultMode: 0755
|
||||
{{- end }}
|
||||
{{- if .Values.config }}
|
||||
- name: config
|
||||
configMap:
|
||||
name: {{ include "elasticsearch.fullname" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumes }}
|
||||
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.master.persistence.enabled }}
|
||||
- name: "data"
|
||||
emptyDir: {}
|
||||
{{- else }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: "data"
|
||||
{{- if .Values.master.persistence.annotations }}
|
||||
annotations: {{- toYaml .Values.master.persistence.annotations | nindent 10 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes: {{- toYaml .Values.master.persistence.accessModes | nindent 10 }}
|
||||
{{ include "elasticsearch.data.storageClass" . }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.master.persistence.size | quote }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,30 +1,23 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.master.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "master"
|
||||
{{- with .Values.master.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ include "elasticsearch.master.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: master
|
||||
annotations: {{ include "elasticsearch.tplValue" ( dict "value" .Values.master.service.annotations "context" $) | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.master.service.type | quote }}
|
||||
{{- if and (eq .Values.master.service.type "LoadBalancer") .Values.master.service.loadBalancerIP }}
|
||||
{{- if and (eq .Values.master.service.type "LoadBalancer") (not (empty .Values.master.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.master.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: transport
|
||||
port: {{ .Values.master.service.port }}
|
||||
targetPort: transport
|
||||
{{- if .Values.master.service.nodePort }}
|
||||
nodePort: {{ .Values.master.service.nodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "master"
|
||||
- name: transport
|
||||
port: {{ .Values.master.service.port }}
|
||||
targetPort: transport
|
||||
{{- if and (or (eq .Values.master.service.type "NodePort") (eq .Values.master.service.type "LoadBalancer")) (not (empty .Values.master.service.nodePort)) }}
|
||||
nodePort: {{ .Values.master.service.nodePort }}
|
||||
{{- else if eq .Values.master.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
selector: {{- include "elasticsearch.matchLabels" . | nindent 4 }}
|
||||
role: master
|
||||
|
||||
@@ -1,54 +1,47 @@
|
||||
{{- if .Values.metrics.enabled }}
|
||||
apiVersion: apps/v1
|
||||
apiVersion: {{ template "deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.metrics.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "metrics"
|
||||
name: {{ include "elasticsearch.metrics.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: metrics
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: "{{ .Release.Name }}"
|
||||
role: "metrics"
|
||||
matchLabels: {{- include "elasticsearch.matchLabels" . | nindent 6 }}
|
||||
role: metrics
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
role: "metrics"
|
||||
{{- with .Values.metrics.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 8 }}
|
||||
role: metrics
|
||||
{{- with .Values.metrics.podAnnotations }}
|
||||
annotations: {{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "elasticsearch.imagePullSecrets" . | indent 6 }}
|
||||
containers:
|
||||
- name: {{ template "elasticsearch.metrics.fullname" . }}
|
||||
image: {{ template "elasticsearch.metrics.image" . }}
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
args: [ "--es.uri=http://{{ template "elasticsearch.coordinating.fullname" . }}:{{ .Values.coordinating.service.port }}", "--es.all" ]
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9114
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 1
|
||||
resources:
|
||||
{{ toYaml .Values.metrics.resources | indent 10 }}
|
||||
image: {{ include "elasticsearch.metrics.image" . }}
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
args:
|
||||
- --es.uri=http://{{ template "elasticsearch.coordinating.fullname" . }}:{{ .Values.coordinating.service.port }}
|
||||
- --es.all
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9114
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 1
|
||||
{{- if .Values.metrics.resources }}
|
||||
resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,23 +2,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.metrics.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "metrics"
|
||||
annotations:
|
||||
{{ toYaml .Values.metrics.annotations | indent 4 }}
|
||||
name: {{ include "elasticsearch.metrics.fullname" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: metrics
|
||||
annotations: {{ include "elasticsearch.tplValue" ( dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.metrics.service.type | quote }}
|
||||
type: {{ .Values.metrics.service.type }}
|
||||
ports:
|
||||
- name: metrics
|
||||
port: 9114
|
||||
targetPort: metrics
|
||||
selector:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "metrics"
|
||||
- name: metrics
|
||||
port: 9114
|
||||
targetPort: metrics
|
||||
selector: {{- include "elasticsearch.matchLabels" . | nindent 4 }}
|
||||
role: metrics
|
||||
{{- end }}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
{{- if and .Values.curator.enabled .Values.curator.psp.create }}
|
||||
apiVersion: {{ include "podsecuritypolicy.apiVersion" . }}
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.curator.name" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: curator
|
||||
spec:
|
||||
privileged: true
|
||||
#requiredDropCapabilities:
|
||||
volumes:
|
||||
- 'configMap'
|
||||
- 'secret'
|
||||
hostNetwork: false
|
||||
hostIPC: false
|
||||
hostPID: false
|
||||
runAsUser:
|
||||
# Require the container to run without root privileges.
|
||||
rule: 'MustRunAsNonRoot'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
supplementalGroups:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
- min: 1
|
||||
max: 65535
|
||||
fsGroup:
|
||||
rule: 'MustRunAs'
|
||||
ranges:
|
||||
- min: 1
|
||||
max: 65535
|
||||
readOnlyRootFilesystem: false
|
||||
{{- end }}
|
||||
@@ -0,0 +1,20 @@
|
||||
{{- if and .Values.curator.enabled .Values.curator.rbac.enabled }}
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.curator.name" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: curator
|
||||
component: elasticsearch-curator-configmap
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps"]
|
||||
verbs: ["update", "patch"]
|
||||
{{- if .Values.curator.psp.create }}
|
||||
- apiGroups: ["extensions"]
|
||||
resources: ["podsecuritypolicies"]
|
||||
verbs: ["use"]
|
||||
resourceNames:
|
||||
- {{ include "elasticsearch.curator.fullname" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,17 @@
|
||||
{{- if and .Values.curator.enabled .Values.curator.rbac.enabled }}
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.curator.name" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: curator
|
||||
component: elasticsearch-curator-configmap
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: {{ template "elasticsearch.curator.name" . }}
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "elasticsearch.curator.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,8 @@
|
||||
{{- if and .Values.curator.enabled .Values.curator.serviceAccount.create .Values.curator.rbac.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "elasticsearch.curator.serviceAccountName" . }}
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: curator
|
||||
{{- end }}
|
||||
@@ -2,34 +2,28 @@
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ template "elasticsearch.metrics.fullname" . }}
|
||||
name: {{ include "elasticsearch.metrics.fullname" . }}
|
||||
{{- if .Values.metrics.serviceMonitor.namespace }}
|
||||
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
chart: {{ template "elasticsearch.chart" . }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "metrics"
|
||||
labels: {{- include "elasticsearch.labels" . | nindent 4 }}
|
||||
role: metrics
|
||||
{{- range $key, $value := .Values.metrics.serviceMonitor.selector }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "elasticsearch.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
role: "metrics"
|
||||
matchLabels: {{- include "elasticsearch.matchLabels" . | nindent 6 }}
|
||||
role: metrics
|
||||
endpoints:
|
||||
- port: metrics
|
||||
{{- if .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
- port: metrics
|
||||
{{- if .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
- {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,11 +2,16 @@
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
|
||||
##
|
||||
# global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
## Coordinating name to be used in the Kibana subchart (service name)
|
||||
##
|
||||
coordinating:
|
||||
name: coordinating-only
|
||||
kibanaEnabled: true
|
||||
|
||||
## Bitnami Elasticsearch image version
|
||||
## ref: https://hub.docker.com/r/bitnami/elasticsearch/tags/
|
||||
@@ -14,7 +19,7 @@
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/elasticsearch
|
||||
tag: 7.4.1-debian-9-r0
|
||||
tag: 7.5.0-debian-9-r0
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -26,8 +31,21 @@ image:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
##
|
||||
debug: false
|
||||
|
||||
## Image that performs the sysctl operation
|
||||
## String to partially override elasticsearch.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override elasticsearch.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
|
||||
## Bitnami Minideb image version
|
||||
## ref: https://hub.docker.com/r/bitnami/minideb/tags/
|
||||
##
|
||||
sysctlImage:
|
||||
enabled: false
|
||||
@@ -62,20 +80,34 @@ volumePermissions:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Init container' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## String to partially override elasticsearch.fullname template (will maintain the release name)
|
||||
## Cluster domain
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override elasticsearch.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
clusterDomain: cluster.local
|
||||
|
||||
## Elasticsearch cluster name
|
||||
##
|
||||
name: elastic
|
||||
|
||||
## Elasticsearch discovery node parameters
|
||||
##
|
||||
discovery:
|
||||
name: discovery
|
||||
|
||||
## Comma, semi-colon or space separated list of plugins to install at initialization
|
||||
## ref: https://github.com/bitnami/bitnami-docker-elasticsearch#environment-variables
|
||||
##
|
||||
@@ -86,43 +118,173 @@ name: elastic
|
||||
##
|
||||
# config:
|
||||
|
||||
## extraVolumes and extraVolumeMounts allows you to mount other volumes
|
||||
## Example Use Case: mount ssl certificates when elasticsearch has tls enabled
|
||||
# extraVolumes:
|
||||
# - name: es-certs
|
||||
# secret:
|
||||
# defaultMode: 420
|
||||
# secretName: es-certs
|
||||
# extraVolumeMounts:
|
||||
# - name: es-certs
|
||||
# mountPath: /certs
|
||||
# readOnly: true
|
||||
|
||||
## Elasticsearch master-eligible node parameters
|
||||
##
|
||||
master:
|
||||
name: master
|
||||
## Number of master-eligible node(s) replicas to deploy
|
||||
##
|
||||
replicas: 3
|
||||
heapSize: 128m
|
||||
antiAffinity: "soft"
|
||||
## Node Affinity
|
||||
# nodeAffinity:
|
||||
## Provide annotations for master-eligible pods.
|
||||
##
|
||||
podAnnotations: {}
|
||||
## Pod Security Context for master-eligible pods.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
## Affinity for pod assignment.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
## Elasticsearch master-eligible container's resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
## We usually recommend not to specify default resources and to leave this as a conscious
|
||||
## choice for the user. This also increases chances charts run on environments with little
|
||||
## resources, such as Minikube.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: 256Mi
|
||||
## Elasticsearch master-eligible container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
## If true, use a Persistent Volume Claim, If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
## Persistent Volume Claim annotations
|
||||
##
|
||||
annotations: {}
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
|
||||
## Service parameters for master-eligible node(s)
|
||||
##
|
||||
service:
|
||||
## master-eligible service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Elasticsearch transport port
|
||||
##
|
||||
port: 9300
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
## Provide annotations for the master pods.
|
||||
## Elasticsearch coordinating-only node parameters
|
||||
##
|
||||
coordinating:
|
||||
## Number of coordinating-only node(s) replicas to deploy
|
||||
##
|
||||
replicas: 2
|
||||
heapSize: 128m
|
||||
## Provide annotations for the coordinating-only pods.
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
## Configure resource requests and limits
|
||||
## Pod Security Context for coordinating-only pods.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
## Affinity for pod assignment.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
## Elasticsearch coordinating-only container's resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
## We usually recommend not to specify default resources and to leave this as a conscious
|
||||
## choice for the user. This also increases chances charts run on environments with little
|
||||
## resources, such as Minikube.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: "256Mi"
|
||||
## Elasticsearch master-eligible Liveness Probe
|
||||
memory: 256Mi
|
||||
## Elasticsearch coordinating-only container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 90
|
||||
@@ -130,7 +292,6 @@ master:
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
## Elasticsearch master-eligible Readiness Probe
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 90
|
||||
@@ -138,100 +299,81 @@ master:
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
|
||||
## Elasticsearch discovery node parameters
|
||||
##
|
||||
discovery:
|
||||
name: discovery
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
# Cluster domain
|
||||
clusterDomain: cluster.local
|
||||
|
||||
## Elasticsearch coordinating-only node parameters
|
||||
##
|
||||
coordinating:
|
||||
name: coordinating-only
|
||||
replicas: 2
|
||||
heapSize: 128m
|
||||
antiAffinity: "soft"
|
||||
## node affinity
|
||||
# nodeAffinity:
|
||||
## Service parameters for coordinating-only node(s)
|
||||
##
|
||||
service:
|
||||
## coordinating-only service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Elasticsearch REST API port
|
||||
## Elasticsearch tREST API port
|
||||
##
|
||||
port: 9200
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
## Provide annotations for the coordinating pods.
|
||||
podAnnotations: {}
|
||||
|
||||
## Configure resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: "256Mi"
|
||||
## Elasticsearch master-eligible Liveness Probe
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
## Elasticsearch master-eligible Readiness Probe
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
|
||||
## Elasticsearch data node parameters
|
||||
##
|
||||
data:
|
||||
name: data
|
||||
## Number of data node(s) replicas to deploy
|
||||
##
|
||||
replicas: 3
|
||||
## updateStrategy for ElasticSearch Data statefulset
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
##
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
# rollingUpdatePartition
|
||||
heapSize: 1024m
|
||||
antiAffinity: "soft"
|
||||
## node affinity
|
||||
# nodeAffinity:
|
||||
heapSize: 128m
|
||||
## Provide annotations for the data pods.
|
||||
##
|
||||
podAnnotations: {}
|
||||
## Configure resource requests and limits
|
||||
## Pod Security Context for data pods.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
## Affinity for pod assignment.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
## Elasticsearch data container's resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
## We usually recommend not to specify default resources and to leave this as a conscious
|
||||
## choice for the user. This also increases chances charts run on environments with little
|
||||
## resources, such as Minikube.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: "1152Mi"
|
||||
## Elasticsearch master-eligible Liveness Probe
|
||||
memory: 1152Mi
|
||||
## Elasticsearch data container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 90
|
||||
@@ -239,7 +381,6 @@ data:
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
## Elasticsearch master-eligible Readiness Probe
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 90
|
||||
@@ -254,11 +395,6 @@ data:
|
||||
## If true, use a Persistent Volume Claim, If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
|
||||
## Persistent Volume Claim annotations
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
@@ -267,11 +403,13 @@ data:
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
|
||||
## Persistent Volume Claim annotations
|
||||
##
|
||||
annotations: {}
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
@@ -281,39 +419,48 @@ data:
|
||||
ingest:
|
||||
enabled: true
|
||||
name: ingest
|
||||
## Number of ingest node(s) replicas to deploy
|
||||
##
|
||||
replicas: 2
|
||||
heapSize: 128m
|
||||
antiAffinity: "soft"
|
||||
## node affinity
|
||||
# nodeAffinity:
|
||||
service:
|
||||
## ingest service type
|
||||
type: ClusterIP
|
||||
## Elasticsearch transport port
|
||||
port: 9300
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
# loadBalancerIP:
|
||||
|
||||
## Provide annotations for the ingest pods.
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
## Configure resource requests and limits
|
||||
## Pod Security Context for ingest pods.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
## Affinity for pod assignment.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
## Elasticsearch ingest container's resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
## We usually recommend not to specify default resources and to leave this as a conscious
|
||||
## choice for the user. This also increases chances charts run on environments with little
|
||||
## resources, such as Minikube.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: "256Mi"
|
||||
## Elasticsearch master-eligible Liveness Probe
|
||||
memory: 256Mi
|
||||
## Elasticsearch ingest container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 90
|
||||
@@ -321,7 +468,6 @@ ingest:
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
## Elasticsearch master-eligible Readiness Probe
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 90
|
||||
@@ -329,14 +475,38 @@ ingest:
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
## Service parameters for ingest node(s)
|
||||
##
|
||||
service:
|
||||
## ingest service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Elasticsearch transport port
|
||||
##
|
||||
port: 9300
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
name: metrics
|
||||
## Elasticsearch curator parameters
|
||||
##
|
||||
curator:
|
||||
enabled: false
|
||||
name: curator
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/elasticsearch-exporter
|
||||
tag: 1.1.0-debian-9-r61
|
||||
repository: bitnami/elasticsearch-curator
|
||||
tag: 5.8.1-debian-9-r37
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
@@ -344,16 +514,202 @@ metrics:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
## Provide annotations for the metrics pods.
|
||||
|
||||
cronjob:
|
||||
# At 01:00 every day
|
||||
schedule: "0 1 * * *"
|
||||
annotations: {}
|
||||
concurrencyPolicy: ""
|
||||
failedJobsHistoryLimit: ""
|
||||
successfulJobsHistoryLimit: ""
|
||||
jobRestartPolicy: Never
|
||||
|
||||
podAnnotations: {}
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9114"
|
||||
|
||||
rbac:
|
||||
# Specifies whether RBAC should be enabled
|
||||
enabled: false
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a ServiceAccount should be created
|
||||
create: true
|
||||
# The name of the ServiceAccount to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name:
|
||||
|
||||
psp:
|
||||
# Specifies whether a podsecuritypolicy should be created
|
||||
create: false
|
||||
|
||||
hooks:
|
||||
install: false
|
||||
upgrade: false
|
||||
|
||||
# run curator in dry-run mode
|
||||
dryrun: false
|
||||
|
||||
command: ["curator"]
|
||||
env: {}
|
||||
|
||||
configMaps:
|
||||
# Delete indices older than 90 days
|
||||
action_file_yml: |-
|
||||
---
|
||||
actions:
|
||||
1:
|
||||
action: delete_indices
|
||||
description: "Clean up ES by deleting old indices"
|
||||
options:
|
||||
timeout_override:
|
||||
continue_if_exception: False
|
||||
disable_action: False
|
||||
ignore_empty_list: True
|
||||
filters:
|
||||
- filtertype: age
|
||||
source: name
|
||||
direction: older
|
||||
timestring: '%Y.%m.%d'
|
||||
unit: days
|
||||
unit_count: 90
|
||||
field:
|
||||
stats_result:
|
||||
epoch:
|
||||
exclude: False
|
||||
# Default config (this value is evaluated as a template)
|
||||
config_yml: |-
|
||||
---
|
||||
client:
|
||||
hosts:
|
||||
- {{ template "elasticsearch.coordinating.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
|
||||
port: {{ .Values.coordinating.service.port }}
|
||||
# url_prefix:
|
||||
# use_ssl: True
|
||||
# certificate:
|
||||
# client_cert:
|
||||
# client_key:
|
||||
# ssl_no_validate: True
|
||||
# http_auth:
|
||||
# timeout: 30
|
||||
# master_only: False
|
||||
# logging:
|
||||
# loglevel: INFO
|
||||
# logfile:
|
||||
# logformat: default
|
||||
# blacklist: ['elasticsearch', 'urllib3']
|
||||
|
||||
## Curator resources requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
priorityClassName: ""
|
||||
|
||||
# extraVolumes and extraVolumeMounts allows you to mount other volumes
|
||||
# Example Use Case: mount ssl certificates when elasticsearch has tls enabled
|
||||
# extraVolumes:
|
||||
# - name: es-certs
|
||||
# secret:
|
||||
# defaultMode: 420
|
||||
# secretName: es-certs
|
||||
# extraVolumeMounts:
|
||||
# - name: es-certs
|
||||
# mountPath: /certs
|
||||
# readOnly: true
|
||||
|
||||
## Add your own init container or uncomment and modify the given example.
|
||||
##
|
||||
extraInitContainers: {}
|
||||
## Don't configure S3 repository till Elasticsearch is reachable.
|
||||
## Ensure that it is available at http://elasticsearch:9200
|
||||
##
|
||||
# elasticsearch-s3-repository:
|
||||
# image: bitnami/minideb:latest
|
||||
# imagePullPolicy: "IfNotPresent"
|
||||
# command:
|
||||
# - "/bin/bash"
|
||||
# - "-c"
|
||||
# args:
|
||||
# - |
|
||||
# ES_HOST=elasticsearch
|
||||
# ES_PORT=9200
|
||||
# ES_REPOSITORY=backup
|
||||
# S3_REGION=us-east-1
|
||||
# S3_BUCKET=bucket
|
||||
# S3_BASE_PATH=backup
|
||||
# S3_COMPRESS=true
|
||||
# S3_STORAGE_CLASS=standard
|
||||
# install_packages curl && \
|
||||
# ( counter=0; while (( counter++ < 120 )); do curl -s http://${ES_HOST}:${ES_PORT} >/dev/null 2>&1 && break; echo "Waiting for elasticsearch $counter/120"; sleep 1; done ) && \
|
||||
# cat <<EOF | curl -sS -XPUT -H "Content-Type: application/json" -d @- http://${ES_HOST}:${ES_PORT}/_snapshot/${ES_REPOSITORY} \
|
||||
# {
|
||||
# "type": "s3",
|
||||
# "settings": {
|
||||
# "bucket": "${S3_BUCKET}",
|
||||
# "base_path": "${S3_BASE_PATH}",
|
||||
# "region": "${S3_REGION}",
|
||||
# "compress": "${S3_COMPRESS}",
|
||||
# "storage_class": "${S3_STORAGE_CLASS}"
|
||||
# }
|
||||
# }
|
||||
|
||||
## Elasticsearch Prometheus exporter configuration
|
||||
## ref: https://hub.docker.com/r/bitnami/elasticsearch-exporter/tags/
|
||||
##
|
||||
metrics:
|
||||
enabled: true
|
||||
name: metrics
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/elasticsearch-exporter
|
||||
tag: 1.1.0-debian-9-r100
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
## Elasticsearch Prometheus exporter service type
|
||||
##
|
||||
service:
|
||||
type: ClusterIP
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9114"
|
||||
## Elasticsearch Prometheus exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# requests:
|
||||
# cpu: 25m
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
## Metrics exporter pod Annotation and Labels
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "8080"
|
||||
|
||||
## Prometheus Operator ServiceMonitor configuration
|
||||
##
|
||||
@@ -378,3 +734,11 @@ metrics:
|
||||
##
|
||||
# selector:
|
||||
# prometheus: my-prometheus
|
||||
|
||||
## Bundled Kibana parameters
|
||||
##
|
||||
kibana:
|
||||
elasticsearch:
|
||||
hosts:
|
||||
- '{{ include "elasticsearch.coordinating.fullname" . }}'
|
||||
port: 9200
|
||||
|
||||
+494
-130
@@ -2,11 +2,16 @@
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
|
||||
##
|
||||
# global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
## Coordinating name to be used in the Kibana subchart (service name)
|
||||
##
|
||||
coordinating:
|
||||
name: coordinating-only
|
||||
kibanaEnabled: false
|
||||
|
||||
## Bitnami Elasticsearch image version
|
||||
## ref: https://hub.docker.com/r/bitnami/elasticsearch/tags/
|
||||
@@ -14,7 +19,7 @@
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/elasticsearch
|
||||
tag: 7.4.1-debian-9-r0
|
||||
tag: 7.5.0-debian-9-r0
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -26,8 +31,21 @@ image:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
##
|
||||
debug: false
|
||||
|
||||
## Image that performs the sysctl operation
|
||||
## String to partially override elasticsearch.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override elasticsearch.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
|
||||
## Bitnami Minideb image version
|
||||
## ref: https://hub.docker.com/r/bitnami/minideb/tags/
|
||||
##
|
||||
sysctlImage:
|
||||
enabled: true
|
||||
@@ -62,20 +80,34 @@ volumePermissions:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Init container' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## String to partially override elasticsearch.fullname template (will maintain the release name)
|
||||
## Cluster domain
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override elasticsearch.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
clusterDomain: cluster.local
|
||||
|
||||
## Elasticsearch cluster name
|
||||
##
|
||||
name: elastic
|
||||
|
||||
## Elasticsearch discovery node parameters
|
||||
##
|
||||
discovery:
|
||||
name: discovery
|
||||
|
||||
## Comma, semi-colon or space separated list of plugins to install at initialization
|
||||
## ref: https://github.com/bitnami/bitnami-docker-elasticsearch#environment-variables
|
||||
##
|
||||
@@ -86,43 +118,173 @@ name: elastic
|
||||
##
|
||||
# config:
|
||||
|
||||
## extraVolumes and extraVolumeMounts allows you to mount other volumes
|
||||
## Example Use Case: mount ssl certificates when elasticsearch has tls enabled
|
||||
# extraVolumes:
|
||||
# - name: es-certs
|
||||
# secret:
|
||||
# defaultMode: 420
|
||||
# secretName: es-certs
|
||||
# extraVolumeMounts:
|
||||
# - name: es-certs
|
||||
# mountPath: /certs
|
||||
# readOnly: true
|
||||
|
||||
## Elasticsearch master-eligible node parameters
|
||||
##
|
||||
master:
|
||||
name: master
|
||||
## Number of master-eligible node(s) replicas to deploy
|
||||
##
|
||||
replicas: 2
|
||||
heapSize: 128m
|
||||
antiAffinity: "soft"
|
||||
## Node Affinity
|
||||
# nodeAffinity:
|
||||
## Provide annotations for master-eligible pods.
|
||||
##
|
||||
podAnnotations: {}
|
||||
## Pod Security Context for master-eligible pods.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
## Affinity for pod assignment.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
## Elasticsearch master-eligible container's resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
## We usually recommend not to specify default resources and to leave this as a conscious
|
||||
## choice for the user. This also increases chances charts run on environments with little
|
||||
## resources, such as Minikube.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: 256Mi
|
||||
## Elasticsearch master-eligible container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: false
|
||||
# initialDelaySeconds: 90
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 5
|
||||
readinessProbe:
|
||||
enabled: false
|
||||
# initialDelaySeconds: 90
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 5
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
## If true, use a Persistent Volume Claim, If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
## Persistent Volume Claim annotations
|
||||
##
|
||||
annotations: {}
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
|
||||
## Service parameters for master-eligible node(s)
|
||||
##
|
||||
service:
|
||||
## master-eligible service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Elasticsearch transport port
|
||||
##
|
||||
port: 9300
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
## Provide annotations for the master pods.
|
||||
## Elasticsearch coordinating-only node parameters
|
||||
##
|
||||
coordinating:
|
||||
## Number of coordinating-only node(s) replicas to deploy
|
||||
##
|
||||
replicas: 2
|
||||
heapSize: 128m
|
||||
## Provide annotations for the coordinating-only pods.
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
## Configure resource requests and limits
|
||||
## Pod Security Context for coordinating-only pods.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
## Affinity for pod assignment.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
## Elasticsearch coordinating-only container's resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
## We usually recommend not to specify default resources and to leave this as a conscious
|
||||
## choice for the user. This also increases chances charts run on environments with little
|
||||
## resources, such as Minikube.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: "256Mi"
|
||||
## Elasticsearch master-eligible Liveness Probe
|
||||
memory: 256Mi
|
||||
## Elasticsearch coordinating-only container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: false
|
||||
# initialDelaySeconds: 90
|
||||
@@ -130,7 +292,6 @@ master:
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 5
|
||||
## Elasticsearch master-eligible Readiness Probe
|
||||
readinessProbe:
|
||||
enabled: false
|
||||
# initialDelaySeconds: 90
|
||||
@@ -138,100 +299,81 @@ master:
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 5
|
||||
|
||||
## Elasticsearch discovery node parameters
|
||||
##
|
||||
discovery:
|
||||
name: discovery
|
||||
|
||||
## Pod Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
# Cluster domain
|
||||
clusterDomain: cluster.local
|
||||
|
||||
## Elasticsearch coordinating-only node parameters
|
||||
##
|
||||
coordinating:
|
||||
name: coordinating-only
|
||||
replicas: 2
|
||||
heapSize: 128m
|
||||
antiAffinity: "soft"
|
||||
## node affinity
|
||||
# nodeAffinity:
|
||||
## Service parameters for coordinating-only node(s)
|
||||
##
|
||||
service:
|
||||
## coordinating-only service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Elasticsearch REST API port
|
||||
## Elasticsearch tREST API port
|
||||
##
|
||||
port: 9200
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
## Provide annotations for the coordinating pods.
|
||||
podAnnotations: {}
|
||||
|
||||
## Configure resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: "256Mi"
|
||||
## Elasticsearch master-eligible Liveness Probe
|
||||
livenessProbe:
|
||||
enabled: false
|
||||
# initialDelaySeconds: 90
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 5
|
||||
## Elasticsearch master-eligible Readiness Probe
|
||||
readinessProbe:
|
||||
enabled: false
|
||||
# initialDelaySeconds: 90
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 5
|
||||
|
||||
## Elasticsearch data node parameters
|
||||
##
|
||||
data:
|
||||
name: data
|
||||
## Number of data node(s) replicas to deploy
|
||||
##
|
||||
replicas: 2
|
||||
## updateStrategy for ElasticSearch Data statefulset
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
##
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
# rollingUpdatePartition
|
||||
heapSize: 1024m
|
||||
antiAffinity: "soft"
|
||||
## node affinity
|
||||
# nodeAffinity:
|
||||
heapSize: 128m
|
||||
## Provide annotations for the data pods.
|
||||
##
|
||||
podAnnotations: {}
|
||||
## Configure resource requests and limits
|
||||
## Pod Security Context for data pods.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
## Affinity for pod assignment.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
## Elasticsearch data container's resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
## We usually recommend not to specify default resources and to leave this as a conscious
|
||||
## choice for the user. This also increases chances charts run on environments with little
|
||||
## resources, such as Minikube.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: "1152Mi"
|
||||
## Elasticsearch master-eligible Liveness Probe
|
||||
memory: 1152Mi
|
||||
## Elasticsearch data container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: false
|
||||
# initialDelaySeconds: 90
|
||||
@@ -239,7 +381,6 @@ data:
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 5
|
||||
## Elasticsearch master-eligible Readiness Probe
|
||||
readinessProbe:
|
||||
enabled: false
|
||||
# initialDelaySeconds: 90
|
||||
@@ -254,11 +395,6 @@ data:
|
||||
## If true, use a Persistent Volume Claim, If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
|
||||
## Persistent Volume Claim annotations
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
@@ -267,11 +403,13 @@ data:
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
|
||||
## Persistent Volume Claim annotations
|
||||
##
|
||||
annotations: {}
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
@@ -281,39 +419,48 @@ data:
|
||||
ingest:
|
||||
enabled: false
|
||||
name: ingest
|
||||
## Number of ingest node(s) replicas to deploy
|
||||
##
|
||||
replicas: 2
|
||||
heapSize: 128m
|
||||
antiAffinity: "soft"
|
||||
## node affinity
|
||||
# nodeAffinity:
|
||||
service:
|
||||
## ingest service type
|
||||
type: ClusterIP
|
||||
## Elasticsearch transport port
|
||||
port: 9300
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
# loadBalancerIP:
|
||||
|
||||
## Provide annotations for the ingest pods.
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
## Configure resource requests and limits
|
||||
## Pod Security Context for ingest pods.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
## Affinity for pod assignment.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
## Elasticsearch ingest container's resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
## We usually recommend not to specify default resources and to leave this as a conscious
|
||||
## choice for the user. This also increases chances charts run on environments with little
|
||||
## resources, such as Minikube.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: "256Mi"
|
||||
## Elasticsearch master-eligible Liveness Probe
|
||||
memory: 256Mi
|
||||
## Elasticsearch ingest container's liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: false
|
||||
# initialDelaySeconds: 90
|
||||
@@ -321,7 +468,6 @@ ingest:
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 5
|
||||
## Elasticsearch master-eligible Readiness Probe
|
||||
readinessProbe:
|
||||
enabled: false
|
||||
# initialDelaySeconds: 90
|
||||
@@ -329,14 +475,38 @@ ingest:
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 5
|
||||
## Service parameters for ingest node(s)
|
||||
##
|
||||
service:
|
||||
## ingest service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Elasticsearch transport port
|
||||
##
|
||||
port: 9300
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# nodePort:
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
metrics:
|
||||
## Elasticsearch curator parameters
|
||||
##
|
||||
curator:
|
||||
enabled: false
|
||||
name: metrics
|
||||
name: curator
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/elasticsearch-exporter
|
||||
tag: 1.1.0-debian-9-r61
|
||||
repository: bitnami/elasticsearch-curator
|
||||
tag: 5.8.1-debian-9-r37
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
@@ -344,16 +514,202 @@ metrics:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
## Provide annotations for the metrics pods.
|
||||
|
||||
cronjob:
|
||||
# At 01:00 every day
|
||||
schedule: "0 1 * * *"
|
||||
annotations: {}
|
||||
concurrencyPolicy: ""
|
||||
failedJobsHistoryLimit: ""
|
||||
successfulJobsHistoryLimit: ""
|
||||
jobRestartPolicy: Never
|
||||
|
||||
podAnnotations: {}
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9114"
|
||||
|
||||
rbac:
|
||||
# Specifies whether RBAC should be enabled
|
||||
enabled: false
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a ServiceAccount should be created
|
||||
create: true
|
||||
# The name of the ServiceAccount to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name:
|
||||
|
||||
psp:
|
||||
# Specifies whether a podsecuritypolicy should be created
|
||||
create: false
|
||||
|
||||
hooks:
|
||||
install: false
|
||||
upgrade: false
|
||||
|
||||
# run curator in dry-run mode
|
||||
dryrun: false
|
||||
|
||||
command: ["curator"]
|
||||
env: {}
|
||||
|
||||
configMaps:
|
||||
# Delete indices older than 90 days
|
||||
action_file_yml: |-
|
||||
---
|
||||
actions:
|
||||
1:
|
||||
action: delete_indices
|
||||
description: "Clean up ES by deleting old indices"
|
||||
options:
|
||||
timeout_override:
|
||||
continue_if_exception: False
|
||||
disable_action: False
|
||||
ignore_empty_list: True
|
||||
filters:
|
||||
- filtertype: age
|
||||
source: name
|
||||
direction: older
|
||||
timestring: '%Y.%m.%d'
|
||||
unit: days
|
||||
unit_count: 90
|
||||
field:
|
||||
stats_result:
|
||||
epoch:
|
||||
exclude: False
|
||||
# Default config (this value is evaluated as a template)
|
||||
config_yml: |-
|
||||
---
|
||||
client:
|
||||
hosts:
|
||||
- {{ template "elasticsearch.coordinating.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
|
||||
port: {{ .Values.coordinating.service.port }}
|
||||
# url_prefix:
|
||||
# use_ssl: True
|
||||
# certificate:
|
||||
# client_cert:
|
||||
# client_key:
|
||||
# ssl_no_validate: True
|
||||
# http_auth:
|
||||
# timeout: 30
|
||||
# master_only: False
|
||||
# logging:
|
||||
# loglevel: INFO
|
||||
# logfile:
|
||||
# logformat: default
|
||||
# blacklist: ['elasticsearch', 'urllib3']
|
||||
|
||||
## Curator resources requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
priorityClassName: ""
|
||||
|
||||
# extraVolumes and extraVolumeMounts allows you to mount other volumes
|
||||
# Example Use Case: mount ssl certificates when elasticsearch has tls enabled
|
||||
# extraVolumes:
|
||||
# - name: es-certs
|
||||
# secret:
|
||||
# defaultMode: 420
|
||||
# secretName: es-certs
|
||||
# extraVolumeMounts:
|
||||
# - name: es-certs
|
||||
# mountPath: /certs
|
||||
# readOnly: true
|
||||
|
||||
## Add your own init container or uncomment and modify the given example.
|
||||
##
|
||||
extraInitContainers: {}
|
||||
## Don't configure S3 repository till Elasticsearch is reachable.
|
||||
## Ensure that it is available at http://elasticsearch:9200
|
||||
##
|
||||
# elasticsearch-s3-repository:
|
||||
# image: bitnami/minideb:latest
|
||||
# imagePullPolicy: "IfNotPresent"
|
||||
# command:
|
||||
# - "/bin/bash"
|
||||
# - "-c"
|
||||
# args:
|
||||
# - |
|
||||
# ES_HOST=elasticsearch
|
||||
# ES_PORT=9200
|
||||
# ES_REPOSITORY=backup
|
||||
# S3_REGION=us-east-1
|
||||
# S3_BUCKET=bucket
|
||||
# S3_BASE_PATH=backup
|
||||
# S3_COMPRESS=true
|
||||
# S3_STORAGE_CLASS=standard
|
||||
# install_packages curl && \
|
||||
# ( counter=0; while (( counter++ < 120 )); do curl -s http://${ES_HOST}:${ES_PORT} >/dev/null 2>&1 && break; echo "Waiting for elasticsearch $counter/120"; sleep 1; done ) && \
|
||||
# cat <<EOF | curl -sS -XPUT -H "Content-Type: application/json" -d @- http://${ES_HOST}:${ES_PORT}/_snapshot/${ES_REPOSITORY} \
|
||||
# {
|
||||
# "type": "s3",
|
||||
# "settings": {
|
||||
# "bucket": "${S3_BUCKET}",
|
||||
# "base_path": "${S3_BASE_PATH}",
|
||||
# "region": "${S3_REGION}",
|
||||
# "compress": "${S3_COMPRESS}",
|
||||
# "storage_class": "${S3_STORAGE_CLASS}"
|
||||
# }
|
||||
# }
|
||||
|
||||
## Elasticsearch Prometheus exporter configuration
|
||||
## ref: https://hub.docker.com/r/bitnami/elasticsearch-exporter/tags/
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
name: metrics
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/elasticsearch-exporter
|
||||
tag: 1.1.0-debian-9-r100
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
## Elasticsearch Prometheus exporter service type
|
||||
##
|
||||
service:
|
||||
type: ClusterIP
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9114"
|
||||
## Elasticsearch Prometheus exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# requests:
|
||||
# cpu: 25m
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
## Metrics exporter pod Annotation and Labels
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "8080"
|
||||
|
||||
## Prometheus Operator ServiceMonitor configuration
|
||||
##
|
||||
@@ -378,3 +734,11 @@ metrics:
|
||||
##
|
||||
# selector:
|
||||
# prometheus: my-prometheus
|
||||
|
||||
## Bundled Kibana parameters
|
||||
##
|
||||
kibana:
|
||||
elasticsearch:
|
||||
hosts:
|
||||
- '{{ include "elasticsearch.coordinating.fullname" . }}'
|
||||
port: 9200
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
apiVersion: v1
|
||||
name: etcd
|
||||
version: 4.4.0
|
||||
version: 4.4.6
|
||||
appVersion: 3.4.3
|
||||
description: etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines
|
||||
keywords:
|
||||
- etcd
|
||||
- cluster
|
||||
- database
|
||||
- cache
|
||||
- key-value
|
||||
- etcd
|
||||
- cluster
|
||||
- database
|
||||
- cache
|
||||
- key-value
|
||||
home: https://coreos.com/etcd/
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-etcd
|
||||
- https://github.com/bitnami/bitnami-docker-etcd
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
icon: https://bitnami.com/assets/stacks/etcd/img/etcd-stack-110x117.png
|
||||
|
||||
+8
-10
@@ -48,8 +48,8 @@ The command removes all the Kubernetes components associated with the chart and
|
||||
|
||||
The following tables lists the configurable parameters of the etcd chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|-------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|
|
||||
| Parameter | Description | Default |
|
||||
| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `global.imageRegistry` | Global Docker image registry | `nil` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
|
||||
@@ -89,12 +89,12 @@ The following tables lists the configurable parameters of the etcd chart and the
|
||||
| `securityContext.enabled` | Enable security context | `true` |
|
||||
| `securityContext.fsGroup` | Group ID for the container | `1001` |
|
||||
| `securityContext.runAsUser` | User ID for the container | `1001` |
|
||||
| `service.dnsBase` | Kubernetes service cluster dns base name | `svc.cluster.local` |
|
||||
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
|
||||
| `service.type` | Kubernetes Service type | `ClusterIP` |
|
||||
| `service.port` | etcd client port | `2379` |
|
||||
| `service.nodePort` | Port to bind to for NodePort service type (client port) | `nil` |
|
||||
| `service.peerPort` | etcd peer port | `2380` |
|
||||
| `service.peerNodePort` | Port to bind to for NodePort service type (peer port) | `nil` |
|
||||
| `service.nodePorts.clientPort` | Kubernetes etcd client node port | `""` |
|
||||
| `service.nodePorts.peerPort` | Kubernetes etcd peer node port | `""` |
|
||||
| `service.annotations` | Annotations for etcd service | `{}` |
|
||||
| `service.loadBalancerIP` | loadBalancerIP if etcd service type is `LoadBalancer` | `nil` |
|
||||
| `persistence.enabled` | Enable persistence using PVC | `true` |
|
||||
@@ -116,11 +116,9 @@ The following tables lists the configurable parameters of the etcd chart and the
|
||||
| `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` |
|
||||
| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed | `1` |
|
||||
| `podAnnotations` | Annotations to be added to pods | `{}` |
|
||||
| `nodeAffinity` | Node Affinity rules for pod assignment. The value is evaluated as a template. | `{}` |
|
||||
| `podAffinity` | Affinity rules for pod assignment. The value is evaluated as a template. | `{}` |
|
||||
| `podAntiAffinity` | Anti-Affinity rules for pod assignment. Allowed values: `soft` and `hard` | `soft` |
|
||||
| `nodeSelector` | Node labels for pod assignment. The value is evaluated as a template. | `{}` |
|
||||
| `tolerations` | Tolerations for pod assignment. The value is evaluated as a template. | `{}` |
|
||||
| `affinity` | Map of node/pod affinities | `{}` (The value is evaluated as a template) |
|
||||
| `nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) |
|
||||
| `tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) |
|
||||
| `metrics.enabled` | Enable Prometheus exporter to expose etcd metrics | `false` |
|
||||
| `metrics.podAnnotations` | Annotations for enabling prometheus to access the metrics endpoint | {`prometheus.io/scrape: "true",prometheus.io/port: "2379"`} |
|
||||
| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
etcd can be accessed via port {{ .Values.service.port }} on the following DNS name from within your cluster:
|
||||
|
||||
{{ template "etcd.fullname" . }}.{{ .Release.Namespace }}.{{ .Values.service.dnsBase }}
|
||||
{{ template "etcd.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
|
||||
|
||||
To set a key run the following command:
|
||||
|
||||
|
||||
@@ -30,6 +30,25 @@ Create chart name and version as used by the chart label.
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "etcd.labels" -}}
|
||||
app.kubernetes.io/name: {{ include "etcd.name" . }}
|
||||
helm.sh/chart: {{ include "etcd.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
|
||||
*/}}
|
||||
{{- define "etcd.matchLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "etcd.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Return the proper etcd image name
|
||||
*/}}
|
||||
@@ -174,7 +193,6 @@ Compile all warnings into a single message, and call fail.
|
||||
{{- $messages := append $messages (include "etcd.validateValues.startFromSnapshot.existingClaim" .) -}}
|
||||
{{- $messages := append $messages (include "etcd.validateValues.startFromSnapshot.snapshotFilename" .) -}}
|
||||
{{- $messages := append $messages (include "etcd.validateValues.disasterRecovery" .) -}}
|
||||
{{- $messages := append $messages (include "etcd.validateValues.podAntiAffinity" .) -}}
|
||||
{{- $messages := without $messages "" -}}
|
||||
{{- $message := join "\n" $messages -}}
|
||||
|
||||
@@ -210,15 +228,6 @@ etcd: disasterRecovery
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Validate values of etcd - must provide a valid podAntiAffinity ("soft" or "hard") */}}
|
||||
{{- define "etcd.validateValues.podAntiAffinity" -}}
|
||||
{{- if and (ne .Values.podAntiAffinity "soft") (ne .Values.podAntiAffinity "hard") -}}
|
||||
etcd: mode
|
||||
Invalid podAntiAffinity selected. Valid values are "soft" and
|
||||
"hard". Please set a valid mode (--set podAntiAffinity="xxxx")
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper image name (for the init container volume-permissions image)
|
||||
*/}}
|
||||
@@ -276,3 +285,16 @@ but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Renders a value that contains template.
|
||||
Usage:
|
||||
{{ include "etcd.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
|
||||
*/}}
|
||||
{{- define "etcd.tplValue" -}}
|
||||
{{- if typeIs "string" .value }}
|
||||
{{- tpl .value .context }}
|
||||
{{- else }}
|
||||
{{- tpl (.value | toYaml) .context }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
apiVersion: batch/v1beta1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: {{ template "etcd.fullname" . }}-snapshotter
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
helm.sh/chart: {{ template "etcd.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
name: {{ include "etcd.fullname" . }}-snapshotter
|
||||
labels: {{- include "etcd.labels" . | nindent 4 }}
|
||||
spec:
|
||||
concurrencyPolicy: Forbid
|
||||
schedule: {{ .Values.disasterRecovery.cronjob.schedule | quote }}
|
||||
@@ -16,14 +12,10 @@ spec:
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
helm.sh/chart: {{ template "etcd.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
labels: {{- include "etcd.labels" . | nindent 12 }}
|
||||
app.kubernetes.io/component: snapshotter
|
||||
{{- if .Values.disasterRecovery.cronjob.podAnnotations }}
|
||||
annotations: {{ toYaml .Values.disasterRecovery.cronjob.podAnnotations | nindent 12 }}
|
||||
annotations: {{- include "etcd.tplValue" ( dict "value" .Values.disasterRecovery.cronjob.podAnnotations "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
@@ -33,59 +25,59 @@ spec:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: etcd-snapshotter
|
||||
image: "{{ template "etcd.image" . }}"
|
||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||
command:
|
||||
- /scripts/save-snapshot.sh
|
||||
env:
|
||||
- name: ETCDCTL_API
|
||||
value: "3"
|
||||
{{- if .Values.auth.client.secureTransport }}
|
||||
- name: ETCD_CERT_FILE
|
||||
value: "/opt/bitnami/etcd/certs/client/cert.pem"
|
||||
- name: ETCD_KEY_FILE
|
||||
value: "/opt/bitnami/etcd/certs/client/key.pem"
|
||||
{{- if .Values.auth.client.enableAuthentication }}
|
||||
- name: ETCD_CLIENT_CERT_AUTH
|
||||
value: "true"
|
||||
- name: ETCD_TRUSTED_CA_FILE
|
||||
value: "/opt/bitnami/etcd/certs/client/ca.crt"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.auth.rbac.enabled }}
|
||||
- name: ETCD_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.auth.rbac.existingSecret }}{{ .Values.auth.rbac.existingSecret }}{{ else }}{{ template "etcd.fullname" . }}{{ end }}
|
||||
key: etcd-root-password
|
||||
{{- end }}
|
||||
{{- if .Values.disasterRecovery.cronjob.resources }}
|
||||
resources: {{ toYaml .Values.disasterRecovery.cronjob.resources | nindent 14 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: scripts
|
||||
mountPath: /scripts/save-snapshot.sh
|
||||
subPath: save-snapshot.sh
|
||||
- name: snapshot-volume
|
||||
mountPath: /snapshots
|
||||
{{- if .Values.auth.client.secureTransport }}
|
||||
- name: certs
|
||||
mountPath: /opt/bitnami/etcd/certs/client
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
- name: etcd-snapshotter
|
||||
image: {{ include "etcd.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /scripts/save-snapshot.sh
|
||||
env:
|
||||
- name: ETCDCTL_API
|
||||
value: "3"
|
||||
{{- if .Values.auth.client.secureTransport }}
|
||||
- name: ETCD_CERT_FILE
|
||||
value: "/opt/bitnami/etcd/certs/client/cert.pem"
|
||||
- name: ETCD_KEY_FILE
|
||||
value: "/opt/bitnami/etcd/certs/client/key.pem"
|
||||
{{- if .Values.auth.client.enableAuthentication }}
|
||||
- name: ETCD_CLIENT_CERT_AUTH
|
||||
value: "true"
|
||||
- name: ETCD_TRUSTED_CA_FILE
|
||||
value: "/opt/bitnami/etcd/certs/client/ca.crt"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.auth.rbac.enabled }}
|
||||
- name: ETCD_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.auth.rbac.existingSecret }}{{ .Values.auth.rbac.existingSecret }}{{ else }}{{ include "etcd.fullname" . }}{{ end }}
|
||||
key: etcd-root-password
|
||||
{{- end }}
|
||||
{{- if .Values.disasterRecovery.cronjob.resources }}
|
||||
resources: {{- toYaml .Values.disasterRecovery.cronjob.resources | nindent 16 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: scripts
|
||||
mountPath: /scripts/save-snapshot.sh
|
||||
subPath: save-snapshot.sh
|
||||
- name: snapshot-volume
|
||||
mountPath: /snapshots
|
||||
{{- if .Values.auth.client.secureTransport }}
|
||||
- name: certs
|
||||
mountPath: /opt/bitnami/etcd/certs/client
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.auth.client.secureTransport }}
|
||||
- name: certs
|
||||
secret:
|
||||
secretName: {{ required "A secret containinig the client certificates is required" .Values.auth.client.existingSecret }}
|
||||
defaultMode: 256
|
||||
{{- end }}
|
||||
- name: scripts
|
||||
configMap:
|
||||
name: {{ template "etcd.fullname" . }}-scripts
|
||||
defaultMode: 0755
|
||||
- name: snapshot-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "etcd.disasterRecovery.pvc.name" . }}
|
||||
{{- if .Values.auth.client.secureTransport }}
|
||||
- name: certs
|
||||
secret:
|
||||
secretName: {{ required "A secret containinig the client certificates is required" .Values.auth.client.existingSecret }}
|
||||
defaultMode: 256
|
||||
{{- end }}
|
||||
- name: scripts
|
||||
configMap:
|
||||
name: {{ include "etcd.fullname" . }}-scripts
|
||||
defaultMode: 0755
|
||||
- name: snapshot-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "etcd.disasterRecovery.pvc.name" . }}
|
||||
{{- end }}
|
||||
|
||||
@@ -6,19 +6,15 @@
|
||||
{{- $etcdFullname := include "etcd.fullname" . }}
|
||||
{{- $releaseNamespace := .Release.Namespace }}
|
||||
{{- $etcdHeadlessServiceName := printf "%s-%s" $etcdFullname "headless" }}
|
||||
{{- $dnsBase := .Values.service.dnsBase }}
|
||||
{{- $clusterDomain := .Values.clusterDomain }}
|
||||
{{- $etcdPeerProtocol := include "etcd.peerProtocol" . }}
|
||||
{{- $etcdClientProtocol := include "etcd.clientProtocol" . }}
|
||||
{{- $initSnapshotFilename := .Values.startFromSnapshot.snapshotFilename }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
helm.sh/chart: {{ template "etcd.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
name: {{ template "etcd.fullname" . }}-scripts
|
||||
name: {{ include "etcd.fullname" . }}-scripts
|
||||
labels: {{- include "etcd.labels" . | nindent 4 }}
|
||||
data:
|
||||
setup.sh: |-
|
||||
#!/bin/bash
|
||||
@@ -26,12 +22,12 @@ data:
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
|
||||
# Debug section
|
||||
exec 3>&1
|
||||
exec 4>&2
|
||||
|
||||
if [ ${BASH_DEBUG:-0} -eq 1 ]; then
|
||||
if [ "${BITNAMI_DEBUG}" = true ]; then
|
||||
echo "==> Bash debug is on"
|
||||
else
|
||||
echo "==> Bash debug is off"
|
||||
@@ -42,7 +38,7 @@ data:
|
||||
# Constants
|
||||
HOSTNAME="$(hostname -s)"
|
||||
AUTH_OPTIONS="{{ $etcdAuthOptions }}"
|
||||
ETCDCTL_ENDPOINTS="{{range $i, $e := until $replicaCount }}{{ $etcdClientProtocol }}://{{ $etcdFullname }}-{{ $e }}.{{ $etcdHeadlessServiceName }}.{{ $releaseNamespace }}.{{ $dnsBase }}:{{ $clientPort }},{{ end }}"
|
||||
ETCDCTL_ENDPOINTS="{{range $i, $e := until $replicaCount }}{{ $etcdClientProtocol }}://{{ $etcdFullname }}-{{ $e }}.{{ $etcdHeadlessServiceName }}.{{ $releaseNamespace }}.svc.{{ $clusterDomain }}:{{ $clientPort }},{{ end }}"
|
||||
# Remove the last comma "," introduced in the string
|
||||
export ETCDCTL_ENDPOINTS="$(sed 's/,/ /g' <<< $ETCDCTL_ENDPOINTS | awk '{$1=$1};1' | sed 's/ /,/g')"
|
||||
|
||||
@@ -107,13 +103,13 @@ data:
|
||||
## Check wether the member was succesfully removed from the cluster
|
||||
should_add_new_member() {
|
||||
return_value=0
|
||||
if (grep -E "^Member[[:space:]]+[a-z0-9]+ removed from cluster [a-z0-9]+$" "$(dirname "$ETCD_DATA_DIR")/member_removal.log") || \
|
||||
if (grep -E "^Member[[:space:]]+[a-z0-9]+\s+removed\s+from\s+cluster\s+[a-z0-9]+$" "$(dirname "$ETCD_DATA_DIR")/member_removal.log") || \
|
||||
! ([[ -d "$ETCD_DATA_DIR/member/snap" ]] && [[ -f "$ETCD_DATA_DIR/member_id" ]]); then
|
||||
rm -rf $ETCD_DATA_DIR/* 1>&3 2>&4
|
||||
else
|
||||
return_value=1
|
||||
fi
|
||||
rm "$(dirname "$ETCD_DATA_DIR")/member_removal.log" 1>&3 2>&4
|
||||
rm -f "$(dirname "$ETCD_DATA_DIR")/member_removal.log" 1>&3 2>&4
|
||||
return $return_value
|
||||
}
|
||||
|
||||
@@ -142,7 +138,9 @@ data:
|
||||
{{- end }}
|
||||
else
|
||||
echo "==> Detected data from previous deployments..." 1>&3 2>&4
|
||||
if is_disastrous_failure; then
|
||||
if [[ {{ $replicaCount }} -eq 1 ]]; then
|
||||
echo "==> Single node cluster detected!!" 1>&3 2>&4
|
||||
elif is_disastrous_failure; then
|
||||
echo "==> Cluster not responding!!" 1>&3 2>&4
|
||||
{{- if .Values.disasterRecovery.enabled }}
|
||||
if [[ -f "/snapshots/db" ]]; then
|
||||
@@ -161,19 +159,18 @@ data:
|
||||
exit 1
|
||||
fi
|
||||
{{- else }}
|
||||
echo "==> Disaster recovery is disabled, the cluster cannot be recovered!" 1>&3 2>&4
|
||||
exit 1
|
||||
echo "==> Disaster recovery is disabled, the cluster will try to recover on it's own..." 1>&3 2>&4
|
||||
{{- end }}
|
||||
elif should_add_new_member; then
|
||||
echo "==> Adding new member to existing cluster..." 1>&3 2>&4
|
||||
etcdctl $AUTH_OPTIONS member add "$HOSTNAME" --peer-urls="{{ $etcdPeerProtocol }}://${HOSTNAME}.{{ $etcdHeadlessServiceName }}.{{ .Release.Namespace }}.{{ $dnsBase }}:{{ $peerPort }}" | grep "^ETCD_" > "$ETCD_DATA_DIR/new_member_envs" 1>&3 2>&4
|
||||
etcdctl $AUTH_OPTIONS member add "$HOSTNAME" --peer-urls="{{ $etcdPeerProtocol }}://${HOSTNAME}.{{ $etcdHeadlessServiceName }}.{{ .Release.Namespace }}.svc.{{ $clusterDomain }}:{{ $peerPort }}" | grep "^ETCD_" > "$ETCD_DATA_DIR/new_member_envs" 1>&3 2>&4
|
||||
sed -ie 's/^/export /' "$ETCD_DATA_DIR/new_member_envs"
|
||||
echo "==> Loading env vars of existing cluster..." 1>&3 2>&4
|
||||
source "$ETCD_DATA_DIR/new_member_envs" 1>&3 2>&4
|
||||
store_member_id & 1>&3 2>&4
|
||||
else
|
||||
echo "==> Updating member in existing cluster..." 1>&3 2>&4
|
||||
etcdctl $AUTH_OPTIONS member update "$(cat "$ETCD_DATA_DIR/member_id")" --peer-urls="{{ $etcdPeerProtocol }}://${HOSTNAME}.{{ $etcdHeadlessServiceName }}.{{ .Release.Namespace }}.{{ $dnsBase }}:{{ $peerPort }}" 1>&3 2>&4
|
||||
etcdctl $AUTH_OPTIONS member update "$(cat "$ETCD_DATA_DIR/member_id")" --peer-urls="{{ $etcdPeerProtocol }}://${HOSTNAME}.{{ $etcdHeadlessServiceName }}.{{ .Release.Namespace }}.svc.{{ $clusterDomain }}:{{ $peerPort }}" 1>&3 2>&4
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -188,12 +185,12 @@ data:
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
|
||||
# Debug section
|
||||
exec 3>&1
|
||||
exec 4>&2
|
||||
|
||||
if [ ${BASH_DEBUG:-0} -eq 1 ]; then
|
||||
if [ "${BITNAMI_DEBUG}" = true ]; then
|
||||
echo "==> Bash debug is on"
|
||||
else
|
||||
echo "==> Bash debug is off"
|
||||
@@ -202,9 +199,8 @@ data:
|
||||
fi
|
||||
|
||||
# Constants
|
||||
HOSTNAME="$(hostname -s)"
|
||||
AUTH_OPTIONS="{{ $etcdAuthOptions }}"
|
||||
ETCDCTL_ENDPOINTS="{{range $i, $e := until $replicaCount }}{{ $etcdClientProtocol }}://{{ $etcdFullname }}-{{ $e }}.{{ $etcdHeadlessServiceName }}.{{ $releaseNamespace }}.{{ $dnsBase }}:{{ $clientPort }},{{ end }}"
|
||||
ETCDCTL_ENDPOINTS="{{range $i, $e := until $replicaCount }}{{ $etcdClientProtocol }}://{{ $etcdFullname }}-{{ $e }}.{{ $etcdHeadlessServiceName }}.{{ $releaseNamespace }}.svc.{{ $clusterDomain }}:{{ $clientPort }},{{ end }}"
|
||||
# Remove the last comma "," introduced in the string
|
||||
export ETCDCTL_ENDPOINTS="$(sed 's/,/ /g' <<< $ETCDCTL_ENDPOINTS | awk '{$1=$1};1' | sed 's/ /,/g')"
|
||||
|
||||
@@ -215,12 +211,12 @@ data:
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
|
||||
# Debug section
|
||||
exec 3>&1
|
||||
exec 4>&2
|
||||
|
||||
if [ ${BASH_DEBUG:-0} -eq 1 ]; then
|
||||
if [ "${BITNAMI_DEBUG}" = true ]; then
|
||||
echo "==> Bash debug is on"
|
||||
else
|
||||
echo "==> Bash debug is off"
|
||||
@@ -230,7 +226,7 @@ data:
|
||||
|
||||
# Constants
|
||||
AUTH_OPTIONS="{{ $etcdAuthOptions }}"
|
||||
|
||||
|
||||
echo "==> [DEBUG] Probing etcd cluster"
|
||||
echo "==> [DEBUG] Probe command: \"etcdctl $AUTH_OPTIONS endpoint health\""
|
||||
etcdctl $AUTH_OPTIONS endpoint health
|
||||
@@ -241,12 +237,12 @@ data:
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
|
||||
# Debug section
|
||||
exec 3>&1
|
||||
exec 4>&2
|
||||
|
||||
if [ ${BASH_DEBUG:-0} -eq 1 ]; then
|
||||
if [ "${BITNAMI_DEBUG}" = true ]; then
|
||||
echo "==> Bash debug is on"
|
||||
else
|
||||
echo "==> Bash debug is off"
|
||||
@@ -256,7 +252,7 @@ data:
|
||||
|
||||
# Constants
|
||||
AUTH_OPTIONS="{{ $etcdAuthOptions }}"
|
||||
ETCDCTL_ENDPOINTS="{{range $i, $e := until $replicaCount }}{{ $etcdClientProtocol }}://{{ $etcdFullname }}-{{ $e }}.{{ $etcdHeadlessServiceName }}.{{ $releaseNamespace }}.{{ $dnsBase }}:{{ $clientPort }},{{ end }}"
|
||||
ETCDCTL_ENDPOINTS="{{range $i, $e := until $replicaCount }}{{ $etcdClientProtocol }}://{{ $etcdFullname }}-{{ $e }}.{{ $etcdHeadlessServiceName }}.{{ $releaseNamespace }}.svc.{{ $clusterDomain }}:{{ $clientPort }},{{ end }}"
|
||||
# Remove the last comma "," introduced in the string
|
||||
export ETCDCTL_ENDPOINTS="$(sed 's/,/ /g' <<< $ETCDCTL_ENDPOINTS | awk '{$1=$1};1' | sed 's/ /,/g')"
|
||||
|
||||
|
||||
@@ -2,17 +2,13 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "etcd.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
helm.sh/chart: {{ template "etcd.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
name: {{ include "etcd.fullname" . }}
|
||||
labels: {{- include "etcd.labels" . | nindent 4 }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- if .Values.auth.rbac.rootPassword }}
|
||||
etcd-root-password: {{ .Values.auth.rbac.rootPassword | b64enc | quote }}
|
||||
{{ else }}
|
||||
{{- else }}
|
||||
etcd-root-password: {{ randAlphaNum 10 | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,33 +2,27 @@
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ template "etcd.fullname" . }}
|
||||
name: {{ include "etcd.fullname" . }}
|
||||
{{- if .Values.metrics.serviceMonitor.namespace }}
|
||||
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
helm.sh/chart: {{ template "etcd.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
labels: {{- include "etcd.labels" . | nindent 4 }}
|
||||
{{- range $key, $value := .Values.metrics.serviceMonitor.selector }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
matchLabels: {{- include "etcd.matchLabels" . | nindent 6 }}
|
||||
endpoints:
|
||||
- port: client
|
||||
path: "/metrics"
|
||||
{{- if .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
- port: client
|
||||
path: /metrics
|
||||
{{- if .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
- {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "etcd.fullname" . }}-snapshotter
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
helm.sh/chart: {{ template "etcd.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name | quote }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
|
||||
name: {{ include "etcd.fullname" . }}-snapshotter
|
||||
labels: {{- include "etcd.labels" . | nindent 4 }}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ template "etcd.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
helm.sh/chart: {{ template "etcd.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
name: {{ include "etcd.fullname" . }}
|
||||
labels: {{- include "etcd.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
serviceName: {{ template "etcd.fullname" . }}-headless
|
||||
matchLabels: {{- include "etcd.matchLabels" . | nindent 6 }}
|
||||
serviceName: {{ include "etcd.fullname" . }}-headless
|
||||
podManagementPolicy: {{ .Values.statefulset.podManagementPolicy }}
|
||||
replicas: {{ .Values.statefulset.replicaCount }}
|
||||
updateStrategy:
|
||||
type: {{ .Values.statefulset.updateStratey }}
|
||||
type: {{ .Values.statefulset.updateStrategy }}
|
||||
{{- if (eq "Recreate" .Values.statefulset.updateStrategy) }}
|
||||
rollingUpdate: null
|
||||
{{- else if .Values.statefulset.rollingUpdatePartition }}
|
||||
@@ -25,295 +19,258 @@ spec:
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
name: "{{ template "etcd.fullname" . }}"
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
helm.sh/chart: {{ template "etcd.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
|
||||
labels: {{- include "etcd.labels" . | nindent 8 }}
|
||||
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
|
||||
annotations:
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{ toYaml .Values.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.podAnnotations }}
|
||||
{{ toYaml .Values.metrics.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{- include "etcd.tplValue" ( dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.podAnnotations }}
|
||||
{{- include "etcd.tplValue" ( dict "value" .Values.metrics.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "etcd.imagePullSecrets" . | indent 6 }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity: {{- include "etcd.tplValue" (dict "value" .Values.affinity "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector: {{- include "etcd.tplValue" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tolerations }}
|
||||
tolerations: {{- include "etcd.tplValue" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
affinity:
|
||||
{{- with .Values.nodeAffinity }}
|
||||
nodeAffinity: {{ tpl (toYaml .) $ | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- with .Values.podAffinity }}
|
||||
podAffinity: {{ tpl (toYaml .) $ | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.podAntiAffinity "hard" }}
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- else if eq .Values.podAntiAffinity "soft" }}
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
|
||||
initContainers:
|
||||
- name: volume-permissions
|
||||
image: "{{ template "etcd.volumePermissions.image" . }}"
|
||||
imagePullPolicy: {{ default "" .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/etcd"]
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
resources: {{ toYaml .Values.volumePermissions.resources | nindent 10 }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: "/bitnami/etcd"
|
||||
- name: volume-permissions
|
||||
image: {{ include "etcd.volumePermissions.image" . }}
|
||||
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }} /bitnami/etcd
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
{{- if .Values.volumePermissions.resources }}
|
||||
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/etcd
|
||||
{{- end }}
|
||||
containers:
|
||||
# Variables to populate static cluster
|
||||
{{- $replicaCount := int .Values.statefulset.replicaCount }}
|
||||
{{- $clientPort := int .Values.service.port }}
|
||||
{{- $peerPort := int .Values.service.peerPort }}
|
||||
{{- $etcdFullname := include "etcd.fullname" . }}
|
||||
{{- $releaseNamespace := .Release.Namespace }}
|
||||
{{- $etcdHeadlessServiceName := printf "%s-%s" $etcdFullname "headless" }}
|
||||
{{- $dnsBase := .Values.service.dnsBase }}
|
||||
{{- $etcdPeerProtocol := include "etcd.peerProtocol" . }}
|
||||
{{- $etcdClientProtocol := include "etcd.clientProtocol" . }}
|
||||
- name: etcd
|
||||
image: "{{ template "etcd.image" . }}"
|
||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||
command:
|
||||
- /scripts/setup.sh
|
||||
lifecycle:
|
||||
preStop:
|
||||
# Variables to populate static cluster
|
||||
{{- $replicaCount := int .Values.statefulset.replicaCount }}
|
||||
{{- $clientPort := int .Values.service.port }}
|
||||
{{- $peerPort := int .Values.service.peerPort }}
|
||||
{{- $etcdFullname := include "etcd.fullname" . }}
|
||||
{{- $releaseNamespace := .Release.Namespace }}
|
||||
{{- $etcdHeadlessServiceName := printf "%s-%s" $etcdFullname "headless" }}
|
||||
{{- $clusterDomain := .Values.clusterDomain }}
|
||||
{{- $etcdPeerProtocol := include "etcd.peerProtocol" . }}
|
||||
{{- $etcdClientProtocol := include "etcd.clientProtocol" . }}
|
||||
- name: etcd
|
||||
image: {{ include "etcd.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
command:
|
||||
- /scripts/setup.sh
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- /scripts/prestop-hook.sh
|
||||
{{- if .Values.resources }}
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envVarsConfigMap }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "etcd.envVarsCM" . }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: MY_POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: MY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: ETCDCTL_API
|
||||
value: "3"
|
||||
- name: ETCD_NAME
|
||||
value: "$(MY_POD_NAME)"
|
||||
- name: ETCD_DATA_DIR
|
||||
value: {{ include "etcd.dataDir" . }}
|
||||
- name: ETCD_ADVERTISE_CLIENT_URLS
|
||||
value: "{{ $etcdClientProtocol }}://$(MY_POD_NAME).{{ $etcdHeadlessServiceName }}.{{ .Release.Namespace }}.svc.{{ $clusterDomain }}:{{ .Values.service.port }}"
|
||||
- name: ETCD_LISTEN_CLIENT_URLS
|
||||
value: "{{ $etcdClientProtocol }}://0.0.0.0:{{ .Values.service.port }}"
|
||||
- name: ETCD_INITIAL_ADVERTISE_PEER_URLS
|
||||
value: "{{ $etcdPeerProtocol }}://$(MY_POD_NAME).{{ $etcdHeadlessServiceName }}.{{ .Release.Namespace }}.svc.{{ $clusterDomain }}:{{ .Values.service.peerPort }}"
|
||||
- name: ETCD_LISTEN_PEER_URLS
|
||||
value: "{{ $etcdPeerProtocol }}://0.0.0.0:{{ .Values.service.peerPort }}"
|
||||
{{- if .Values.maxProcs }}
|
||||
- name: GOMAXPROCS
|
||||
value: {{ .Values.maxProcs }}
|
||||
{{- end }}
|
||||
{{- if gt $replicaCount 1 }}
|
||||
- name: ETCD_INITIAL_CLUSTER_TOKEN
|
||||
value: "etcd-cluster-k8s"
|
||||
- name: ETCD_INITIAL_CLUSTER_STATE
|
||||
value: "new"
|
||||
- name: ETCD_INITIAL_CLUSTER
|
||||
value: {{range $i, $e := until $replicaCount }}{{ $etcdFullname }}-{{ $e }}={{ $etcdPeerProtocol }}://{{ $etcdFullname }}-{{ $e }}.{{ $etcdHeadlessServiceName }}.{{ $releaseNamespace }}.svc.{{ $clusterDomain }}:{{ $peerPort }},{{ end }}
|
||||
{{- end }}
|
||||
- name: ALLOW_NONE_AUTHENTICATION
|
||||
value: {{ ternary "yes" "no" (or .Values.auth.rbac.enabled .Values.allowNoneAuthentication) | quote }}
|
||||
{{- if .Values.auth.rbac.enabled }}
|
||||
- name: ETCD_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.auth.rbac.existingSecret }}{{ .Values.auth.rbac.existingSecret }}{{ else }}{{ include "etcd.fullname" . }}{{ end }}
|
||||
key: etcd-root-password
|
||||
{{- end }}
|
||||
{{- if and .Values.auth.client.secureTransport .Values.auth.client.useAutoTLS }}
|
||||
- name: ETCD_AUTO_TLS
|
||||
value: "true"
|
||||
{{- else if .Values.auth.client.secureTransport }}
|
||||
- name: ETCD_CERT_FILE
|
||||
value: "/opt/bitnami/etcd/certs/client/cert.pem"
|
||||
- name: ETCD_KEY_FILE
|
||||
value: "/opt/bitnami/etcd/certs/client/key.pem"
|
||||
{{- if .Values.auth.client.enableAuthentication }}
|
||||
- name: ETCD_CLIENT_CERT_AUTH
|
||||
value: "true"
|
||||
- name: ETCD_TRUSTED_CA_FILE
|
||||
value: "/opt/bitnami/etcd/certs/client/ca.crt"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.auth.peer.secureTransport .Values.auth.peer.useAutoTLS }}
|
||||
- name: ETCD_PEER_AUTO_TLS
|
||||
value: "true"
|
||||
{{- else if .Values.auth.peer.secureTransport }}
|
||||
- name: ETCD_PEER_CERT_FILE
|
||||
value: "/opt/bitnami/etcd/certs/peer/cert.pem"
|
||||
- name: ETCD_PEER_KEY_FILE
|
||||
value: "/opt/bitnami/etcd/certs/peer/key.pem"
|
||||
{{- if .Values.auth.peer.enableAuthentication }}
|
||||
- name: ETCD_PEER_CLIENT_CERT_AUTH
|
||||
value: "true"
|
||||
- name: ETCD_PEER_TRUSTED_CA_FILE
|
||||
value: "/opt/bitnami/etcd/certs/peer/ca.crt"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: client
|
||||
containerPort: 2379
|
||||
- name: peer
|
||||
containerPort: 2380
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /scripts/prestop-hook.sh
|
||||
{{- if .Values.resources }}
|
||||
resources: {{ toYaml .Values.resources | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.envVarsConfigMap }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ template "etcd.envVarsCM" . }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- if .Values.image.debug }}
|
||||
- name: BASH_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_DEBUG
|
||||
value: "1"
|
||||
- name: NAMI_LOG_LEVEL
|
||||
value: "trace8"
|
||||
{{- end }}
|
||||
|
||||
## Basic configuration
|
||||
- name: MY_POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: MY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: ETCDCTL_API
|
||||
value: "3"
|
||||
- name: ETCD_NAME
|
||||
value: "$(MY_POD_NAME)"
|
||||
- name: ETCD_DATA_DIR
|
||||
value: {{ template "etcd.dataDir" . }}
|
||||
- name: ETCD_ADVERTISE_CLIENT_URLS
|
||||
value: "{{ $etcdClientProtocol }}://$(MY_POD_NAME).{{ $etcdHeadlessServiceName }}.{{ .Release.Namespace }}.{{ $dnsBase }}:{{ .Values.service.port }}"
|
||||
- name: ETCD_LISTEN_CLIENT_URLS
|
||||
value: "{{ $etcdClientProtocol }}://0.0.0.0:{{ .Values.service.port }}"
|
||||
- name: ETCD_INITIAL_ADVERTISE_PEER_URLS
|
||||
value: "{{ $etcdPeerProtocol }}://$(MY_POD_NAME).{{ $etcdHeadlessServiceName }}.{{ .Release.Namespace }}.{{ $dnsBase }}:{{ .Values.service.peerPort }}"
|
||||
- name: ETCD_LISTEN_PEER_URLS
|
||||
value: "{{ $etcdPeerProtocol }}://0.0.0.0:{{ .Values.service.peerPort }}"
|
||||
{{- if .Values.maxProcs }}
|
||||
- name: GOMAXPROCS
|
||||
value: {{ .Values.maxProcs }}
|
||||
{{- end }}
|
||||
|
||||
## Clustering configuration
|
||||
{{- if gt $replicaCount 1 }}
|
||||
- name: ETCD_INITIAL_CLUSTER_TOKEN
|
||||
value: "etcd-cluster-k8s"
|
||||
- name: ETCD_INITIAL_CLUSTER_STATE
|
||||
value: "new"
|
||||
- name: ETCD_INITIAL_CLUSTER
|
||||
value: {{range $i, $e := until $replicaCount }}{{ $etcdFullname }}-{{ $e }}={{ $etcdPeerProtocol }}://{{ $etcdFullname }}-{{ $e }}.{{ $etcdHeadlessServiceName }}.{{ $releaseNamespace }}.{{ $dnsBase }}:{{ $peerPort }},{{ end }}
|
||||
{{- end }}
|
||||
|
||||
## RBAC authentication
|
||||
- name: ALLOW_NONE_AUTHENTICATION
|
||||
value: {{ ternary "yes" "no" (or .Values.auth.rbac.enabled .Values.allowNoneAuthentication) | quote }}
|
||||
{{- if .Values.auth.rbac.enabled }}
|
||||
- name: ETCD_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.auth.rbac.existingSecret }}{{ .Values.auth.rbac.existingSecret }}{{ else }}{{ template "etcd.fullname" . }}{{ end }}
|
||||
key: etcd-root-password
|
||||
{{- end }}
|
||||
|
||||
## Client-to-server communication
|
||||
{{- if and .Values.auth.client.secureTransport .Values.auth.client.useAutoTLS }}
|
||||
- name: ETCD_AUTO_TLS
|
||||
value: "true"
|
||||
{{- else if .Values.auth.client.secureTransport }}
|
||||
- name: ETCD_CERT_FILE
|
||||
value: "/opt/bitnami/etcd/certs/client/cert.pem"
|
||||
- name: ETCD_KEY_FILE
|
||||
value: "/opt/bitnami/etcd/certs/client/key.pem"
|
||||
{{- if .Values.auth.client.enableAuthentication }}
|
||||
- name: ETCD_CLIENT_CERT_AUTH
|
||||
value: "true"
|
||||
- name: ETCD_TRUSTED_CA_FILE
|
||||
value: "/opt/bitnami/etcd/certs/client/ca.crt"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
## Peer-to-peer communication
|
||||
{{- if and .Values.auth.peer.secureTransport .Values.auth.peer.useAutoTLS }}
|
||||
- name: ETCD_PEER_AUTO_TLS
|
||||
value: "true"
|
||||
{{- else if .Values.auth.peer.secureTransport }}
|
||||
- name: ETCD_PEER_CERT_FILE
|
||||
value: "/opt/bitnami/etcd/certs/peer/cert.pem"
|
||||
- name: ETCD_PEER_KEY_FILE
|
||||
value: "/opt/bitnami/etcd/certs/peer/key.pem"
|
||||
{{- if .Values.auth.peer.enableAuthentication }}
|
||||
- name: ETCD_PEER_CLIENT_CERT_AUTH
|
||||
value: "true"
|
||||
- name: ETCD_PEER_TRUSTED_CA_FILE
|
||||
value: "/opt/bitnami/etcd/certs/peer/ca.crt"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
ports:
|
||||
- name: client
|
||||
containerPort: 2379
|
||||
- name: peer
|
||||
containerPort: 2380
|
||||
{{- if .Values.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /scripts/probes.sh
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /scripts/probes.sh
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- /scripts/probes.sh
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /scripts/probes.sh
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: scripts
|
||||
mountPath: /scripts/setup.sh
|
||||
subPath: setup.sh
|
||||
- name: scripts
|
||||
mountPath: /scripts/prestop-hook.sh
|
||||
subPath: prestop-hook.sh
|
||||
- name: scripts
|
||||
mountPath: /scripts/probes.sh
|
||||
subPath: probes.sh
|
||||
- name: data
|
||||
mountPath: /bitnami/etcd
|
||||
{{- if .Values.startFromSnapshot.enabled }}
|
||||
- name: init-snapshot-volume
|
||||
mountPath: /init-snapshot
|
||||
{{- end }}
|
||||
{{- if .Values.disasterRecovery.enabled }}
|
||||
- name: snapshot-volume
|
||||
mountPath: /snapshots
|
||||
{{- end }}
|
||||
{{- if .Values.configFileConfigMap }}
|
||||
- name: etcd-config
|
||||
mountPath: /opt/bitnami/etcd/conf/
|
||||
{{- end }}
|
||||
{{- if or .Values.auth.client.enableAuthentication (and .Values.auth.client.secureTransport (not .Values.auth.client.useAutoTLS )) }}
|
||||
- name: etcd-client-certs
|
||||
mountPath: /opt/bitnami/etcd/certs/client/
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- if or .Values.auth.peer.enableAuthentication (and .Values.auth.peer.secureTransport (not .Values.auth.peer.useAutoTLS )) }}
|
||||
- name: etcd-peer-certs
|
||||
mountPath: /opt/bitnami/etcd/certs/peer/
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: scripts
|
||||
mountPath: /scripts/setup.sh
|
||||
subPath: setup.sh
|
||||
- name: scripts
|
||||
mountPath: /scripts/prestop-hook.sh
|
||||
subPath: prestop-hook.sh
|
||||
- name: scripts
|
||||
mountPath: /scripts/probes.sh
|
||||
subPath: probes.sh
|
||||
- name: data
|
||||
mountPath: /bitnami/etcd
|
||||
configMap:
|
||||
name: {{ include "etcd.fullname" . }}-scripts
|
||||
defaultMode: 0755
|
||||
{{- if .Values.startFromSnapshot.enabled }}
|
||||
- name: init-snapshot-volume
|
||||
mountPath: /init-snapshot
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.startFromSnapshot.existingClaim }}
|
||||
{{- end }}
|
||||
{{- if .Values.disasterRecovery.enabled }}
|
||||
- name: snapshot-volume
|
||||
mountPath: /snapshots
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "etcd.disasterRecovery.pvc.name" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.configFileConfigMap }}
|
||||
- name: etcd-config
|
||||
mountPath: /opt/bitnami/etcd/conf/
|
||||
configMap:
|
||||
name: {{ include "etcd.configFileCM" . }}
|
||||
{{- end }}
|
||||
{{- if or .Values.auth.client.enableAuthentication (and .Values.auth.client.secureTransport (not .Values.auth.client.useAutoTLS ) ) }}
|
||||
{{- if or .Values.auth.client.enableAuthentication (and .Values.auth.client.secureTransport (not .Values.auth.client.useAutoTLS )) }}
|
||||
- name: etcd-client-certs
|
||||
mountPath: /opt/bitnami/etcd/certs/client/
|
||||
readOnly: true
|
||||
secret:
|
||||
secretName: {{ required "A secret containinig the client certificates is required" .Values.auth.client.existingSecret }}
|
||||
defaultMode: 256
|
||||
{{- end }}
|
||||
{{- if or .Values.auth.peer.enableAuthentication (and .Values.auth.peer.secureTransport (not .Values.auth.peer.useAutoTLS ) ) }}
|
||||
{{- if or .Values.auth.peer.enableAuthentication (and .Values.auth.peer.secureTransport (not .Values.auth.peer.useAutoTLS )) }}
|
||||
- name: etcd-peer-certs
|
||||
mountPath: /opt/bitnami/etcd/certs/peer/
|
||||
readOnly: true
|
||||
secret:
|
||||
secretName: {{ required "A secret containinig the peer certificates is required" .Values.auth.peer.existingSecret }}
|
||||
defaultMode: 256
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: scripts
|
||||
configMap:
|
||||
name: {{ template "etcd.fullname" . }}-scripts
|
||||
defaultMode: 0755
|
||||
{{- if .Values.startFromSnapshot.enabled }}
|
||||
- name: init-snapshot-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.startFromSnapshot.existingClaim }}
|
||||
{{- end }}
|
||||
{{- if .Values.disasterRecovery.enabled }}
|
||||
- name: snapshot-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "etcd.disasterRecovery.pvc.name" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.configFileConfigMap }}
|
||||
- name: etcd-config
|
||||
configMap:
|
||||
name: {{ template "etcd.configFileCM" . }}
|
||||
{{- end }}
|
||||
{{- if or .Values.auth.client.enableAuthentication (and .Values.auth.client.secureTransport (not .Values.auth.client.useAutoTLS ) ) }}
|
||||
- name: etcd-client-certs
|
||||
secret:
|
||||
secretName: {{ required "A secret containinig the client certificates is required" .Values.auth.client.existingSecret }}
|
||||
defaultMode: 256
|
||||
{{- end }}
|
||||
{{- if or .Values.auth.peer.enableAuthentication (and .Values.auth.peer.secureTransport (not .Values.auth.peer.useAutoTLS ) ) }}
|
||||
- name: etcd-peer-certs
|
||||
secret:
|
||||
secretName: {{ required "A secret containinig the peer certificates is required" .Values.auth.peer.existingSecret }}
|
||||
defaultMode: 256
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.enabled }}
|
||||
{{- if not .Values.persistence.enabled }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- else }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.persistence.annotations }}
|
||||
{{ $key }}: {{ $value }}
|
||||
{{- if .Values.persistence.annotations }}
|
||||
annotations: {{- include "etcd.tplValue" ( dict "value" .Values.persistence.annotations "context" $) | nindent 10 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
@@ -324,7 +281,4 @@ spec:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{ include "etcd.storageClass" . }}
|
||||
{{- else }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,24 +1,18 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "etcd.fullname" . }}-headless
|
||||
name: {{ include "etcd.fullname" . }}-headless
|
||||
labels: {{- include "etcd.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
helm.sh/chart: {{ template "etcd.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: client
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: client
|
||||
- name: peer
|
||||
port: {{ .Values.service.peerPort }}
|
||||
targetPort: peer
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
- name: client
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: client
|
||||
- name: peer
|
||||
port: {{ .Values.service.peerPort }}
|
||||
targetPort: peer
|
||||
selector: {{- include "etcd.matchLabels" . | nindent 4 }}
|
||||
|
||||
@@ -1,34 +1,31 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "etcd.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
helm.sh/chart: {{ template "etcd.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
name: {{ include "etcd.fullname" . }}
|
||||
labels: {{- include "etcd.labels" . | nindent 4 }}
|
||||
{{- if .Values.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.service.annotations | indent 4 }}
|
||||
annotations: {{- include "etcd.tplValue" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerIP }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: client
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: client
|
||||
{{- if and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort)) }}
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
{{- end }}
|
||||
- name: peer
|
||||
port: {{ .Values.service.peerPort }}
|
||||
targetPort: peer
|
||||
{{- if and (eq .Values.service.type "NodePort") (not (empty .Values.service.peerNodePort)) }}
|
||||
nodePort: {{ .Values.service.peerNodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ template "etcd.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
- name: client
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: client
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.clientPort)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.clientPort }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
- name: peer
|
||||
port: {{ .Values.service.peerPort }}
|
||||
targetPort: peer
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.peerPort)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.peerPort }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
selector: {{- include "etcd.matchLabels" . | nindent 4 }}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/etcd
|
||||
tag: 3.4.3-debian-9-r0
|
||||
tag: 3.4.3-debian-9-r12
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -56,17 +56,27 @@ volumePermissions:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Init container' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## String to partially override etcd.fullname template (will maintain the release name)
|
||||
## Statefulset parameters
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override etcd.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
|
||||
statefulset:
|
||||
## Number od replicas
|
||||
##
|
||||
replicaCount: 3
|
||||
## Update strategy, can be set to RollingUpdate or OnDelete by default.
|
||||
## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
|
||||
##
|
||||
@@ -79,9 +89,6 @@ statefulset:
|
||||
## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
|
||||
##
|
||||
podManagementPolicy: Parallel
|
||||
## Number od replicas
|
||||
##
|
||||
replicaCount: 3
|
||||
|
||||
## ConfigMap that includes the etcd.conf.yml file
|
||||
##
|
||||
@@ -91,17 +98,15 @@ statefulset:
|
||||
##
|
||||
# envVarsConfigMap:
|
||||
|
||||
## etcd docker image available customizations
|
||||
## https://github.com/bitnami/bitnami-docker-etcd#configuration
|
||||
##
|
||||
## Allow to use etcd without configuring RBAC authentication
|
||||
##
|
||||
allowNoneAuthentication: true
|
||||
|
||||
## Limits the number of operating system threads that can execute user-level
|
||||
## Go code simultaneously by setting GOMAXPROCS environment variable
|
||||
## ref: https://golang.org/pkg/runtime
|
||||
##
|
||||
# maxProcs
|
||||
# maxProcs:
|
||||
|
||||
## Authentication parameteres
|
||||
## https://github.com/bitnami/bitnami-docker-etcd#security
|
||||
@@ -109,31 +114,40 @@ allowNoneAuthentication: true
|
||||
auth:
|
||||
rbac:
|
||||
enabled: true
|
||||
## etcd root user password. The root user is always `root`.
|
||||
## etcd root user password. The root user is always `root`
|
||||
##
|
||||
# rootPassword:
|
||||
## Name of the existing secret containing credentials for the root user.
|
||||
# existingSecret:
|
||||
##
|
||||
# existingSecret: name-of-existing-secret
|
||||
|
||||
client:
|
||||
## Switch to encrypt client communication using TLS certificates
|
||||
##
|
||||
secureTransport: true
|
||||
## Switch to automatically create the TLS certificates
|
||||
##
|
||||
useAutoTLS: false
|
||||
## Switch to enable host authentication using TLS certificates. Requires existing secret.
|
||||
##
|
||||
enableAuthentication: true
|
||||
## Name of the existing secret containing cert files for client communication.
|
||||
# existingSecret:
|
||||
##
|
||||
# existingSecret: name-of-existing-secret
|
||||
|
||||
peer:
|
||||
## Switch to encrypt peer communication using TLS certificates
|
||||
##
|
||||
secureTransport: true
|
||||
## Switch to automatically create the TLS certificates
|
||||
##
|
||||
useAutoTLS: true
|
||||
## Switch to enable host authentication using TLS certificates. Requires existing secret.
|
||||
##
|
||||
enableAuthentication: false
|
||||
## Name of the existing secret containing cert files for peer communication.
|
||||
# existingSecret:
|
||||
|
||||
##
|
||||
# existingSecret: name-of-existing-secret
|
||||
|
||||
## Kubernetes Security Context
|
||||
## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
@@ -143,104 +157,118 @@ securityContext:
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Kubernetes configuration
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer
|
||||
## Kubernetes Cluster Domain
|
||||
##
|
||||
clusterDomain: cluster.local
|
||||
|
||||
## Service parameters
|
||||
##
|
||||
service:
|
||||
dnsBase: svc.cluster.local
|
||||
## K8s service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## etcd client port
|
||||
##
|
||||
port: 2379
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types for the client port
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
## etcd peer port
|
||||
##
|
||||
# nodePort:
|
||||
peerPort: 2380
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types for the peer port
|
||||
## Specify the nodePort(s) value(s) for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# peerNodePort:
|
||||
nodePorts:
|
||||
clientPort: ""
|
||||
peerPort: ""
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
## Use loadBalancerIP to request a specific static IP,
|
||||
## otherwise leave blank
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
## etcd data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
## If true, use a Persistent Volume Claim, If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
## Persistent Volume Claim annotations
|
||||
##
|
||||
annotations: {}
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
annotations: {}
|
||||
|
||||
## Configure resource requests and limits
|
||||
## Etcd containers' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# limits:
|
||||
# cpu: 200m
|
||||
# memory: 1Gi
|
||||
# requests:
|
||||
# memory: 256Mi
|
||||
# cpu: 250m
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 500m
|
||||
# memory: 1Gi
|
||||
requests: {}
|
||||
# cpu: 250m
|
||||
# memory: 256Mi
|
||||
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
## Etcd containers' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: false
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
enabled: true
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 2
|
||||
successThreshold: 1
|
||||
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
enabled: false
|
||||
initialDelaySeconds: 5
|
||||
enabled: true
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
|
||||
## Pod annotations
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
## Node Affinity. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
nodeAffinity: {}
|
||||
## Pod Affinity. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
podAffinity: {}
|
||||
## Pod AntiAffinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
podAntiAffinity: soft
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
## Tolerations for pod assignment. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
|
||||
##
|
||||
tolerations: {}
|
||||
|
||||
## Add the corresponding annotations so Prometheus can collect etcd metrics
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## Etcd Prometheus exporter configuration
|
||||
##
|
||||
metrics:
|
||||
enabled: true
|
||||
@@ -270,6 +298,7 @@ metrics:
|
||||
## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
|
||||
##
|
||||
# selector:
|
||||
# prometheus: my-prometheus
|
||||
|
||||
## Start a new etcd cluster recovering the data from an existing snaptshot before
|
||||
## initializing the members
|
||||
@@ -290,7 +319,7 @@ startFromSnapshot:
|
||||
## the cluster from a previous snapshot.
|
||||
##
|
||||
disasterRecovery:
|
||||
enabled: true
|
||||
enabled: false
|
||||
cronjob:
|
||||
## Schedule in Cron format to save snapshots
|
||||
## See https://en.wikipedia.org/wiki/Cron
|
||||
|
||||
+104
-68
@@ -14,7 +14,7 @@
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/etcd
|
||||
tag: 3.4.3-debian-9-r0
|
||||
tag: 3.4.3-debian-9-r12
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -56,9 +56,27 @@ volumePermissions:
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
resources: {}
|
||||
## Init container' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Statefulset parameters
|
||||
##
|
||||
statefulset:
|
||||
## Number od replicas
|
||||
##
|
||||
replicaCount: 1
|
||||
## Update strategy, can be set to RollingUpdate or OnDelete by default.
|
||||
## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
|
||||
##
|
||||
@@ -71,9 +89,6 @@ statefulset:
|
||||
## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
|
||||
##
|
||||
podManagementPolicy: Parallel
|
||||
## Number od replicas
|
||||
##
|
||||
replicaCount: 1
|
||||
|
||||
## ConfigMap that includes the etcd.conf.yml file
|
||||
##
|
||||
@@ -83,17 +98,15 @@ statefulset:
|
||||
##
|
||||
# envVarsConfigMap:
|
||||
|
||||
## etcd docker image available customizations
|
||||
## https://github.com/bitnami/bitnami-docker-etcd#configuration
|
||||
##
|
||||
## Allow to use etcd without configuring RBAC authentication
|
||||
##
|
||||
allowNoneAuthentication: true
|
||||
|
||||
## Limits the number of operating system threads that can execute user-level
|
||||
## Go code simultaneously by setting GOMAXPROCS environment variable
|
||||
## ref: https://golang.org/pkg/runtime
|
||||
##
|
||||
# maxProcs
|
||||
# maxProcs:
|
||||
|
||||
## Authentication parameteres
|
||||
## https://github.com/bitnami/bitnami-docker-etcd#security
|
||||
@@ -101,31 +114,40 @@ allowNoneAuthentication: true
|
||||
auth:
|
||||
rbac:
|
||||
enabled: true
|
||||
## etcd root user password. The root user is always `root`.
|
||||
## etcd root user password. The root user is always `root`
|
||||
##
|
||||
# rootPassword:
|
||||
## Name of the existing secret containing credentials for the root user.
|
||||
# existingSecret:
|
||||
##
|
||||
# existingSecret: name-of-existing-secret
|
||||
|
||||
client:
|
||||
## Switch to encrypt client communication using TLS certificates
|
||||
##
|
||||
secureTransport: false
|
||||
## Switch to automatically create the TLS certificates
|
||||
##
|
||||
useAutoTLS: false
|
||||
## Switch to enable host authentication using TLS certificates. Requires existing secret.
|
||||
##
|
||||
enableAuthentication: false
|
||||
## Name of the existing secret containing cert files for client communication.
|
||||
# existingSecret:
|
||||
##
|
||||
# existingSecret: name-of-existing-secret
|
||||
|
||||
peer:
|
||||
## Switch to encrypt peer communication using TLS certificates
|
||||
##
|
||||
secureTransport: false
|
||||
## Switch to automatically create the TLS certificates
|
||||
##
|
||||
useAutoTLS: false
|
||||
## Switch to enable host authentication using TLS certificates. Requires existing secret.
|
||||
##
|
||||
enableAuthentication: false
|
||||
## Name of the existing secret containing cert files for peer communication.
|
||||
# existingSecret:
|
||||
|
||||
##
|
||||
# existingSecret: name-of-existing-secret
|
||||
|
||||
## Kubernetes Security Context
|
||||
## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
@@ -135,104 +157,118 @@ securityContext:
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Kubernetes configuration
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer
|
||||
## Kubernetes Cluster Domain
|
||||
##
|
||||
clusterDomain: cluster.local
|
||||
|
||||
## Service parameters
|
||||
##
|
||||
service:
|
||||
dnsBase: svc.cluster.local
|
||||
## K8s service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## etcd client port
|
||||
##
|
||||
port: 2379
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types for the client port
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
## etcd peer port
|
||||
##
|
||||
# nodePort:
|
||||
peerPort: 2380
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types for the peer port
|
||||
## Specify the nodePort(s) value(s) for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
# peerNodePort:
|
||||
nodePorts:
|
||||
clientPort: ""
|
||||
peerPort: ""
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Provide any additional annotations which may be required. This can be used to
|
||||
## set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
annotations: {}
|
||||
## Use loadBalancerIP to request a specific static IP,
|
||||
## otherwise leave blank
|
||||
##
|
||||
# loadBalancerIP:
|
||||
|
||||
## etcd data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
## If true, use a Persistent Volume Claim, If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
# storageClass: "-"
|
||||
## Persistent Volume Claim annotations
|
||||
##
|
||||
annotations: {}
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
annotations: {}
|
||||
|
||||
## Configure resource requests and limits
|
||||
## Etcd containers' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# limits:
|
||||
# cpu: 200m
|
||||
# memory: 1Gi
|
||||
# requests:
|
||||
# memory: 256Mi
|
||||
# cpu: 250m
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 500m
|
||||
# memory: 1Gi
|
||||
requests: {}
|
||||
# cpu: 250m
|
||||
# memory: 256Mi
|
||||
|
||||
## Configure extra options for liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
||||
## Etcd containers' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: false
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
enabled: true
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 2
|
||||
successThreshold: 1
|
||||
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
enabled: false
|
||||
initialDelaySeconds: 15
|
||||
enabled: true
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
|
||||
## Pod annotations
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
## Node Affinity. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
nodeAffinity: {}
|
||||
## Pod Affinity. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
podAffinity: {}
|
||||
## Pod AntiAffinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
podAntiAffinity: soft
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
## Tolerations for pod assignment. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
|
||||
##
|
||||
tolerations: {}
|
||||
|
||||
## Add the corresponding annotations so Prometheus can collect etcd metrics
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
|
||||
## Etcd Prometheus exporter configuration
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
|
||||
+10
-10
@@ -1,19 +1,19 @@
|
||||
apiVersion: v1
|
||||
name: fluentd
|
||||
version: 0.2.0
|
||||
appVersion: 1.7.4
|
||||
version: 0.4.3
|
||||
appVersion: 1.8.0
|
||||
description: Fluentd is an open source data collector for unified logging layer
|
||||
keywords:
|
||||
- fluentd
|
||||
- logging
|
||||
- logs
|
||||
- data
|
||||
- collector
|
||||
- fluentd
|
||||
- logging
|
||||
- logs
|
||||
- data
|
||||
- collector
|
||||
home: https://www.fluentd.org/
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-fluentd
|
||||
- https://github.com/bitnami/bitnami-docker-fluentd
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
icon: https://bitnami.com/assets/stacks/fluentd/img/fluentd-stack-110x117.png
|
||||
|
||||
@@ -48,8 +48,8 @@ The command removes all the Kubernetes components associated with the chart and
|
||||
|
||||
The following tables lists the configurable parameters of the kibana chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
|
||||
| Parameter | Description | Default |
|
||||
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
||||
| `global.imageRegistry` | Global Docker image registry | `nil` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `image.registry` | Fluentd image registry | `docker.io` |
|
||||
@@ -60,10 +60,21 @@ The following tables lists the configurable parameters of the kibana chart and t
|
||||
| `nameOverride` | String to partially override fluentd.fullname template with a string (will prepend the release name) | `nil` |
|
||||
| `fullnameOverride` | String to fully override fluentd.fullname template with a string | `nil` |
|
||||
| `clusterDomain` | Kubernetes DNS domain name to use | `cluster.local` |
|
||||
| `forwarder.enabled` | Enable Fluentd aggregator | `true` |
|
||||
| `forwarder.securityContext.enabled` | Enable security context for forwarder pods | `true` |
|
||||
| `forwarder.securityContext.fsGroup` | Group ID for forwarder's containers filesystem | `0` |
|
||||
| `forwarder.securityContext.runAsUser` | User ID for forwarder's containers | `0` |
|
||||
| `forwarder.configFile` | Name of the config file that will be used by Fluentd at launch under the `/opt/bitnami/fluentd/conf` directory | `fluentd.conf` |
|
||||
| `forwarder.configMap` | Name of the config map that contains the Fluentd configuration files | `nil` |
|
||||
| `forwarder.extraArgs` | Extra arguments for the Fluentd command line | `nil` |
|
||||
| `forwarder.extraEnv` | Extra environment variables to pass to the container | `{}` |
|
||||
| `forwarder.containerPorts` | Ports the forwarder containers will listen on | `Check values.yaml` |
|
||||
| `forwarder.service.type` | Kubernetes service type (`ClusterIP`, `NodePort`, or `LoadBalancer`) for the forwarders | `ClusterIP` |
|
||||
| `forwarder.service.ports` | Array containing the forwarder service ports | `Check values.yaml file` |
|
||||
| `forwarder.service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
|
||||
| `forwarder.service.loadBalancerSourceRanges` | Addresses that are allowed when service is LoadBalancer | `[]` |
|
||||
| `forwarder.service.clusterIP` | Static clusterIP or None for headless services | `nil` |
|
||||
| `forwarder.service.annotations` | Annotations for the forwarder service | `{}` |
|
||||
| `forwarder.livenessProbe.enabled` | Enable liveness probes for the forwarder | `true` |
|
||||
| `forwarder.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `60` |
|
||||
| `forwarder.livenessProbe.periodSeconds` | How often to perform the probe | `10` |
|
||||
@@ -84,11 +95,21 @@ The following tables lists the configurable parameters of the kibana chart and t
|
||||
| `forwarder.podAnnotations` | Pod annotations | `{}` |
|
||||
| `aggregator.enabled` | Enable Fluentd aggregator | `true` |
|
||||
| `aggregator.replicaCount` | Number of aggregator pods to deploy in the Stateful Set | `2` |
|
||||
| `aggregator.securityContext.enabled` | Enable security context for aggregator pods | `true` |
|
||||
| `aggregator.securityContext.fsGroup` | Group ID for aggregator's containers filesystem | `1001` |
|
||||
| `aggregator.securityContext.runAsUser` | User ID for aggregator's containers | `1001` |
|
||||
| `aggregator.configFile` | Name of the config file that will be used by Fluentd at launch under the `/opt/bitnami/fluentd/conf` directory | `fluentd.conf` |
|
||||
| `aggregator.configMap` | Name of the config map that contains the Fluentd configuration files | `nil` |
|
||||
| `aggregator.port` | Kubernetes Service port - Fluentd transport port for the aggregators | `24224` |
|
||||
| `aggregator.extraArgs` | Extra arguments for the Fluentd command line | `nil` |
|
||||
| `aggregator.extraEnv` | Extra environment variables to pass to the container | `{}` |
|
||||
| `aggregator.containerPorts` | Ports the aggregator containers will listen on | `Check values.yaml` |
|
||||
| `aggregator.service.type` | Kubernetes service type (`ClusterIP`, `NodePort`, or `LoadBalancer`) for the aggregators | `ClusterIP` |
|
||||
| `aggregator.service.ports` | Array containing the aggregator service ports | `Check values.yaml file` |
|
||||
| `aggregator.service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
|
||||
| `aggregator.service.loadBalancerSourceRanges` | Addresses that are allowed when service is LoadBalancer | `[]` |
|
||||
| `aggregator.service.clusterIP` | Static clusterIP or None for headless services | `nil` |
|
||||
| `aggregator.service.annotations` | Annotations for the aggregator service | `{}` |
|
||||
| `aggregator.livenessProbe.enabled` | Enable liveness probes for the aggregator | `true` |
|
||||
| `aggregator.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `60` |
|
||||
| `aggregator.livenessProbe.periodSeconds` | How often to perform the probe | `10` |
|
||||
@@ -125,9 +146,6 @@ The following tables lists the configurable parameters of the kibana chart and t
|
||||
| `tls.serverCertificate` | Server certificate | Server certificate content |
|
||||
| `tls.serverKey` | Server Key | Server private key content |
|
||||
| `tls.existingSecret` | Existing secret with certificate content | `nil` |
|
||||
| `securityContext.enabled` | Enable security context | `true` |
|
||||
| `securityContext.fsGroup` | Group ID for the container filesystem | `1001` |
|
||||
| `securityContext.runAsUser` | User ID for the container | `1001` |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
|
||||
@@ -3,15 +3,22 @@
|
||||
To verify that Fluentd has started, run:
|
||||
|
||||
kubectl get all -l "app.kubernetes.io/name={{ include "fluentd.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
|
||||
{{ if and .Values.aggregator.enabled (not .Values.aggregator.configMap) }}
|
||||
{{ if and .Values.aggregator.enabled .Values.forwarder.enabled (not .Values.aggregator.configMap) }}
|
||||
Logs are captured on each node by the forwarder pods and then sent to the aggregator pods. By default, the aggregator pods send the logs to the standard output.
|
||||
You can see all the logs by running this command:
|
||||
|
||||
kubectl logs -l "app.kubernetes.io/component=aggregator"
|
||||
|
||||
You can mount your own configuration files to the aggregators and the forwarders. For example, this is useful if you want to forward the aggregated logs to Elasticsearch or another service.
|
||||
{{- else if and .Values.aggregator.enabled (not .Values.forwarder.enabled) }}
|
||||
You have deployed Fluentd in aggregator-only mode. Logs received by the aggregator will be thrown to the standard output by default.
|
||||
You can see all the logs by running this command:
|
||||
|
||||
kubectl logs -l "app.kubernetes.io/component=aggregator"
|
||||
|
||||
You can mount your own configuration files to the aggregators. For example, this is useful if you want to forward the logs to Elasticsearch or another service.
|
||||
{{- else if and (not .Values.aggregator.enabled) (not .Values.forwarder.configMap) }}
|
||||
Logs are captured on each node by the forwarder pods and sent to the standard output
|
||||
Logs are captured on each node by the forwarder pods and sent to the standard output by default.
|
||||
You can see all the logs by running this command:
|
||||
|
||||
kubectl logs -l "app.kubernetes.io/component=forwarder"
|
||||
@@ -19,4 +26,5 @@
|
||||
You can mount your own configuration files to the forwarders. For example, this is useful if you want to forward the logs to Elasticsearch or another service.
|
||||
{{- end }}
|
||||
|
||||
{{- include "fluentd.validateValues" . }}
|
||||
{{- include "fluentd.checkRollingTags" . -}}
|
||||
|
||||
@@ -114,6 +114,7 @@ Validate data
|
||||
*/}}
|
||||
{{- define "fluentd.validateValues" -}}
|
||||
{{- $messages := list -}}
|
||||
{{- $messages := append $messages (include "fluentd.validateValues.deployment" .) -}}
|
||||
{{- $messages := append $messages (include "fluentd.validateValues.rbac" .) -}}
|
||||
{{- $messages := without $messages "" -}}
|
||||
{{- $message := join "\n" $messages -}}
|
||||
@@ -122,6 +123,15 @@ Validate data
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Validate values of Fluentd - forwarders and aggregators can't be disabled at the same time */}}
|
||||
{{- define "fluentd.validateValues.deployment" -}}
|
||||
{{- if and (not .Values.forwarder.enabled) (not .Values.aggregator.enabled) -}}
|
||||
fluentd:
|
||||
You have disabled both the forwarders and the aggregators.
|
||||
Please enable at least one of them (--set forwarder.enabled=true) (--set aggregator.enabled=true)
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Validate values of Fluentd - must create serviceAccount to create enable RBAC */}}
|
||||
{{- define "fluentd.validateValues.rbac" -}}
|
||||
{{- if and .Values.rbac.create (not .Values.serviceAccount.create) -}}
|
||||
@@ -163,3 +173,16 @@ Get the certificates secret name.
|
||||
{{- printf "%s-tls" (include "fluentd.fullname" . ) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Renders a value that contains template.
|
||||
Usage:
|
||||
{{ include "fluentd.tplValue" (dict "value" .Values.path.to.the.Value "context" $) }}
|
||||
*/}}
|
||||
{{- define "fluentd.tplValue" -}}
|
||||
{{- if typeIs "string" .value }}
|
||||
{{- tpl .value .context }}
|
||||
{{- else }}
|
||||
{{- tpl (.value | toYaml) .context }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -37,12 +37,14 @@ data:
|
||||
@type null
|
||||
</match>
|
||||
|
||||
# TCP input to receive logs from the forwarders
|
||||
# TCP input to receive logs from
|
||||
{{- if and .Values.aggregator.port }}
|
||||
<source>
|
||||
@type forward
|
||||
bind 0.0.0.0
|
||||
port {{ .Values.aggregator.port }}
|
||||
</source>
|
||||
{{- end }}
|
||||
|
||||
# HTTP input for the liveness and readiness probes
|
||||
<source>
|
||||
|
||||
@@ -19,94 +19,98 @@ spec:
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/aggregator-configmap.yaml") . | sha256sum }}
|
||||
{{- if .Values.aggregator.podAnnotations }}
|
||||
{{- toYaml .Values.aggregator.podAnnotations | nindent 8 }}
|
||||
{{- include "fluentd.tplValue" (dict "value" .Values.aggregator.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "fluentd.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
{{- if .Values.aggregator.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
runAsUser: {{ .Values.aggregator.securityContext.runAsUser }}
|
||||
fsGroup: {{ .Values.aggregator.securityContext.fsGroup }}
|
||||
{{- end }}
|
||||
{{- if .Values.aggregator.affinity }}
|
||||
affinity: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.affinity "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.aggregator.nodeSelector }}
|
||||
nodeSelector: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.aggregator.tolerations }}
|
||||
tolerations: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: fluentd
|
||||
image: {{ include "fluentd.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: FLUENTD_CONF
|
||||
value: {{ .Values.aggregator.configFile }}
|
||||
- name: FLUENTD_OPT
|
||||
value: {{ .Values.aggregator.extraArgs | quote }}
|
||||
{{- if .Values.aggregator.extraEnv }}
|
||||
{{- toYaml .Values.aggregator.extraEnv | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9880
|
||||
protocol: TCP
|
||||
- name: tcp
|
||||
containerPort: {{ .Values.aggregator.port }}
|
||||
protocol: TCP
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
containerPort: {{ .Values.metrics.service.port }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- if .Values.aggregator.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.aggregator.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.aggregator.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.aggregator.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.aggregator.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.aggregator.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.aggregator.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.aggregator.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.aggregator.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.aggregator.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.aggregator.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.aggregator.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
resources: {{- toYaml .Values.aggregator.resources | nindent 10 }}
|
||||
volumeMounts:
|
||||
- name: fluentd-config
|
||||
mountPath: /opt/bitnami/fluentd/conf
|
||||
- name: buffer
|
||||
mountPath: /opt/bitnami/fluentd/logs/buffers
|
||||
- name: fluentd
|
||||
image: {{ include "fluentd.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
env:
|
||||
- name: FLUENTD_CONF
|
||||
value: {{ .Values.aggregator.configFile }}
|
||||
- name: FLUENTD_OPT
|
||||
value: {{ .Values.aggregator.extraArgs | quote }}
|
||||
{{- if .Values.aggregator.extraEnv }}
|
||||
{{- toYaml .Values.aggregator.extraEnv | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
{{- if .Values.aggregator.port }}
|
||||
- name: tcp
|
||||
containerPort: {{ .Values.aggregator.port }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- if .Values.aggregator.containerPorts }}
|
||||
{{- toYaml .Values.aggregator.containerPorts | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
containerPort: {{ .Values.metrics.service.port }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- if .Values.aggregator.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.aggregator.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.aggregator.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.aggregator.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.aggregator.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.aggregator.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.aggregator.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.aggregator.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.aggregator.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.aggregator.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.aggregator.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.aggregator.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.aggregator.resources }}
|
||||
resources: {{- toYaml .Values.aggregator.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: fluentd-config
|
||||
mountPath: /opt/bitnami/fluentd/conf
|
||||
- name: buffer
|
||||
mountPath: /opt/bitnami/fluentd/logs/buffers
|
||||
{{- if .Values.tls.enabled }}
|
||||
- name: certs
|
||||
mountPath: /opt/bitnami/fluentd/certs
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.tls.enabled }}
|
||||
- name: certs
|
||||
mountPath: /opt/bitnami/fluentd/certs
|
||||
secret:
|
||||
secretName: {{ template "fluentd.tls.secretName" . }}
|
||||
items:
|
||||
- key: tls.crt
|
||||
path: tls.crt
|
||||
- key: tls.key
|
||||
path: tls.key
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.tls.enabled }}
|
||||
- name: certs
|
||||
secret:
|
||||
secretName: {{ template "fluentd.tls.secretName" . }}
|
||||
items:
|
||||
- key: tls.crt
|
||||
path: tls.crt
|
||||
- key: tls.key
|
||||
path: tls.key
|
||||
{{- end }}
|
||||
- name: fluentd-config
|
||||
configMap:
|
||||
name: {{ template "fluentd.aggregator.configMap" . }}
|
||||
- name: buffer
|
||||
emptyDir: {}
|
||||
{{- with .Values.aggregator.nodeSelector }}
|
||||
nodeSelector: {{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.aggregator.affinity }}
|
||||
affinity: {{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.aggregator.tolerations }}
|
||||
tolerations: {{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
- name: fluentd-config
|
||||
configMap:
|
||||
name: {{ template "fluentd.aggregator.configMap" . }}
|
||||
- name: buffer
|
||||
emptyDir: {}
|
||||
{{- end -}}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
{{- if .Values.aggregator.service.ports }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "fluentd.fullname" . }}-aggregator
|
||||
labels: {{- include "fluentd.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: aggregator
|
||||
{{- if .Values.aggregator.service.annotations }}
|
||||
annotations: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.service.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.aggregator.service.type }}
|
||||
{{- if and .Values.aggregator.service.loadBalancerIP (eq .Values.aggregator.service.type "LoadBalancer") }}
|
||||
loadBalancerIP: {{ .Values.aggregator.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if and .Values.aggregator.service.loadBalancerSourceRanges (eq .Values.aggregator.service.type "LoadBalancer") }}
|
||||
loadBalancerSourceRanges:
|
||||
{{- with .Values.aggregator.service.loadBalancerSourceRanges }}
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.aggregator.service.type "ClusterIP") .Values.aggregator.service.clusterIP }}
|
||||
clusterIP: {{ .Values.aggregator.service.clusterIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
{{- range $key, $value := .Values.aggregator.service.ports }}
|
||||
- name: {{ $key }}
|
||||
{{ toYaml $value | nindent 6 }}
|
||||
{{- end }}
|
||||
selector: {{ include "fluentd.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: aggregator
|
||||
{{- end }}
|
||||
@@ -5,13 +5,13 @@ metadata:
|
||||
name: {{ include "fluentd.fullname" . }}
|
||||
labels: {{- include "fluentd.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "namespaces"
|
||||
- "pods"
|
||||
verbs:
|
||||
- "get"
|
||||
- "watch"
|
||||
- "list"
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "namespaces"
|
||||
- "pods"
|
||||
verbs:
|
||||
- "get"
|
||||
- "watch"
|
||||
- "list"
|
||||
{{- end }}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user