Unverified Commit e7e6493a authored by Abhimanyu Saharan's avatar Abhimanyu Saharan Committed by GitHub

Added metrics key to enable/disable internal metrics and minor bug fixes for influxdb2 (#237)

* Updated apiVersion for Helm v3 * Updated tag * Collect internal metrics if enabled * Enable port 8888 if metrics enabled * Bumped up chart version * Added icon from Github * Fixed typo * Keep PVC unless removed manually * Added securityContext * Added icon as required by v2 * Updated appVersion * Bumped up chart version * Added missing v in the tag * Updated appVersion for telegraf to match the tag * Added missing v for tag * Fixed input not defined issue * Updated Influxdb2 version * Update Chart.yaml
parent 4f1f7aca
apiVersion: v2 apiVersion: v2
appVersion: 2.0.0-rc appVersion: 2.0.2
name: influxdb2 name: influxdb2
description: A Helm chart for InfluxDB v2 description: A Helm chart for InfluxDB v2
home: https://www.influxdata.com/products/influxdb-overview/influxdb-2-0/ home: https://www.influxdata.com/products/influxdb-overview/influxdb-2-0/
type: application type: application
version: 1.0.11 version: 1.0.12
maintainers: maintainers:
- name: rawkode - name: rawkode
email: rawkode@influxdata.com email: rawkode@influxdata.com
- name: gitirabassi - name: gitirabassi
email: giacomo@influxdata.com email: giacomo@influxdata.com
icon: https://avatars0.githubusercontent.com/u/5713248?s=200&v=4
...@@ -16,7 +16,7 @@ spec: ...@@ -16,7 +16,7 @@ spec:
spec: spec:
containers: containers:
- name: {{ template "influxdb.fullname" . }}-create-admin-user - name: {{ template "influxdb.fullname" . }}-create-admin-user
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:v{{ .Chart.AppVersion }}"
env: env:
- name: INFLUXDB_PASSWORD - name: INFLUXDB_PASSWORD
valueFrom: valueFrom:
......
...@@ -5,6 +5,8 @@ metadata: ...@@ -5,6 +5,8 @@ metadata:
name: "{{- if not (empty .Values.persistence.name) }}{{ .Values.persistence.name }}{{- else }}{{ template "influxdb.fullname" . }}{{- end }}" name: "{{- if not (empty .Values.persistence.name) }}{{ .Values.persistence.name }}{{- else }}{{ template "influxdb.fullname" . }}{{- end }}"
labels: labels:
{{- include "influxdb.labels" . | nindent 4 }} {{- include "influxdb.labels" . | nindent 4 }}
annotations:
helm.sh/resource-policy: "keep"
spec: spec:
accessModes: accessModes:
- {{ .Values.persistence.accessMode | quote }} - {{ .Values.persistence.accessMode | quote }}
......
...@@ -30,12 +30,16 @@ spec: ...@@ -30,12 +30,16 @@ spec:
{{- end }} {{- end }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:v{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
ports: ports:
- name: http - name: http
containerPort: 8086 containerPort: 8086
protocol: TCP protocol: TCP
{{- if .Values.securityContext }}
securityContext:
{{ toYaml .Values.securityContext | nindent 12 }}
{{- end }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /health path: /health
......
...@@ -23,6 +23,8 @@ tolerations: [] ...@@ -23,6 +23,8 @@ tolerations: []
affinity: {} affinity: {}
securityContext: {}
## Create default user through Kubernetes job ## Create default user through Kubernetes job
## Defaults indicated below ## Defaults indicated below
## ##
......
apiVersion: v1 apiVersion: v2
name: telegraf name: telegraf
version: 1.7.32 version: 1.7.33
appVersion: 1.16 appVersion: 1.16
deprecated: false deprecated: false
description: Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics. description: Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.
...@@ -17,4 +17,4 @@ maintainers: ...@@ -17,4 +17,4 @@ maintainers:
email: rawkode@influxdata.com email: rawkode@influxdata.com
- name: gitirabassi - name: gitirabassi
email: giacomo@influxdata.com email: giacomo@influxdata.com
engine: gotpl icon: https://avatars0.githubusercontent.com/u/5713248?s=200&v=4
...@@ -11,6 +11,7 @@ data: ...@@ -11,6 +11,7 @@ data:
{{ template "processors" .Values.config.processors }} {{ template "processors" .Values.config.processors }}
{{ template "aggregators" .Values.config.aggregators }} {{ template "aggregators" .Values.config.aggregators }}
{{ template "outputs" .Values.config.outputs }} {{ template "outputs" .Values.config.outputs }}
{{- if .Values.metrics.health.enabled }}
[[outputs.health]] [[outputs.health]]
service_address = "http://:8888" service_address = "http://:8888"
[[outputs.health.compares]] [[outputs.health.compares]]
...@@ -19,5 +20,6 @@ data: ...@@ -19,5 +20,6 @@ data:
[[outputs.health.contains]] [[outputs.health.contains]]
field = "buffer_size" field = "buffer_size"
{{ template "inputs" .Values.config.inputs -}} {{ template "inputs" .Values.config.inputs -}}
{{- end }}
[[inputs.internal]] [[inputs.internal]]
collect_memstats = false collect_memstats = {{ .Values.metrics.collect_memstats }}
...@@ -12,9 +12,11 @@ metadata: ...@@ -12,9 +12,11 @@ metadata:
spec: spec:
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
ports: ports:
{{- if .Values.metrics.health.enabled }}
- port: 8888 - port: 8888
targetPort: 8888 targetPort: 8888
name: "health" name: "health"
{{- end }}
{{- range $objectKey, $objectValue := .Values.config.inputs }} {{- range $objectKey, $objectValue := .Values.config.inputs }}
{{- range $key, $value := . -}} {{- range $key, $value := . -}}
{{- $tp := typeOf $value -}} {{- $tp := typeOf $value -}}
......
...@@ -159,6 +159,11 @@ config: ...@@ -159,6 +159,11 @@ config:
allowed_pending_messages: 10000 allowed_pending_messages: 10000
percentile_limit: 1000 percentile_limit: 1000
metrics:
health:
enabled: false
collect_memstats: false
# Lifecycle hooks # Lifecycle hooks
# hooks: # hooks:
# postStart: ["/bin/sh", "-c", "echo Telegraf started"] # postStart: ["/bin/sh", "-c", "echo Telegraf started"]
......
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