Unverified Commit 029be1e8 by Denise Committed by GitHub

Merge pull request #95 from ekristen/feature/thanos-support

Feature: thanos support
parents 39571689 474375ed
......@@ -26,7 +26,7 @@ spec:
image: {{ template "system_default_registry" . }}{{ .Values.image.proxy.repository }}:{{ .Values.image.proxy.tag }}
ports:
- containerPort: 8080
name: http
name: nginx-http
protocol: TCP
{{- if and .Values.resources .Values.resources.proxy }}
resources:
......@@ -108,6 +108,14 @@ spec:
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.thanos.enabled }}
thanos:
baseImage: {{ template "system_default_registry" . }}{{ .Values.image.thanos.repository }}
version: {{ .Values.image.thanos.tag }}
objectStorageConfig:
key: thanos.yaml
name: {{ template "app.thanos.fullname" . }}
{{- end }}
nodeSelector:
{{- include "linux-node-selector" . | nindent 4 }}
{{- range .Values.nodeSelectors }}
......
......@@ -25,4 +25,20 @@ metadata:
name: {{ template "app.fullname" . }}-additional-alertmanager-configs
stringData:
additional-alertmanager-configs.yaml: {{ template "additional-alertmanager-configs.yaml" . }}
{{- end }}
\ No newline at end of file
{{- end }}
{{- if .Values.thanos.enabled }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ template "app.thanos.fullname" . }}
labels:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
stringData:
thanos.yaml: |-
{{ toYaml .Values.thanos.objectConfig | indent 6 }}
{{- end }}
......@@ -16,6 +16,34 @@ spec:
chart: {{ template "app.version" . }}
release: {{ .Release.Name }}
ports:
- name: http
- name: nginx-http
port: 80
targetPort: http
targetPort: nginx-http
{{- if .Values.thanos.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: access-thanos
labels:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
kubernetes.io/cluster-service: "true"
spec:
type: ClusterIP
sessionAffinity: ClientIP
selector:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
release: {{ .Release.Name }}
ports:
- name: thanos-grpc
port: 10901
targetPort: 10901
- name: thanos-http
port: 10902
targetPort: 10902
{{- end }}
......@@ -75,3 +75,9 @@ additionalAlertManagerConfigs: []
istioMonitoring:
enabled: true
namespace: istio-system
thanos:
enabled: false
## ObjectStoreConfig
## Ref: https://github.com/thanos-io/thanos/blob/master/docs/storage.md
objectConfig: {}
......@@ -56,6 +56,10 @@
{{- printf "%s-%s-cleanup" $name .Release.Name -}}
{{- end -}}
{{- define "app.thanos.fullname" -}}
{{- $name := include "app.name" . -}}
{{- printf "%s-%s-thanos" $name .Release.Name -}}
{{- end -}}
{{- define "kube_version" -}}
{{- printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor -}}
......
......@@ -317,6 +317,9 @@ prometheus:
proxy:
repository: rancher/nginx
tag: 1.17.4-alpine
thanos:
repository: rancher/thanos
tag: v0.9.0
nodeSelectors: []
resources:
core:
......@@ -371,6 +374,8 @@ prometheus:
clusterDisplayName: ""
cluster:
alertManagerNamespace: ""
thanos:
enabled: false
global:
systemDefaultRegistry: ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment