karma
by douban
A Helm chart for Karma - an UI for Prometheus Alertmanager
About this chart
Karma
Karma is an ASL2 licensed alert dashboard for Prometheus Alertmanager.
Introduction
This chart deploys karma to your cluster via a Deployment and Service. Optionally you can also enable ingress.
Prerequisites
- Kubernetes 1.9+
Installing the Chart
To install the chart with the release name my-release, run:
$ helm repo add wiremind https://wiremind.github.io/wiremind-helm-charts
$ helm install --name my-release wiremind/karma
After a few seconds, you should see service statuses being written to the configured output.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
The values.yaml lists the configurable parameters of the karma chart and their default values.
Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,
$ helm install --name my-release \
stable/karma
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
$ helm install --name my-release -f values.yaml stable/karma
Tip: You will have to define the URL to alertmanager in env-settings in values.yaml, under key ALERTMANAGER_URI .
Secure configuration
If you have sensitive information in your Karma config you can wrap it in a Kubernetes Secret and then just point to the name of the Secret.
The structure of the Secret must follow the same pattern defined in configMap.rawConfig, here's an example on how to generate this Secret
with your Karma configuration:
# create a temporary file that contains your Karma configuration
cat > karma.conf <<EOL
alertmanager:
interval: 60s
servers:
- name: prod-alertmanager
uri: https://sensitive:[email protected]
timeout: 10s
proxy: true
- name: client-auth
uri: https://localhost:9093
timeout: 10s
tls:
ca: /etc/ssl/certs/ca-bundle.crt
cert: /etc/karma/client.pem
key: /etc/karma/client.key
annotations:
default:
hidden: false
hidden:
- help
visible: []
EOL
# create a Secret from this file with the key `karma.conf`
kubectl create secret generic sensitive-karma-config \
--from-file=karma.conf=./karma.conf
Next, point to the secret in your values file
# values.yaml
existingSecretConfig:
enabled: true
secretName: sensitive-karma-config
NOTE: you can either use existingSecretConfig or configMap, it cannot be both.
Deploy karma with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has karma on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartkarma is pinned at v1.9.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply