Commit fdccaac0 authored by Rafael Matias's avatar Rafael Matias Committed by Kubernetes Prow Robot

allow using custom init scripts (#11728)

parent bca82279
name: influxdb
version: 1.1.3
version: 1.1.4
appVersion: 1.7.3
description: Scalable datastore for metrics, events, and real-time analytics.
keywords:
......
......@@ -65,6 +65,10 @@ spec:
mountPath: {{ .Values.config.storage_directory }}
- name: config
mountPath: /etc/influxdb
{{- if .Values.initScripts.enabled }}
- name: init
mountPath: /docker-entrypoint-initdb.d
{{- end }}
volumes:
- name: data
{{- if .Values.persistence.enabled }}
......@@ -81,6 +85,11 @@ spec:
- name: config
configMap:
name: {{ template "influxdb.fullname" . }}
{{- if .Values.initScripts.enabled }}
- name: init
configMap:
name: {{ template "influxdb.fullname" . }}-init
{{- end }}
{{- if .Values.schedulerName }}
schedulerName: "{{ .Values.schedulerName }}"
{{- end }}
......
{{- if .Values.initScripts.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "influxdb.fullname" . }}-init
labels:
app: {{ template "influxdb.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
data:
{{ toYaml .Values.initScripts.scripts | indent 2 }}
{{- end -}}
......@@ -251,3 +251,14 @@ config:
format: auto
level: info
supress_logo: false
# Allow executing custom init scripts
#
# If the container finds any files with the extensions .sh or .iql inside of the
# /docker-entrypoint-initdb.d folder, it will execute them. The order they are
# executed in is determined by the shell. This is usually alphabetical order.
initScripts:
enabled: false
scripts:
init.iql: |+
CREATE DATABASE "telegraf" WITH DURATION 30d REPLICATION 1 NAME "rp_30d"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment