Commit d737673e authored by Jack Zampolin's avatar Jack Zampolin

Make deployment not work unless influxdb url is set

parent ac620766
......@@ -11,4 +11,4 @@ To tail the logs for a Telegraf pod in the Daemonset run the following:
To watch for the LoadBalancer IP run the following
- kubectl get svc -w --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }}
{{- end }}
\ No newline at end of file
{{- end }}
{{- if gt (len .Values.single.config.outputs.influxdb.urls) 0 }}
{{- if .Values.single.enabled -}}
apiVersion: v1
kind: ConfigMap
......@@ -14,4 +15,5 @@ data:
{{ template "agent" .Values.single.config.agent }}
{{ template "outputs" .Values.single.config.outputs }}
{{ template "inputs" .Values.single.config.inputs -}}
{{- end -}}
{{- end -}}
\ No newline at end of file
{{- if gt (len .Values.daemonset.config.outputs.influxdb.urls) 0 }}
{{- if .Values.daemonset.enabled -}}
apiVersion: v1
kind: ConfigMap
......@@ -14,4 +15,5 @@ data:
{{ template "agent" .Values.daemonset.config.agent }}
{{ template "outputs" .Values.daemonset.config.outputs }}
{{ template "inputs" .Values.daemonset.config.inputs -}}
{{- end -}}
{{- end -}}
\ No newline at end of file
{{- if gt (len .Values.daemonset.config.outputs.influxdb.urls) 0 }}
{{- if .Values.daemonset.enabled -}}
apiVersion: extensions/v1beta1
kind: DaemonSet
......@@ -59,4 +60,5 @@ spec:
- name: config
configMap:
name: {{ template "fullname" . }}-ds
{{- end -}}
{{- end -}}
\ No newline at end of file
{{- if gt (len .Values.single.config.outputs.influxdb.urls) 0 }}
{{- if .Values.single.enabled -}}
apiVersion: extensions/v1beta1
kind: Deployment
......@@ -27,4 +28,5 @@ spec:
- name: config
configMap:
name: {{ template "fullname" . }}-s
{{- end -}}
{{- end -}}
\ No newline at end of file
{{- if gt (len .Values.single.config.outputs.influxdb.urls) 0 }}
{{- if .Values.single.enabled -}}
{{- if .Values.single.service.enabled -}}
apiVersion: v1
......@@ -39,4 +40,5 @@ spec:
selector:
app: {{ template "fullname" . }}-s
{{- end -}}
{{- end -}}
{{- end -}}
\ No newline at end of file
......@@ -41,8 +41,8 @@ daemonset:
omit_hostname: false
outputs:
influxdb:
urls:
- "http://influxdb-influxdb.tick:8086"
urls: []
# - "http://influxdb-influxdb.tick:8086"
database: "telegraf"
## retention_policy: ""
## write_consistency: "any"
......@@ -175,8 +175,8 @@ single:
omit_hostname: false
outputs:
influxdb:
urls:
- "http://influxdb-influxdb.tick:8086"
urls: []
# - "http://influxdb-influxdb.tick:8086"
database: "telegraf"
## retention_policy: ""
## write_consistency: "any"
......
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