chore(helm): Update configs

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
rjshrjndrn 2022-06-29 18:00:01 +02:00
parent d6e03aad52
commit 73902a73ef
3 changed files with 156 additions and 9 deletions

View file

@ -0,0 +1 @@
{"last_found_secrets": [{"name": "Generic High Entropy Secret - scripts/helm/app/chalice.yaml", "match": "1d1def20af0fd776f96e7d895df8731480019980c238549df0afe4280803b81a"}]}

View file

@ -14,15 +14,6 @@ config:
store: inmemory
replication_factor: 1
## Different ring configs can be used. E.g. Consul
# ring:
# store: consul
# replication_factor: 1
# consul:
# host: "consul:8500"
# prefix: ""
# http_client_timeout: "20s"
# consistent_reads: true
limits_config:
enforce_metric_name: false
reject_old_samples: true

View file

@ -0,0 +1,155 @@
## Update the following values
domainName: &domainName openreplay.mycorp.org
credentials:
grafana: &grafana
adminPassword: "grafanaAdminPassword"
alertManager: &alertmanager
slack_api_url: "https://hooks.slack.com/services/xxxx/xxxx/xxxxx"
## Custom configuration for Monitoring and logging stack
fullnameOverride: "openreplay"
grafana:
<<: *grafana
env:
GF_SERVER_ROOT_URL: http://grafana.local.com/grafana
additionalDataSources:
- name: loki
editable: true
type: loki
url: http://loki.logging:3100
ingress:
enabled: true
ingressClassName: openreplay
hosts:
- *domainName
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$1
path: /grafana/(.*)
tls:
- hosts:
- *domainName
secretName: openreplay-ssl
prometheus:
prometheusSpec:
storageSpec:
volumeClaimTemplate:
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 200Gi
alertmanager:
config:
global:
resolve_timeout: 5m
<<: *alertmanager
route:
# group_by: ['job']
group_by: ['alertname','container']
group_wait: 30s
group_interval: 5m
repeat_interval: 12h
receiver: 'slack'
routes:
- match:
alertname: Watchdog
receiver: 'slack'
receivers:
- name: slack
slack_configs:
- channel: '${CHANGE_ME_SLACK_CHANNEL}'
color: '{{ template "slack.color" . }}'
title: '{{ template "slack.title" . }}'
text: '{{ template "slack.text" . }}'
send_resolved: true
actions:
- type: button
text: 'Runbook :green_book:'
url: '{{ (index .Alerts 0).Annotations.runbook_url }}'
# - type: button
# text: 'Query :mag:'
# url: '{{ (index .Alerts 0).GeneratorURL }}'
# - type: button
# text: 'Dashboard :chart_with_upwards_trend:'
# url: '{{ (index .Alerts 0).Annotations.dashboard_url }}'
# - type: button
# text: 'Silence :no_bell:'
# url: '{{ template "__alert_silence_link" . }}'
templates:
- /etc/alertmanager/config/*.tmpl
templateFiles:
template_1.tmpl: |-
{{/* Alertmanager Silence link */}}
{{ define "__alert_silence_link" -}}
{{ .ExternalURL }}/#/silences/new?filter=%7B
{{- range .CommonLabels.SortedPairs -}}
{{- if ne .Name "alertname" -}}
{{- .Name }}%3D"{{- .Value -}}"%2C%20
{{- end -}}
{{- end -}}
alertname%3D"{{- .CommonLabels.alertname -}}"%7D
{{- end }}
{{/* Severity of the alert */}}
{{ define "__alert_severity" -}}
{{- if eq .CommonLabels.severity "critical" -}}
*Severity:* `Critical`
{{- else if eq .CommonLabels.severity "warning" -}}
*Severity:* `Warning`
{{- else if eq .CommonLabels.severity "info" -}}
*Severity:* `Info`
{{- else -}}
*Severity:* :question: {{ .CommonLabels.severity }}
{{- end }}
{{- end }}
{{/* Title of the Slack alert */}}
{{ define "slack.title" -}}
[{{ .Status | toUpper -}}
{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{- end -}}
] {{ .CommonLabels.alertname }}
{{- end }}
{{/* Color of Slack attachment (appears as line next to alert )*/}}
{{ define "slack.color" -}}
{{ if eq .Status "firing" -}}
{{ if eq .CommonLabels.severity "warning" -}}
warning
{{- else if eq .CommonLabels.severity "critical" -}}
danger
{{- else -}}
#439FE0
{{- end -}}
{{ else -}}
good
{{- end }}
{{- end }}
{{/* The text to display in the alert */}}
{{ define "slack.text" -}}
{{ template "__alert_severity" . }}
{{- if (index .Alerts 0).Annotations.summary }}
{{- "\n" -}}
*Summary:* {{ (index .Alerts 0).Annotations.summary }}
{{- end }}
{{ range .Alerts }}
{{- if .Annotations.description }}
{{- "\n" -}}
{{ .Annotations.description }}
{{- "\n" -}}
{{- end }}
{{- if .Annotations.message }}
{{- "\n" -}}
{{ .Annotations.message }}
{{- "\n" -}}
{{- end }}
{{- end }}
{{- end }}