Issue-ID: RICAPP-169 - Inclusion of InfluxDB helm chart for KPIMON, AD, TS, QP xApps
[ric-plt/ric-dep.git] / helm / 3rdparty / influxdb / templates / service.yaml
diff --git a/helm/3rdparty/influxdb/templates/service.yaml b/helm/3rdparty/influxdb/templates/service.yaml
new file mode 100644 (file)
index 0000000..c5121e5
--- /dev/null
@@ -0,0 +1,53 @@
+apiVersion: v1
+kind: Service
+metadata:
+{{- if .Values.service.annotations }}
+  annotations:
+{{ toYaml .Values.service.annotations | indent 4 }}
+{{- end }}
+  name: {{ include "influxdb.fullname" . }}
+  labels:
+    {{- include "influxdb.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+  - name: api
+    port: {{ .Values.config.http.bind_address | default 8086 }}
+    targetPort: api
+  - 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 | default 2003 }}
+    targetPort: graphite
+  {{- end }}
+  {{- if .Values.config.collectd.enabled }}
+  - name: collectd
+    port: {{ .Values.config.collectd.bind_address | default 25826 }}
+    protocol: UDP
+    targetPort: collectd
+  {{- end }}
+  {{- if .Values.config.udp.enabled }}
+  - name: udp
+    port: {{ .Values.config.udp.bind_address | default 8089 }}
+    protocol: UDP
+    targetPort: udp
+  {{- end }}
+  {{- if .Values.config.opentsdb.enabled }}
+  - name: opentsdb
+    port: {{ .Values.config.opentsdb.bind_address | default 4242 }}
+    targetPort: opentsdb
+  {{- end }}
+  selector:
+    {{- include "influxdb.selectorLabels" . | nindent 4 }}
+{{- if .Values.service.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.service.loadBalancerIP }}
+{{- end }}
+{{- if .Values.service.externalIPs }}
+  externalIPs:
+{{ toYaml .Values.service.externalIPs | indent 4 }}
+{{- end }}
+{{- if .Values.service.externalTrafficPolicy }}
+  externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
+{{- end }}