Files
deprecated-helm-charts/stable/graylog/templates/master-service.yaml
T
Christian Kaatz 9d97716476 add customizations to graylog chart (#12363)
* add customizations to graylog chart

* master service port and annotations
* env vars for the pods through the stateful set

Signed-off-by: Christian Kaatz <chrkaatz@googlemail.com>

* incorporate whitespace suggestion from review

Signed-off-by: Christian Kaatz <chrkaatz@googlemail.com>
2019-03-21 03:13:36 -07:00

56 lines
1.9 KiB
YAML

apiVersion: v1
kind: Service
metadata:
{{- if .Values.graylog.service.master.annotations }}
annotations:
{{ toYaml .Values.graylog.service.master.annotations | indent 4 }}
{{- end }}
name: {{ template "graylog.fullname" . }}-master
labels:
app.kubernetes.io/name: {{ template "graylog.name" . }}
helm.sh/chart: {{ template "graylog.chart" . }}
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
graylog-role: "master"
spec:
ports:
- name: graylog
{{- if .Values.graylog.service.master.port }}
port: {{ default 9000 .Values.graylog.service.master.port }}
{{- else }}
port: {{ default 9000 .Values.graylog.service.port }}
{{- end }}
protocol: TCP
targetPort: 9000
{{- if contains "NodePort" .Values.graylog.service.type }}
{{- if .Values.graylog.service.nodePort }}
nodePort: {{ .Values.graylog.service.nodePort }}
{{- end }}
{{- end }}
{{- if .Values.graylog.service.externalIPs }}
externalIPs:
{{ toYaml .Values.graylog.service.externalIPs | indent 4 }}
{{- end }}
{{- if eq "ClusterIP" .Values.graylog.service.type }}
{{- if .Values.graylog.service.clusterIP }}
clusterIP: {{ .Values.graylog.service.clusterIP }}
{{- end }}
{{- end }}
selector:
app.kubernetes.io/name: {{ template "graylog.name" . }}
app.kubernetes.io/instance: "{{ .Release.Name }}"
graylog-role: "master"
type: "{{ .Values.graylog.service.type }}"
{{- if eq "LoadBalancer" .Values.graylog.service.type }}
{{- if .Values.graylog.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.graylog.service.loadBalancerIP }}
{{- end -}}
{{- if .Values.graylog.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{- range .Values.graylog.service.loadBalancerSourceRanges }}
- {{ . }}
{{- end }}
{{- end -}}
{{- end -}}