Skip to content

Commit

Permalink
Merge pull request grafana#479 from jmvizcainoio/master
Browse files Browse the repository at this point in the history
Added option that loki service run as nodeport
  • Loading branch information
davkal authored Apr 17, 2019
2 parents 907f9db + 43f4e1c commit 78a5de8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions production/helm/loki/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ metadata:
annotations:
{{- toYaml .Values.service.annotations | nindent 4 }}
spec:
type: {{ .Values.service.type }}
{{- if (and (eq .Values.service.type "ClusterIP") (not (empty .Values.service.clusterIP))) }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
ports:
- name: http-metrics
port: {{ .Values.service.port }}
- port: {{ .Values.service.port }}
protocol: TCP
name: http-metrics
targetPort: http-metrics
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
selector:
app: {{ template "loki.name" . }}
release: {{ .Release.Name }}

3 changes: 2 additions & 1 deletion production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ securityContext:
runAsUser: 10001

service:
type: ClusterIP
nodePort:
port: 3100
annotations: {}
labels: {}
Expand All @@ -131,4 +133,3 @@ terminationGracePeriodSeconds: 30
## Tolerations for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
tolerations: []

0 comments on commit 78a5de8

Please sign in to comment.