Skip to content

Commit

Permalink
Feature: Add extra containers to loki helm chart (grafana#909)
Browse files Browse the repository at this point in the history
* Add extra containers feature to loki chart

* minor bump version to loki helm charts
  • Loading branch information
angelbarrera92 authored and cyriltovena committed Oct 1, 2019
1 parent f92fedc commit 0b2d802
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 2 deletions.
2 changes: 1 addition & 1 deletion production/helm/loki-stack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: loki-stack
version: 0.16.5
version: 0.17.0
appVersion: v0.3.0
kubeVersion: "^1.10.0-0"
description: "Loki: like Prometheus, but for logs."
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: loki
version: 0.14.3
version: 0.15.0
appVersion: v0.3.0
kubeVersion: "^1.10.0-0"
description: "Loki: like Prometheus, but for logs."
Expand Down
3 changes: 3 additions & 0 deletions production/helm/loki/templates/service-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ spec:
protocol: TCP
name: http-metrics
targetPort: http-metrics
{{- if .Values.extraPorts }}
{{ toYaml .Values.extraPorts | indent 4}}
{{- end }}
selector:
app: {{ template "loki.name" . }}
release: {{ .Release.Name }}
3 changes: 3 additions & 0 deletions production/helm/loki/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
targetPort: http-metrics
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
{{- if .Values.extraPorts }}
{{ toYaml .Values.extraPorts | indent 4}}
{{- end }}
selector:
app: {{ template "loki.name" . }}
Expand Down
6 changes: 6 additions & 0 deletions production/helm/loki/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ spec:
- name: JAEGER_AGENT_HOST
value: "{{ .Values.tracing.jaegerAgentHost }}"
{{- end }}
{{- if .Values.extraContainers }}
{{ toYaml .Values.extraContainers | indent 8}}
{{- end }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
affinity:
Expand All @@ -84,6 +87,9 @@ spec:
- name: config
secret:
secretName: {{ template "loki.fullname" . }}
{{- if .Values.extraVolumes }}
{{ toYaml .Values.extraVolumes | indent 8}}
{{- end }}
{{- if not .Values.persistence.enabled }}
- name: storage
emptyDir: {}
Expand Down
29 changes: 29 additions & 0 deletions production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,32 @@ serviceMonitor:
interval: ""
additionalLabels: {}
# scrapeTimeout: 10s

extraContainers: []
## Additional containers to be added to the loki pod.
# - name: reverse-proxy
# image: angelbarrera92/basic-auth-reverse-proxy:dev
# args:
# - "serve"
# - "--upstream=http://localhost:3100"
# - "--auth-config=/etc/reverse-proxy-conf/authn.yaml"
# ports:
# - name: http
# containerPort: 11811
# protocol: TCP
# volumeMounts:
# - name: reverse-proxy-auth-config
# mountPath: /etc/reverse-proxy-conf

extraVolumes: []
## Additional volumes to the loki pod.
# - name: reverse-proxy-auth-config
# secret:
# secretName: reverse-proxy-auth-config

extraPorts: []
## Additional ports to the loki services. Useful to expose extra container ports.
# - port: 11811
# protocol: TCP
# name: http
# targetPort: http

0 comments on commit 0b2d802

Please sign in to comment.