UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects

dig some values in case the values are not set

Merged Michael Martin requested to merge fix-thanos-values into master
@@ -40,6 +40,7 @@ istio:
thanos:
gateways:
- istio-system/{{ default "public" .Values.addons.thanos.ingress.gateway }}
{{- with .Values.addons.thanos.objectStorage }}
{{- if and (eq $.Values.addons.thanos.strategy "scalable") (not (and .endpoint .region)) }}
minio:
@@ -60,6 +61,11 @@ monitoring:
storegateway:
enabled: false
{{- if .Values.kiali.enabled }}
podLabels:
{{- include "kialiAppLabel" . | nindent 4 }}
{{- include "kialiVersionLabel" . | nindent 4 }}
{{- end }}
query:
dnsDiscovery:
@@ -78,15 +84,65 @@ query:
{{- if (dig "values" "storegateway" "enabled" false .Values.addons.thanos) }}
- dns+thanos-storegateway.thanos.svc.cluster.local:10901
{{- end }}
{{- if .Values.addons.thanos.sso.enabled }}
{{- $thanosAuthserviceKey := (dig "selector" "key" "protect" .Values.addons.authservice.values) }}
{{- $thanosAuthserviceValue := (dig "selector" "value" "keycloak" .Values.addons.authservice.values) }}
{{- if or .Values.addons.thanos.sso.enabled .Values.kiali.enabled }}
podLabels:
{{- if .Values.addons.thanos.sso.enabled }}
{{- $thanosAuthserviceKey := (dig "selector" "key" "protect" .Values.addons.authservice.values) }}
{{- $thanosAuthserviceValue := (dig "selector" "value" "keycloak" .Values.addons.authservice.values) }}
{{ $thanosAuthserviceKey }}: {{ $thanosAuthserviceValue }}
{{- end }}
{{- if .Values.kiali.enabled }}
{{- include "kialiAppLabel" . | nindent 4 }}
{{- include "kialiVersionLabel" . | nindent 4 }}
{{- end }}
{{- end }}
{{- if not (.Values.addons.thanos.objectStorage.endpoint | empty) }}
{{- if and (dig "queryFrontend" "enabled" true .Values.addons.thanos.values) $.Values.kiali.enabled }}
queryFrontend:
podLabels:
{{- include "kialiAppLabel" . | nindent 4 }}
{{- include "kialiVersionLabel" . | nindent 4 }}
{{- end }}
{{- if and (dig "bucketweb" "enabled" false .Values.addons.thanos.values) .Values.kiali.enabled }}
bucketweb:
podLabels:
{{- include "kialiAppLabel" . | nindent 4 }}
{{- include "kialiVersionLabel" . | nindent 4 }}
{{- end }}
{{- if and (dig "ruler" "enabled" false .Values.addons.thanos.values) .Values.kiali.enabled }}
ruler:
podLabels:
{{- include "kialiAppLabel" . | nindent 4 }}
{{- include "kialiVersionLabel" . | nindent 4 }}
{{- end }}
{{- if and (dig "receive" "enabled" false .Values.addons.thanos.values) .Values.kiali.enabled }}
receive:
podLabels:
{{- include "kialiAppLabel" . | nindent 4 }}
{{- include "kialiVersionLabel" . | nindent 4 }}
{{- end }}
{{- if and (dig "bucketweb" "enabled" false .Values.addons.thanos.values) .Values.kiali.enabled }}
receiveDistributor:
podLabels:
{{- include "kialiAppLabel" . | nindent 4 }}
{{- include "kialiVersionLabel" . | nindent 4 }}
{{- end }}
{{- if or (dig "compactor" "enabled" false .Values.addons.thanos.values) (not (.Values.addons.thanos.objectStorage.endpoint | empty)) }}
compactor:
enabled: true
{{- if .Values.kiali.enabled }}
podLabels:
{{- include "kialiAppLabel" . | nindent 4 }}
{{- include "kialiVersionLabel" . | nindent 4 }}
{{- end }}
{{- end }}
{{- if not (.Values.addons.thanos.objectStorage.endpoint | empty) }}
objstoreConfig: |-
type: s3
config:
@@ -101,12 +157,8 @@ storegateway:
useEndpointGroup: true
endpoint: {{ .Values.addons.thanos.objectStorage.endpoint }}
compactor:
enabled: true
query:
extraFlags:
- "--endpoint=dns+monitoring-monitoring-kube-thanos-discovery.monitoring.svc.cluster.local:{{- dig "values" "query" "containerPorts" "grpc" 10901 .Values.addons.thanos }}"
{{- end }}
{{- end }}
Loading