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