From 273dfac9ef7660bcaa5aab7257f3e49f5cfe27cb Mon Sep 17 00:00:00 2001 From: Naseem Date: Sun, 16 Feb 2020 00:57:28 -0500 Subject: [PATCH] [stable/influxdb] Refactor configmap by using implicit default values (#20787) * Refactor configmap by using implicit default values Instead of having every default value explicitly described in the values file and put into the corresponding configmap(s), just use defaults and adjust these values as needed. This is beneficial because overtime defaults may change and it is duplicate work to match it in the values file. Furthermore documenting configurable values in the README will be much more feasible. This PR also removes the now defunct admin section of the config. Signed-off-by: Naseem * Rename config to configmap Signed-off-by: Naseem * enable api and rpc ports always Signed-off-by: Naseem --- stable/influxdb/Chart.yaml | 2 +- stable/influxdb/templates/NOTES.txt | 6 +- stable/influxdb/templates/backup-cronjob.yaml | 2 +- stable/influxdb/templates/config.yaml | 170 ------------------ stable/influxdb/templates/configmap.yaml | 112 ++++++++++++ .../{meta-config.yaml => meta-configmap.yaml} | 21 +-- stable/influxdb/templates/meta-service.yaml | 2 +- .../influxdb/templates/meta-statefulset.yaml | 8 +- .../templates/post-install-set-auth.yaml | 2 +- stable/influxdb/templates/service.yaml | 25 +-- stable/influxdb/templates/statefulset.yaml | 20 +-- stable/influxdb/values.yaml | 143 ++------------- 12 files changed, 167 insertions(+), 346 deletions(-) delete mode 100644 stable/influxdb/templates/config.yaml create mode 100644 stable/influxdb/templates/configmap.yaml rename stable/influxdb/templates/{meta-config.yaml => meta-configmap.yaml} (51%) diff --git a/stable/influxdb/Chart.yaml b/stable/influxdb/Chart.yaml index 48bbacbb77..9345160b65 100755 --- a/stable/influxdb/Chart.yaml +++ b/stable/influxdb/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: influxdb -version: 4.1.1 +version: 4.2.0 appVersion: 1.7.6 description: Scalable datastore for metrics, events, and real-time analytics. keywords: diff --git a/stable/influxdb/templates/NOTES.txt b/stable/influxdb/templates/NOTES.txt index a555aaff0c..42622c8c55 100644 --- a/stable/influxdb/templates/NOTES.txt +++ b/stable/influxdb/templates/NOTES.txt @@ -1,10 +1,10 @@ -InfluxDB can be accessed via port {{ .Values.config.http.bind_address }} on the following DNS name from within your cluster: +InfluxDB can be accessed via port {{ .Values.config.http.bind_address | default 8086 }} on the following DNS name from within your cluster: -- http://{{ template "influxdb.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.config.http.bind_address }} +- http://{{ template "influxdb.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.config.http.bind_address | default 8086 }} You can easily connect to the remote instance with your local influx cli. To forward the API port to localhost:8086 run the following: -- kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "influxdb.fullname" . }} -o jsonpath='{ .items[0].metadata.name }') 8086:{{ .Values.config.http.bind_address }} +- kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "influxdb.fullname" . }} -o jsonpath='{ .items[0].metadata.name }') 8086:{{ .Values.config.http.bind_address | default 8086 }} You can also connect to the influx cli from inside the container. To open a shell session in the InfluxDB pod run the following: diff --git a/stable/influxdb/templates/backup-cronjob.yaml b/stable/influxdb/templates/backup-cronjob.yaml index 9d7aee9dc6..e966a8b78b 100644 --- a/stable/influxdb/templates/backup-cronjob.yaml +++ b/stable/influxdb/templates/backup-cronjob.yaml @@ -41,7 +41,7 @@ spec: args: - '-c' - | - influxd backup -host {{ template "influxdb.fullname" . }}.{{ .Release.Namespace }}.svc:{{ .Values.config.rpc.bind_address }} -portable /backups/backup_$(date +%Y%m%d_%H%M%S) + influxd backup -host {{ template "influxdb.fullname" . }}.{{ .Release.Namespace }}.svc:{{ .Values.config.rpc.bind_address | default 8088 }} -portable /backups/backup_$(date +%Y%m%d_%H%M%S) containers: {{- if .Values.backup.gcs }} - name: gsutil-cp diff --git a/stable/influxdb/templates/config.yaml b/stable/influxdb/templates/config.yaml deleted file mode 100644 index aaa0cb9d2e..0000000000 --- a/stable/influxdb/templates/config.yaml +++ /dev/null @@ -1,170 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "influxdb.fullname" . }} - labels: - {{- include "influxdb.labels" . | nindent 4 }} -data: - influxdb.conf: |+ - reporting-disabled = {{ .Values.config.reporting_disabled | default false }} - bind-address = ":{{ .Values.config.rpc.bind_address }}" - - {{ if .Values.enterprise.enabled -}} - [enterprise] - license-key = {{ .Values.enterprise.licensekey | quote }} - [hinted-handoff] - enabled = true - dir = "{{ .Values.config.storage_directory }}/hh" - {{- end }} - - [meta] - dir = "{{ .Values.config.storage_directory }}/meta" - retention-autocreate = {{ .Values.config.meta.retention_autocreate }} - logging-enabled = {{ .Values.config.meta.logging_enabled }} - {{- if .Values.enterprise.enabled }} - internal-shared-secret = "{{ sha256sum .Values.enterprise.meta.seed }}" - meta-auth-enabled = {{ .Values.config.meta.authEnabled }} - {{- end }} - - [data] - dir = "{{ .Values.config.storage_directory }}/data" - wal-dir = "{{ .Values.config.storage_directory }}/wal" - query-log-enabled = {{ .Values.config.data.query_log_enabled }} - cache-max-memory-size = {{ .Values.config.data.cache_max_memory_size | int64 }} - cache-snapshot-memory-size = {{ .Values.config.data.cache_snapshot_memory_size | int64 }} - cache-snapshot-write-cold-duration = "{{ .Values.config.data.cache_snapshot_write_cold_duration }}" - compact-full-write-cold-duration = "{{ .Values.config.data.compact_full_write_cold_duration }}" - max-series-per-database = {{ .Values.config.data.max_series_per_database | int64 }} - max-values-per-tag = {{ .Values.config.data.max_values_per_tag | int64 }} - index-version = "{{ .Values.config.data.index_version }}" - trace-logging-enabled = {{ .Values.config.data.trace_logging_enabled }} - - [coordinator] - write-timeout = "{{ .Values.config.coordinator.write_timeout }}" - max-concurrent-queries = {{ .Values.config.coordinator.max_concurrent_queries | int64 }} - query-timeout = "{{ .Values.config.coordinator.query_timeout }}" - log-queries-after = "{{ .Values.config.coordinator.log_queries_after }}" - max-select-point = {{ .Values.config.coordinator.max_select_point | int64 }} - max-select-series = {{ .Values.config.coordinator.max_select_series | int64 }} - max-select-buckets = {{ .Values.config.coordinator.max_select_buckets | int64 }} - - [retention] - enabled = {{ .Values.config.retention.enabled }} - check-interval = "{{ .Values.config.retention.check_interval }}" - - [shard-precreation] - enabled = {{ .Values.config.shard_precreation.enabled }} - check-interval = "{{ .Values.config.shard_precreation.check_interval }}" - advance-period = "{{ .Values.config.shard_precreation.advance_period }}" - - [admin] - enabled = {{ .Values.config.admin.enabled }} - bind-address = ":{{ .Values.config.admin.bind_address }}" - https-enabled = {{ .Values.config.admin.https_enabled }} - https-certificate = "{{ .Values.config.admin.https_certificate }}" - - [monitor] - store-enabled = {{ .Values.config.monitor.store_enabled }} - store-database = "{{ .Values.config.monitor.store_database }}" - store-interval = "{{ .Values.config.monitor.store_interval }}" - - [subscriber] - enabled = {{ .Values.config.subscriber.enabled }} - http-timeout = "{{ .Values.config.subscriber.http_timeout }}" - insecure-skip-verify = {{ .Values.config.subscriber.insecure_skip_verify }} - ca-certs = "{{ .Values.config.subscriber.ca_certs }}" - write-concurrency = {{ .Values.config.subscriber.write_concurrency | int64 }} - write-buffer-size = {{ .Values.config.subscriber.write_buffer_size | int64 }} - - [http] - enabled = {{ .Values.config.http.enabled }} - bind-address = ":{{ .Values.config.http.bind_address }}" - flux-enabled = {{ .Values.config.http.flux_enabled }} - auth-enabled = {{ .Values.config.http.auth_enabled }} - log-enabled = {{ .Values.config.http.log_enabled }} - write-tracing = {{ .Values.config.http.write_tracing }} - pprof-enabled = {{ .Values.config.http.pprof_enabled }} - https-enabled = {{ .Values.config.http.https_enabled }} - https-certificate = "{{ .Values.config.http.https_certificate }}" - https-private-key = "{{ .Values.config.http.https_private_key }}" - max-row-limit = {{ .Values.config.http.max_row_limit | int64 }} - max-connection-limit = {{ .Values.config.http.max_connection_limit | int64 }} - shared-secret = "{{ .Values.config.http.shared_secret }}" - realm = "{{ .Values.config.http.realm }}" - unix-socket-enabled = {{ .Values.config.http.unix_socket_enabled }} - bind-socket = "{{ .Values.config.http.bind_socket }}" - - # TODO: allow multiple graphite listeners - - [[graphite]] - enabled = {{ .Values.config.graphite.enabled }} - bind-address = ":{{ .Values.config.graphite.bind_address }}" - database = "{{ .Values.config.graphite.database }}" - retention-policy = "{{ .Values.config.graphite.retention_policy }}" - protocol = "{{ .Values.config.graphite.protocol }}" - batch-size = {{ .Values.config.graphite.batch_size | int64 }} - batch-pending = {{ .Values.config.graphite.batch_pending | int64 }} - batch-timeout = "{{ .Values.config.graphite.batch_timeout }}" - consistency-level = "{{ .Values.config.graphite.consistency_level }}" - separator = "{{ .Values.config.graphite.separator }}" - udp-read-buffer = {{ .Values.config.graphite.udp_read_buffer | int64 }} - {{- if .Values.config.graphite.templates }} - templates = [ - {{- range .Values.config.graphite.templates }} - {{ quote . }}, - {{- end }} - ] - {{- end }} - - # TODO: allow multiple collectd listeners with templates - - [[collectd]] - enabled = {{ .Values.config.collectd.enabled }} - bind-address = ":{{ .Values.config.collectd.bind_address }}" - database = "{{ .Values.config.collectd.database }}" - retention-policy = "{{ .Values.config.collectd.retention_policy }}" - batch-size = {{ .Values.config.collectd.batch_size | int64 }} - batch-pending = {{ .Values.config.collectd.batch_pending | int64 }} - batch-timeout = "{{ .Values.config.collectd.batch_timeout }}" - read-buffer = {{ .Values.config.collectd.read_buffer | int64 }} - typesdb = "{{ .Values.config.collectd.typesdb }}" - security-level = "{{ .Values.config.collectd.security_level }}" - auth-file = "{{ .Values.config.collectd.auth_file }}" - - # TODO: allow multiple opentsdb listeners with templates - - [[opentsdb]] - enabled = {{ .Values.config.opentsdb.enabled }} - bind-address = ":{{ .Values.config.opentsdb.bind_address }}" - database = "{{ .Values.config.opentsdb.database }}" - retention-policy = "{{ .Values.config.opentsdb.retention_policy }}" - consistency-level = "{{ .Values.config.opentsdb.consistency_level }}" - tls-enabled = {{ .Values.config.opentsdb.tls_enabled }} - certificate = "{{ .Values.config.opentsdb.certificate }}" - batch-size = {{ .Values.config.opentsdb.batch_size | int64 }} - batch-pending = {{ .Values.config.opentsdb.batch_pending | int64 }} - batch-timeout = "{{ .Values.config.opentsdb.batch_timeout }}" - log-point-errors = {{ .Values.config.opentsdb.log_point_errors }} - - # TODO: allow multiple udp listeners with templates - - [[udp]] - enabled = {{ .Values.config.udp.enabled }} - bind-address = ":{{ .Values.config.udp.bind_address }}" - database = "{{ .Values.config.udp.database }}" - retention-policy = "{{ .Values.config.udp.retention_policy }}" - batch-size = {{ .Values.config.udp.batch_size | int64 }} - batch-pending = {{ .Values.config.udp.batch_pending | int64 }} - read-buffer = {{ .Values.config.udp.read_buffer | int64 }} - batch-timeout = "{{ .Values.config.udp.batch_timeout }}" - precision = "{{ .Values.config.udp.precision }}" - - [continuous_queries] - log-enabled = {{ .Values.config.continuous_queries.log_enabled }} - enabled = {{ .Values.config.continuous_queries.enabled }} - run-interval = "{{ .Values.config.continuous_queries.run_interval }}" - - [logging] - format = "{{ .Values.config.logging.format }}" - level = "{{ .Values.config.logging.level }}" - supress-logo = {{ .Values.config.logging.supress_logo }} diff --git a/stable/influxdb/templates/configmap.yaml b/stable/influxdb/templates/configmap.yaml new file mode 100644 index 0000000000..a686748881 --- /dev/null +++ b/stable/influxdb/templates/configmap.yaml @@ -0,0 +1,112 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "influxdb.fullname" . }} + labels: + {{- include "influxdb.labels" . | nindent 4 }} +data: + influxdb.conf: |+ + reporting-disabled = {{ .Values.config.reporting_disabled | default false }} + bind-address = ":{{ .Values.config.rpc.bind_address | default 8088 }}" + + [meta] + dir = "/var/lib/influxdb/meta" + {{- range $key, $value := index .Values.config.meta }} + {{ $key }} = {{ $value }} + {{- end }} + + {{- if .Values.enterprise.enabled }} + internal-shared-secret = "{{ sha256sum .Values.enterprise.meta.seed }}" + meta-auth-enabled = {{ .Values.config.meta.authEnabled }} + {{- end }} + + [data] + dir = "/var/lib/influxdb/data" + wal-dir = "/var/lib/influxdb/wal" + {{- range $key, $value := index .Values.config.data }} + {{ $key }} = {{ $value }} + {{- end }} + + [coordinator] + {{- range $key, $value := index .Values.config.coordinator }} + {{ $key }} = {{ $value }} + {{- end }} + + [retention] + {{- range $key, $value := index .Values.config.retention }} + {{ $key }} = {{ $value }} + {{- end }} + + [shard-precreation] + {{- range $key, $value := index .Values.config.shard_precreation }} + {{ $key }} = {{ $value }} + {{- end }} + + [monitor] + {{- range $key, $value := index .Values.config.monitor }} + {{ $key }} = {{ $value }} + {{- end }} + + [subscriber] + {{- range $key, $value := index .Values.config.subscriber }} + {{ $key }} = {{ $value }} + {{- end }} + + [http] + {{- range $key, $value := index .Values.config.http }} + {{ $key }} = {{ $value }} + {{- end }} + + # TODO: allow multiple graphite listeners + + [[graphite]] + {{- range $key, $value := index .Values.config.graphite }} + {{ $key }} = {{ $value }} + {{- end }} + {{- if .Values.config.graphite.templates }} + templates = [ + {{- range .Values.config.graphite.templates }} + {{ quote . }}, + {{- end }} + ] + {{- end }} + + # TODO: allow multiple collectd listeners with templates + + [[collectd]] + {{- range $key, $value := index .Values.config.collectd }} + {{ $key }} = {{ $value }} + {{- end }} + + # TODO: allow multiple opentsdb listeners with templates + + [[opentsdb]] + {{- range $key, $value := index .Values.config.opentsdb }} + {{ $key }} = {{ $value }} + {{- end }} + + # TODO: allow multiple udp listeners with templates + + [[udp]] + {{- range $key, $value := index .Values.config.udp }} + {{ $key }} = {{ $value }} + {{- end }} + + [continuous_queries] + {{- range $key, $value := index .Values.config.continuous_queries }} + {{ $key }} = {{ $value }} + {{- end }} + + [logging] + {{- range $key, $value := index .Values.config.logging }} + {{ $key }} = {{ $value }} + {{- end }} + + {{ if .Values.enterprise.enabled -}} + [enterprise] + license-key = {{ .Values.enterprise.licensekey | quote }} + + [hinted-handoff] + enabled = true + dir = "/var/lib/influxdb/hh" + {{- end }} diff --git a/stable/influxdb/templates/meta-config.yaml b/stable/influxdb/templates/meta-configmap.yaml similarity index 51% rename from stable/influxdb/templates/meta-config.yaml rename to stable/influxdb/templates/meta-configmap.yaml index ae5992815e..8e312d1fa0 100644 --- a/stable/influxdb/templates/meta-config.yaml +++ b/stable/influxdb/templates/meta-configmap.yaml @@ -9,26 +9,27 @@ metadata: data: influxdb-meta.conf: |+ reporting-disabled = {{ .Values.config.reporting_disabled | default false }} - bind-address = ":{{ .Values.config.meta.bind_address }}" + bind-address = ":{{ .Values.config.meta.bind_address | default 8091 }}" [enterprise] license-key = {{ .Values.enterprise.licensekey | quote }} [meta] - dir = "{{ .Values.config.storage_directory }}/meta" - retention-autocreate = {{ .Values.config.meta.retention_autocreate }} - logging-enabled = {{ .Values.config.meta.logging_enabled }} - internal-shared-secret = "{{ sha256sum .Values.enterprise.meta.seed }}" + dir = "/var/lib/influxdb/meta" + {{- range $key, $value := index .Values.config.meta }} + {{ $key }} = {{ $value }} + {{- end }} {{- if .Values.enterprise.enabled }} meta-auth-enabled = {{ .Values.config.meta.authEnabled }} {{- end }} [logging] - format = "{{ .Values.config.logging.format }}" - level = "{{ .Values.config.logging.level }}" - supress-logo = {{ .Values.config.logging.supress_logo }} + {{- range $key, $value := index .Values.config.logging }} + {{ $key }} = {{ $value }} + {{- end }} [tls] - min-version = "" - max-version = "" + {{- range $key, $value := index .Values.config.tls }} + {{ $key }} = {{ $value }} + {{- end }} {{- end }} diff --git a/stable/influxdb/templates/meta-service.yaml b/stable/influxdb/templates/meta-service.yaml index 32606f3de7..78d18e5ebe 100644 --- a/stable/influxdb/templates/meta-service.yaml +++ b/stable/influxdb/templates/meta-service.yaml @@ -17,7 +17,7 @@ spec: publishNotReadyAddresses: true ports: - name: meta - port: {{ .Values.config.meta.bind_address }} + port: {{ .Values.config.meta.bind_address | default 8091 }} targetPort: meta selector: {{- include "influxdb.selectorLabels" . | nindent 4 }} diff --git a/stable/influxdb/templates/meta-statefulset.yaml b/stable/influxdb/templates/meta-statefulset.yaml index e7f8410117..df41471992 100644 --- a/stable/influxdb/templates/meta-statefulset.yaml +++ b/stable/influxdb/templates/meta-statefulset.yaml @@ -38,11 +38,11 @@ spec: {{ toYaml .Values.enterprise.meta.resources | indent 10 }} ports: - name: udp - containerPort: {{ .Values.config.udp.bind_address }} + containerPort: {{ .Values.config.udp.bind_address | default 8089 }} - name: rpc - containerPort: {{ .Values.config.rpc.bind_address }} + containerPort: {{ .Values.config.rpc.bind_address | default 8088 }} - name: meta - containerPort: {{ .Values.config.meta.bind_address }} + containerPort: {{ .Values.config.meta.bind_address | default 8091 }} {{- if .Values.env }} env: {{ toYaml .Values.env | indent 10 }} @@ -72,7 +72,7 @@ spec: {{- end }} volumeMounts: - name: {{ include "influxdb.fullname" . }}-meta - mountPath: {{ .Values.config.storage_directory }} + mountPath: /var/lib/influxdb - name: config mountPath: /etc/influxdb {{- if .Values.initScripts.enabled }} diff --git a/stable/influxdb/templates/post-install-set-auth.yaml b/stable/influxdb/templates/post-install-set-auth.yaml index 05981aa596..9a806a8636 100644 --- a/stable/influxdb/templates/post-install-set-auth.yaml +++ b/stable/influxdb/templates/post-install-set-auth.yaml @@ -41,7 +41,7 @@ spec: - "/bin/sh" - "-c" - | - curl -X POST http://{{ template "influxdb.fullname" . }}:{{ .Values.config.http.bind_address }}/query \ + curl -X POST http://{{ template "influxdb.fullname" . }}:{{ .Values.config.http.bind_address | default 8086 }}/query \ --data-urlencode \ "q=CREATE USER \"${INFLUXDB_USER}\" WITH PASSWORD '${INFLUXDB_PASSWORD}' {{ .Values.setDefaultUser.user.privileges }}" restartPolicy: {{ .Values.setDefaultUser.restartPolicy }} diff --git a/stable/influxdb/templates/service.yaml b/stable/influxdb/templates/service.yaml index f204109390..e11cf119a5 100644 --- a/stable/influxdb/templates/service.yaml +++ b/stable/influxdb/templates/service.yaml @@ -11,40 +11,31 @@ metadata: spec: type: {{ .Values.service.type }} ports: - {{- if .Values.config.http.enabled }} - name: api - port: {{ .Values.config.http.bind_address }} + port: {{ .Values.config.http.bind_address | default 8086 }} targetPort: api - {{- end }} - {{- if .Values.config.admin.enabled }} - - name: admin - port: {{ .Values.config.admin.bind_address }} - targetPort: admin - {{- end }} + - name: rpc + port: {{ .Values.config.rpc.bind_address | default 8088 }} + targetPort: rpc {{- if .Values.config.graphite.enabled }} - name: graphite - port: {{ .Values.config.graphite.bind_address }} + port: {{ .Values.config.graphite.bind_address | default 2003 }} targetPort: graphite {{- end }} {{- if .Values.config.collectd.enabled }} - name: collectd - port: {{ .Values.config.collectd.bind_address }} + port: {{ .Values.config.collectd.bind_address | default 25826 }} targetPort: collectd {{- end }} {{- if .Values.config.udp.enabled }} - name: udp - port: {{ .Values.config.udp.bind_address }} + port: {{ .Values.config.udp.bind_address | default 8089 }} targetPort: udp {{- end }} {{- if .Values.config.opentsdb.enabled }} - name: opentsdb - port: {{ .Values.config.opentsdb.bind_address }} + port: {{ .Values.config.opentsdb.bind_address | default 4242 }} targetPort: opentsdb {{- end }} - {{- if .Values.config.rpc.enabled }} - - name: rpc - port: {{ .Values.config.rpc.bind_address }} - targetPort: rpc - {{- end }} selector: {{- include "influxdb.selectorLabels" . | nindent 4 }} diff --git a/stable/influxdb/templates/statefulset.yaml b/stable/influxdb/templates/statefulset.yaml index 73444dcd75..8eae171062 100644 --- a/stable/influxdb/templates/statefulset.yaml +++ b/stable/influxdb/templates/statefulset.yaml @@ -53,32 +53,28 @@ spec: {{ toYaml .Values.resources | indent 10 }} ports: - name: api - containerPort: {{ .Values.config.http.bind_address }} - {{- if .Values.config.admin.enabled }} - - name: admin - containerPort: {{ .Values.config.admin.bind_address }} - {{- end }} + containerPort: {{ .Values.config.http.bind_address | default 8086 }} {{- if .Values.config.graphite.enabled }} - name: graphite - containerPort: {{ .Values.config.graphite.bind_address }} + containerPort: {{ .Values.config.graphite.bind_address | default 2003 }} {{- end }} {{- if .Values.config.collectd.enabled }} - name: collectd - containerPort: {{ .Values.config.collectd.bind_address }} + containerPort: {{ .Values.config.collectd.bind_address | default 25826 }} {{- end }} {{- if .Values.config.udp.enabled }} - name: udp - containerPort: {{ .Values.config.udp.bind_address }} + containerPort: {{ .Values.config.udp.bind_address | default 8089 }} {{- end }} {{- if .Values.config.opentsdb.enabled }} - name: opentsdb - containerPort: {{ .Values.config.opentsdb.bind_address }} + containerPort: {{ .Values.config.opentsdb.bind_address | default 4242 }} {{- end }} {{- if .Values.enterprise.enabled }} - name: rpc - containerPort: {{ .Values.config.rpc.bind_address }} + containerPort: {{ .Values.config.rpc.bind_address | default 8088 }} - name: meta - containerPort: {{ .Values.config.meta.bind_address }} + containerPort: {{ .Values.config.meta.bind_address | default 8091 }} {{- end }} {{- if .Values.env }} env: @@ -110,7 +106,7 @@ spec: {{- end }} volumeMounts: - name: {{ include "influxdb.fullname" . }}-data - mountPath: {{ .Values.config.storage_directory }} + mountPath: /var/lib/influxdb - name: config mountPath: /etc/influxdb {{- if .Values.initScripts.enabled }} diff --git a/stable/influxdb/values.yaml b/stable/influxdb/values.yaml index 52e82cee7b..4116c83257 100644 --- a/stable/influxdb/values.yaml +++ b/stable/influxdb/values.yaml @@ -173,135 +173,26 @@ env: {} # - name: INFLUXDB_DB # value: "demo" -## Change InfluxDB configuration parameters below: -## Defaults are indicated +## InfluxDB configuration ## ref: https://docs.influxdata.com/influxdb/v1.7/administration/config config: reporting_disabled: false - storage_directory: /var/lib/influxdb - rpc: - enabled: true - bind_address: 8088 - meta: - bind_address: 8091 - retention_autocreate: true - logging_enabled: true - authEnabled: false - data: - query_log_enabled: true - cache_max_memory_size: 1073741824 - cache_snapshot_memory_size: 26214400 - cache_snapshot_write_cold_duration: 10m0s - compact_full_write_cold_duration: 4h0m0s - max_series_per_database: 1000000 - max_values_per_tag: 100000 - index_version: inmem - trace_logging_enabled: false - coordinator: - write_timeout: 10s - max_concurrent_queries: 0 - query_timeout: 0s - log_queries_after: 0s - max_select_point: 0 - max_select_series: 0 - max_select_buckets: 0 - retention: - enabled: true - check_interval: 30m0s - shard_precreation: - enabled: true - check_interval: 10m0s - advance_period: 30m0s - admin: - enabled: false - bind_address: 8083 - https_enabled: false - https_certificate: /etc/ssl/influxdb.pem - monitor: - store_enabled: true - store_database: _internal - store_interval: 10s - subscriber: - enabled: true - http_timeout: 30s - insecure_skip_verify: false - ca_certs: "" - write_concurrency: 40 - write_buffer_size: 1000 - http: - enabled: true - bind_address: 8086 - auth_enabled: false - flux_enabled: true - log_enabled: true - write_tracing: false - pprof_enabled: true - https_enabled: false - https_certificate: /etc/ssl/influxdb.pem - https_private_key: "" - max_row_limit: 10000 - max_connection_limit: 0 - shared_secret: "beetlejuicebeetlejuicebeetlejuice" - realm: InfluxDB - unix_socket_enabled: false - bind_socket: /var/run/influxdb.sock - graphite: - enabled: false - bind_address: 2003 - database: graphite - retention_policy: autogen - protocol: tcp - batch_size: 5000 - batch_pending: 10 - batch_timeout: 1s - consistency_level: one - separator: . - udp_read_buffer: 0 - # Uncomment to define graphite templates - # templates: - # - "graphite.metric.*.*.* measurement.run" - collectd: - enabled: false - bind_address: 25826 - database: collectd - retention_policy: autogen - batch_size: 5000 - batch_pending: 10 - batch_timeout: 10s - read_buffer: 0 - typesdb: /usr/share/collectd/types.db - security_level: none - auth_file: /etc/collectd/auth_file - opentsdb: - enabled: false - bind_address: 4242 - database: opentsdb - retention_policy: autogen - consistency_level: one - tls_enabled: false - certificate: /etc/ssl/influxdb.pem - batch_size: 1000 - batch_pending: 5 - batch_timeout: 1s - log_point_errors: true - udp: - enabled: false - bind_address: 8089 - database: udp - retention_policy: autogen - batch_size: 5000 - batch_pending: 10 - read_buffer: 0 - batch_timeout: 1s - precision: "ns" - continuous_queries: - log_enabled: true - enabled: true - run_interval: 1s - logging: - format: auto - level: info - supress_logo: false + rpc: {} + meta: {} + data: {} + coordinator: {} + retention: {} + shard_precreation: {} + monitor: {} + http: {} + logging: {} + subscriber: {} + graphite: {} + collectd: {} + opentsdb: {} + udp: {} + continuous_queries: {} + tls: {} # Allow executing custom init scripts #