README & alertmanager PVC

This commit is contained in:
Michael Goodness
2016-11-05 09:30:34 -05:00
parent 66ef4b6ba6
commit 6109916c38
5 changed files with 118 additions and 42 deletions
+85 -31
View File
@@ -1,47 +1,101 @@
# Prometheus Helm Chart
# Prometheus
* Installs the [Prometheus](https://prometheus.io/docs/introduction/overview/) monitoring system as well as AlertManager.
[Prometheus](https://prometheus.io/), a [Cloud Native Computing Foundation](https://cncf.io/) project, is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.
## Resource utilization
## TL;DR;
The default cpu and memory settings represent small installation. See [this documentation](https://prometheus.io/docs/operating/storage/#memory-usage) for details on estimating your memory utilziation needs.
```console
$ helm install incubator/prometheus
```
## Introduction
This chart bootstraps a [Prometheus](https://prometheus.io/) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Prerequisites
- Kubernetes 1.3+ with Beta APIs enabled
## Installing the Chart
To install the chart with the release name `my-release`:
```bash
$ helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
```console
$ helm install --name my-release incubator/prometheus
```
The command deploys Prometheus on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
> **Tip**: List all releases using `helm list`
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```console
$ helm delete my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration
### values.yaml
The following tables lists the configurable parameters of the Spartakus chart and their default values.
| Parameter | Description | Default |
|----------------------------|---------------------------------------------------|--------------------------|
| `image` | Prometheus image to run | prom/prometheus |
| `imageTag` | Prometheus image version to run | v1.1.0 |
| `imageAlertManager` | AlertManager image to run | prom/alertmanager |
| `imageTagAlertManager` | AlertManager image version to run | v0.4.2 |
| `adminUser` | Admin user username | admin |
| `adminPassword` | Admin user password | admin |
| `persistence.enabled` | Create a volume to store data | true |
| `persistence.size` | Size of persistent volume claim | 1Gi RW |
| `persistence.storageClass` | Type of persistent volume claim | generic |
| `cpu` | Container requested cpu | 500m |
| `memory` | Container requested memory | 1G |
| `cpuAlertManager` | Container requested cpu for AlertManager | 100m |
| `memoryAlertManager` | Container requested memory for AlertManager | 50M |
| `cpuNodeExporter` | Container requested cpu for NodeExporter | 50m |
| `memoryNodeExporter` | Container requested memory for NodeExporter | 50M |
| Parameter | Description | Default |
| ------------------------------- | ------------------------------- | ---------------------------------------------------------- |
| `alertmanager.httpPort` | Alertmanager Service port | `80` |
| `alertmanager.httpPortName` | Alertmanager service port name | `http` |
| `alertmanager.image` | Alertmanager Docker image | `prom/alertmanager:{VERSION}` |
| `alertmanager.ingress.enabled` | If true, Alertmanager Ingress will be created | `false` |
| `alertmanager.ingress.annotations` | Alertmanager Ingress annotations (YAML) | `{}` |
| `alertmanager.ingress.hosts` | Alertmanager Ingress hostnames (YAML) | `[]` |
| `alertmanager.ingress.tls` | Alertmanager Ingress TLS configuration (YAML) | `[]` |
| `alertmanager.persistentVolume.enabled` | If true, AlertManager will create a Persistent Volume Claim | `false` |
| `alertmanager.persistentVolume.accessModes` | AlertManager data Persistent Volume access modes (YAML) | `[]` |
| `alertmanager.persistentVolume.size` | AlertManager data Persistent Volume size | none |
| `alertmanager.resources` | Alertmanager resource requests and limits (YAML) |```requests: {cpu: 10m, memory: 32Mi} ``` |
| `alertmanager.serviceType` | Alertmanager service type | `ClusterIP` |
| `alertmanager.storagePath` | Alertmanager data storage path | `/data` |
| `configmapReloadImage` | Configmap-reload Docker image | `jimmidyson/configmap-reload:${VERSION}` |
| `imagePullPolicy` | Global image pull policy | `Always` if image tag is latest, else `IfNotPresent` |
| `server.annotations` | Server Pod annotations (YAML) | `{}` |
| `server.extraArgs` | Additional Server container arguments (YAML) | `[]` |
| `server.httpPort` | Server service port | `80` |
| `server.httpPortName` | Server service port name | `http` |
| `server.image` | Server Docker image | ` prom/prometheus:${VERSION}` |
| `server.ingress.enabled` | If true, Server Ingress will be created | `false` |
| `server.ingress.annotations` | Server Ingress annotations (YAML) | `{}` |
| `server.ingress.hosts` | Server Ingress hostnames (YAML) | `[]` |
| `server.ingress.tls` | Server Ingress TLS configuration (YAML) | `[]` |
| `server.persistentVolume.enabled` | If true, Server will create a Persistent Volume Claim | `false` |
| `server.persistentVolume.accessModes` | Server data Persistent Volume access modes (YAML) | `[]` |
| `server.persistentVolume.annotations` | Server data Persistent Volume annotations (YAML) | `{}` |
| `server.persistentVolume.size` | Server data Persistent Volume size | none |
| `server.resources` | Server resource requests and limits | `requests: {cpu: 500m, memory: 512Mi}` |
| `server.serviceType` | Server service type | `ClusterIP` |
| `server.storageLocalPath` | Server local data storage path | `/data` |
| `server.terminationGracePeriodSeconds` | Server Pod termination grace period | `300` |
### Files
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
| File name | Description |
|----------------------------|---------------------------------------------------|
| `alertmanager.yml` | Main configuration file for AlertManager |
| `alerts` | Alerting rules |
| `prometheus.yml` | Main configuration file for Prometheus |
| `rules` | Prometheus rules file |
```console
$ helm install --name my-release \
--set server.storageLocalPath=/prometheus \
incubator/prometheus
```
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
```console
$ helm install --name my-release -f values.yaml incubator/prometheus
```
> **Tip**: You can use the default [values.yaml](values.yaml)
### ConfigMap Files
AlertManager is configured through [alertmanager.yml](https://prometheus.io/docs/alerting/configuration/). This file (and any others listed in `alertmanagerFiles`) will be mounted into the `alertmanager` pod.
Prometheus is configured through [prometheus.yml](https://prometheus.io/docs/operating/configuration/). This file (and any others listed in `serverFiles`) will be mounted into the `prometheus` pod.
### Ingress TLS
@@ -9,4 +9,4 @@ metadata:
release: "{{ .Release.Name }}"
name: {{ template "alertmanager.fullname" . }}
data:
{{ toYaml .Values.alertmanager_files | indent 2 }}
{{ toYaml .Values.alertmanagerFiles | indent 2 }}
@@ -0,0 +1,22 @@
{{- if .Values.alertmanager.persistentVolume.enabled -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
{{- range $key, $value := .Values.alertmanager.persistentVolume.annotations }}
{{ $key }}: {{ $value }}
{{- end }}
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
component: "{{ .Values.alertmanager.name }}"
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
name: {{ template "alertmanager.fullname" . }}
spec:
accessModes:
{{ toYaml .Values.alertmanager.persistentVolume.accessModes | indent 4 }}
resources:
requests:
storage: {{ .Values.alertmanager.persistentVolume.size | quote }}
{{- end -}}
@@ -9,4 +9,4 @@ metadata:
release: "{{ .Release.Name }}"
name: {{ template "server.fullname" . }}
data:
{{ toYaml .Values.server_files | indent 2 }}
{{ toYaml .Values.serverFiles | indent 2 }}
+9 -9
View File
@@ -188,19 +188,19 @@ server:
# limits:
# cpu: 500m
# memory: 512Mi
# requests:
# cpu: 500m
# memory: 512Mi
requests:
cpu: 500m
memory: 512Mi
## Server service type
## Default: 'ClusterIP'
# serviceType: LoadBalancer
## Server local data storage path
## Default: '/data'
##
# storageLocalPath: /data
## Server service type
## Default: 'ClusterIP'
# serviceType: LoadBalancer
## Server Pod termination grace period
## Default: 300s (5m)
##
@@ -208,7 +208,7 @@ server:
## Alertmanager ConfigMap entries
##
alertmanager_files:
alertmanagerFiles:
alertmanager.yml: |
global:
# slack_api_url: ''
@@ -227,7 +227,7 @@ alertmanager_files:
## Server ConfigMap entries
##
server_files:
serverFiles:
alerts: ""
rules: ""