147 lines
4.4 KiB
YAML
147 lines
4.4 KiB
YAML
{{- if .Values.karma.enabled }}
|
|
---
|
|
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
kind: HelmRelease
|
|
metadata:
|
|
name: karma
|
|
spec:
|
|
chart:
|
|
spec:
|
|
sourceRef:
|
|
kind: HelmRepository
|
|
name: "wiremind"
|
|
chart: "karma"
|
|
install:
|
|
{{- toYaml .Values.commons.helm.release.install | nindent 4 }}
|
|
test:
|
|
{{- toYaml .Values.commons.helm.release.test | nindent 4 }}
|
|
upgrade:
|
|
{{- toYaml .Values.commons.helm.release.upgrade | nindent 4 }}
|
|
driftDetection:
|
|
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
|
interval: 10m
|
|
values:
|
|
configMap:
|
|
enabled: true
|
|
rawConfig:
|
|
karma:
|
|
name: "Alerts"
|
|
{{- with .Values.commons.auth }}
|
|
{{- if and .enabled (eq .type "authentik") (not $.Values.karma.auth.anonymous.enabled) }}
|
|
authentication:
|
|
header:
|
|
name: "X-authentik-username"
|
|
value_re: "^(.+)$"
|
|
group_name: "X-authentik-groups"
|
|
group_value_re: "^(.+)$"
|
|
group_value_separator: "|"
|
|
{{- end }}
|
|
{{- end }}
|
|
ui:
|
|
refresh: 10s
|
|
multiGridLabel: severity
|
|
grid:
|
|
sorting:
|
|
order: label
|
|
reverse: false
|
|
customValues:
|
|
labels:
|
|
severity:
|
|
critical: 1
|
|
warning: 2
|
|
info: 3
|
|
auto:
|
|
order:
|
|
- severity
|
|
labels:
|
|
valueOnly:
|
|
- alertname
|
|
- severity
|
|
strip:
|
|
- active
|
|
- load
|
|
- sub
|
|
- state
|
|
- fstype
|
|
- prometheus
|
|
- "@receiver"
|
|
- job
|
|
- service
|
|
- container
|
|
- endpoint
|
|
color:
|
|
unique:
|
|
- namespace
|
|
- "@cluster"
|
|
custom:
|
|
severity:
|
|
- value: info
|
|
color: "#87c4e0"
|
|
- value: warning
|
|
color: "#ffae42"
|
|
- value: critical
|
|
color: "#ff220c"
|
|
|
|
{{- with .Values.karma.filters.default }}
|
|
filters:
|
|
default:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
|
|
history:
|
|
enabled: true
|
|
timeout: 5s
|
|
workers: 5
|
|
|
|
alertmanager:
|
|
servers:
|
|
- name: "default"
|
|
uri: "http://alertmanager-operated:9093"
|
|
proxy: true
|
|
healthcheck:
|
|
filters:
|
|
watchdog:
|
|
- "alertname=Watchdog"
|
|
- "severity=none"
|
|
{{- with .Values.karma.additionalAlertmanager }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
|
|
{{- with .Values.karma.ingress }}
|
|
{{- if .enabled }}
|
|
{{- $host := .host | default (printf "karma.%s" $.Values.commons.ingress.domain) }}
|
|
ingress:
|
|
enabled: true
|
|
annotations:
|
|
{{- $annotations := mergeOverwrite (dict) $.Values.commons.ingress.annotations .annotations }}
|
|
{{- with $.Values.commons.auth }}
|
|
{{- if and .enabled (eq .type "authentik") (not $.Values.karma.auth.anonymous.enabled) }}
|
|
{{- $currentMiddleware := get $annotations "traefik.ingress.kubernetes.io/router.middlewares" }}
|
|
{{- if $currentMiddleware }}
|
|
{{- $_ := set $annotations "traefik.ingress.kubernetes.io/router.middlewares" (printf "%s,%s-mycloud-authentik-outpost@kubernetescrd" $currentMiddleware .namespace) }}
|
|
{{- else }}
|
|
{{- $_ := set $annotations "traefik.ingress.kubernetes.io/router.middlewares" (printf "%s-mycloud-authentik-outpost@kubernetescrd" .namespace) }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- toYaml $annotations | nindent 8 }}
|
|
hosts:
|
|
- "{{ $host }}"
|
|
path: "/"
|
|
{{- if $.Values.commons.ingress.tls.enabled }}
|
|
tls:
|
|
{{- with $.Values.commons.ingress.tls.override }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- else }}
|
|
- secretName: "infra-monitoring-karma-cert"
|
|
hosts:
|
|
- "{{ $host }}"
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}{{/* end-with karma.ingress */}}
|
|
serviceMonitor:
|
|
enabled: {{ (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") }}
|
|
additionalLabels:
|
|
{{- toYaml .Values.commons.prometheus.monitor.labels | nindent 8 }}
|
|
{{- end }}
|