UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 50f27b7b authored by Micah Nagel's avatar Micah Nagel :moneybag:
Browse files

Merge branch 'bugfix/loki-deployment-conditionals' into 'master'

Removed promtail condition from Loki values check

See merge request platform-one/big-bang/bigbang!1588
parents a3ff7c29 4d3da71b
No related branches found
No related tags found
1 merge request!1588Removed promtail condition from Loki values check
Pipeline #1086383 passed with warnings
{{- if and (not .Values.offline) (or .Values.loki.enabled .Values.promtail.enabled) }}
{{- if and (not .Values.offline) .Values.loki.enabled }}
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
metadata:
......
{{- if or .Values.loki.enabled .Values.promtail.enabled }}
{{- if .Values.loki.enabled }}
{{- if ( include "imagePullSecret" . ) }}
apiVersion: v1
kind: Secret
......
{{- $fluxSettingsLoki := merge .Values.loki.flux .Values.flux -}}
{{- if or .Values.loki.enabled .Values.promtail.enabled }}
{{- if .Values.loki.enabled }}
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
......
{{- if or .Values.loki.enabled .Values.promtail.enabled }}
{{- if .Values.loki.enabled }}
{{- include "values-secret" (dict "root" $ "package" .Values.loki "name" "loki" "defaults" (include "bigbang.defaults.loki" .)) }}
{{- end }}
......@@ -35,7 +35,7 @@ monitoring:
{{- end }}
istio:
enabled: {{ .Values.istio.enabled }}
enabled: {{ .Values.istio.enabled }}
loki:
storage:
......
......@@ -37,10 +37,11 @@ spec:
kind: Secret
valuesKey: "overlays"
{{/* promtail _always_ depend on .Values.loki being enabled, so can assume they exist here */}}
dependsOn:
{{- if .Values.loki.enabled }}
- name: loki
namespace: {{ .Release.Namespace }}
{{- end }}
{{- if .Values.gatekeeper.enabled }}
- name: gatekeeper
namespace: {{ .Release.Namespace }}
......
......@@ -52,4 +52,11 @@ config:
- url: http://logging-loki-write.logging.svc.cluster.local:3100/loki/api/v1/push
{{- end }}
{{- end }}
# If loki is disabled and promtail is not
{{- if and (not .Values.loki.enabled) (.Values.promtail.enabled) }}
# Promtail must have config.clients provided
{{- if or (empty .Values.promtail.values.config) (empty .Values.promtail.values.config.clients) }}
{{- fail "If Promtail is enabled and Loki is disabled, at least one client must be provided via '.Values.promtail.values.config.clients'"}}
{{- end -}}
{{- end -}}
{{- end -}}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment