mirror of https://github.com/grafana/loki
[promtail helm chart] Enable support for syslog service (#1617)
* Enable support for dynamic extra ports This should allow the chart to be configured for extra exposed ports like syslog (port 1514) for example Signed-off-by: Jeff Billimek <jeff@billimek.com> * making syslog its own optional service Signed-off-by: Jeff Billimek <jeff@billimek.com> * syslogService config should be at top level Signed-off-by: Jeff Billimek <jeff@billimek.com> * fixing linting error Signed-off-by: Jeff Billimek <jeff@billimek.com> * Enhancing chart documentation with syslog example Signed-off-by: Jeff Billimek <jeffrey_k_billimek@homedepot.com>pull/1697/head^2
parent
460bb5b857
commit
9fe1f13e3f
@ -0,0 +1,42 @@ |
||||
{{- if .Values.syslogService.enabled }} |
||||
apiVersion: v1 |
||||
kind: Service |
||||
metadata: |
||||
name: {{ template "promtail.fullname" . }}-syslog |
||||
namespace: {{ .Release.Namespace }} |
||||
labels: |
||||
app: {{ template "promtail.name" . }} |
||||
chart: {{ template "promtail.chart" . }} |
||||
release: {{ .Release.Name }} |
||||
heritage: {{ .Release.Service }} |
||||
{{- with .Values.syslogService.labels }} |
||||
{{- toYaml . | nindent 4 }} |
||||
{{- end }} |
||||
annotations: |
||||
{{- toYaml .Values.syslogService.annotations | nindent 4 }} |
||||
spec: |
||||
type: {{ .Values.syslogService.type }} |
||||
{{- if (and (eq .Values.syslogService.type "ClusterIP") (not (empty .Values.syslogService.clusterIP))) }} |
||||
clusterIP: {{ .Values.syslogService.clusterIP }} |
||||
{{- end }} |
||||
{{- if .Values.syslogService.loadBalancerSourceRanges }} |
||||
loadBalancerSourceRanges: |
||||
{{- range $cidr := .Values.syslogService.loadBalancerSourceRanges }} |
||||
- {{ $cidr }} |
||||
{{- end }} |
||||
{{- end }} |
||||
ports: |
||||
- port: {{ .Values.syslogService.port }} |
||||
protocol: TCP |
||||
name: syslog |
||||
targetPort: syslog |
||||
{{- if (and (eq .Values.syslogService.type "NodePort") (not (empty .Values.syslogService.nodePort))) }} |
||||
nodePort: {{ .Values.syslogService.nodePort }} |
||||
{{- end }} |
||||
{{- if .Values.extraPorts }} |
||||
{{ toYaml .Values.extraPorts | indent 4}} |
||||
{{- end }} |
||||
selector: |
||||
app: {{ template "promtail.name" . }} |
||||
release: {{ .Release.Name }} |
||||
{{- end }} |
Loading…
Reference in new issue