Skip to content

Commit

Permalink
syslogService config should be at top level
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Billimek <[email protected]>
  • Loading branch information
billimek committed Feb 6, 2020
1 parent f1df7a6 commit 74503ca
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 35 deletions.
4 changes: 2 additions & 2 deletions production/helm/promtail/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ spec:
ports:
- containerPort: {{ .Values.config.server.http_listen_port }}
name: http-metrics
{{- if .Values.config.server.syslogService.enabled }}
- containerPort: {{ .Values.config.server.syslogService.port }}
{{- if .Values.syslogService.enabled }}
- containerPort: {{ .Values.syslogService.port }}
name: syslog
{{- end }}
securityContext:
Expand Down
22 changes: 11 additions & 11 deletions production/helm/promtail/templates/service-syslog.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.config.server.syslogService.enabled }}
{{- if .Values.syslogService.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -9,29 +9,29 @@ metadata:
chart: {{ template "promtail.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.config.server.syslogService.labels }}
{{- with .Values.syslogService.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- toYaml .Values.config.server.syslogService.annotations | nindent 4 }}
{{- toYaml .Values.syslogService.annotations | nindent 4 }}
spec:
type: {{ .Values.config.server.syslogService.type }}
{{- if (and (eq .Values.config.server.syslogService.type "ClusterIP") (not (empty .Values.config.server.syslogService.clusterIP))) }}
clusterIP: {{ .Values.config.server.syslogService.clusterIP }}
type: {{ .Values.syslogService.type }}
{{- if (and (eq .Values.syslogService.type "ClusterIP") (not (empty .Values.syslogService.clusterIP))) }}
clusterIP: {{ .Values.syslogService.clusterIP }}
{{- end }}
{{- if .Values.config.server.syslogService.loadBalancerSourceRanges }}
{{- if .Values.syslogService.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{- range $cidr := .Values.config.server.syslogService.loadBalancerSourceRanges }}
{{- range $cidr := .Values.syslogService.loadBalancerSourceRanges }}
- {{ $cidr }}
{{- end }}
{{- end }}
ports:
- port: {{ .Values.config.server.syslogService.port }}
- port: {{ .Values.syslogService.port }}
protocol: TCP
name: syslog
targetPort: syslog
{{- if (and (eq .Values.config.server.syslogService.type "NodePort") (not (empty .Values.config.server.syslogService.nodePort))) }}
nodePort: {{ .Values.config.server.syslogService.nodePort }}
{{- 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}}
Expand Down
46 changes: 24 additions & 22 deletions production/helm/promtail/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,28 +128,6 @@ config:
server:
http_listen_port: 3101

syslogService:
enabled: false
type: ClusterIP
port: 1514
## Specify the nodePort value for the LoadBalancer and NodePort service types.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
##
# nodePort:
## Provide any additional annotations which may be required. This can be used to
## set the LoadBalancer service type to internal only.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
##
annotations: {}
labels: {}
## Use loadBalancerIP to request a specific static IP,
## otherwise leave blank
##
loadBalancerIP:
# loadBalancerSourceRanges: []
## Set the externalTrafficPolicy in the Service to either Cluster or Local
# externalTrafficPolicy: Cluster

positions:
filename: /run/promtail/positions.yaml
target_config:
Expand All @@ -164,3 +142,27 @@ serviceMonitor:

# Extra env variables to pass to the promtail container
env: []

# enable and configure if using the syslog scrape config
syslogService:
enabled: false
type: ClusterIP
port: 1514
## Specify the nodePort value for the LoadBalancer and NodePort service types.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
##
# nodePort:
## Provide any additional annotations which may be required. This can be used to
## set the LoadBalancer service type to internal only.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
##
annotations: {}
labels: {}
## Use loadBalancerIP to request a specific static IP,
## otherwise leave blank
##
loadBalancerIP:
# loadBalancerSourceRanges: []
## Set the externalTrafficPolicy in the Service to either Cluster or Local
# externalTrafficPolicy: Cluster

0 comments on commit 74503ca

Please sign in to comment.