Collectd operator utilties
[demo.git] / vnfs / DAaaS / deploy / operator / charts / prometheus-operator / README.md
1 # prometheus-operator
2
3 Installs [prometheus-operator](https://github.com/coreos/prometheus-operator) to create/configure/manage Prometheus clusters atop Kubernetes. This chart includes multiple components and is suitable for a variety of use-cases.
4
5 The default installation is intended to suit monitoring a kubernetes cluster the chart is deployed onto. It is closely matches the kube-prometheus project.
6 - [prometheus-operator](https://github.com/coreos/prometheus-operator)
7 - [prometheus](https://prometheus.io/)
8 - [alertmanager](https://prometheus.io/)
9 - [node-exporter](https://github.com/helm/charts/tree/master/stable/prometheus-node-exporter)
10 - [kube-state-metrics](https://github.com/helm/charts/tree/master/stable/kube-state-metrics)
11 - [grafana](https://github.com/helm/charts/tree/master/stable/grafana)
12 - service monitors to scrape internal kubernetes components
13   - kube-apiserver
14   - kube-scheduler
15   - kube-controller-manager
16   - etcd
17   - kube-dns/coredns
18 With the installation, the chart also includes dashboards and alerts.
19
20 The same chart can be used to run multiple prometheus instances in the same cluster if required. To achieve this, the other components need to be disabled - it is necessary to run only one instance of prometheus-operator and a pair of alertmanager pods for an HA configuration.
21
22 ## TL;DR;
23
24 ```console
25 $ helm install stable/prometheus-operator
26 ```
27
28 ## Introduction
29
30 This chart bootstraps a [prometheus-operator](https://github.com/coreos/prometheus-operator) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.  The chart can be installed multiple times to create separate Prometheus instances managed by Prometheus Operator.
31
32 ## Prerequisites
33   - Kubernetes 1.10+ with Beta APIs
34   - Helm 2.10+ (For a workaround using an earlier version see [below](#helm-210-workaround))
35
36 ## Installing the Chart
37
38 To install the chart with the release name `my-release`:
39
40 ```console
41 $ helm install --name my-release stable/prometheus-operator
42 ```
43
44 The command deploys prometheus-operator on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
45
46 The default installation includes Prometheus Operator, Alertmanager, Grafana, and configuration for scraping Kubernetes infrastructure.
47
48 ## Uninstalling the Chart
49
50 To uninstall/delete the `my-release` deployment:
51
52 ```console
53 $ helm delete my-release
54 ```
55
56 The command removes all the Kubernetes components associated with the chart and deletes the release.
57
58 CRDs created by this chart are not removed by default and should be manually cleaned up:
59
60 ```
61 kubectl delete crd prometheuses.monitoring.coreos.com
62 kubectl delete crd prometheusrules.monitoring.coreos.com
63 kubectl delete crd servicemonitors.monitoring.coreos.com
64 kubectl delete crd alertmanagers.monitoring.coreos.com
65 ```
66
67 ## Configuration
68
69 The following tables lists the configurable parameters of the prometheus-operator chart and their default values.
70
71 ### General
72 | Parameter | Description | Default |
73 | ----- | ----------- | ------ |
74 | `nameOverride` | Provide a name in place of `prometheus-operator` |`""`|
75 | `fullNameOverride` | Provide a name to substitute for the full names of resources |`""`|
76 | `commonLabels` | Labels to apply to all resources | `[]` |
77 | `defaultRules.create` | Create default rules for monitoring the cluster | `true` |
78 | `defaultRules.rules.alertmanager` | Create default rules for Alert Manager | `true` |
79 | `defaultRules.rules.etcd` | Create default rules for ETCD | `true` |
80 | `defaultRules.rules.general` | Create General default rules| `true` |
81 | `defaultRules.rules.k8s` | Create K8S default rules| `true` |
82 | `defaultRules.rules.kubeApiserver` | Create Api Server default rules| `true` |
83 | `defaultRules.rules.kubePrometheusNodeAlerting` | Create Node Alerting default rules| `true` |
84 | `defaultRules.rules.kubePrometheusNodeRecording` | Create Node Recording default rules| `true` |
85 | `defaultRules.rules.kubeScheduler` | Create Kubernetes Scheduler default rules| `true` |
86 | `defaultRules.rules.kubernetesAbsent` | Create Kubernetes Absent (example API Server down) default rules| `true` |
87 | `defaultRules.rules.kubernetesApps` | Create Kubernetes Apps  default rules| `true` |
88 | `defaultRules.rules.kubernetesResources` | Create Kubernetes Resources  default rules| `true` |
89 | `defaultRules.rules.kubernetesStorage` | Create Kubernetes Storage  default rules| `true` |
90 | `defaultRules.rules.kubernetesSystem` | Create Kubernetes System  default rules| `true` |
91 | `defaultRules.rules.node` | Create Node  default rules| `true` |
92 | `defaultRules.rules.PrometheusOperator` | Create Prometheus Operator  default rules| `true` |
93 | `defaultRules.rules.prometheus` | Create Prometheus  default rules| `true` |
94 | `defaultRules.labels` | Labels for default rules for monitoring the cluster | `{}` |
95 | `defaultRules.annotations` | Annotations for default rules for monitoring the cluster | `{}` |
96 | `additionalPrometheusRules` | List of `prometheusRule` objects to create. See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusrulespec. | `[]` |
97 | `global.rbac.create` | Create RBAC resources | `true` |
98 | `global.rbac.pspEnabled` | Create pod security policy resources | `true` |
99 | `global.imagePullSecrets` | Reference to one or more secrets to be used when pulling images | `[]` |
100
101 ### Prometheus Operator
102 | Parameter | Description | Default |
103 | ----- | ----------- | ------ |
104 | `prometheusOperator.enabled` | Deploy Prometheus Operator. Only one of these should be deployed into the cluster | `true` |
105 | `prometheusOperator.serviceAccount` | Create a serviceaccount for the operator | `true` |
106 | `prometheusOperator.name` | Operator serviceAccount name | `""` |
107 | `prometheusOperator.logFormat` | Operator log output formatting | `"logfmt"` |
108 | `prometheusOperator.logLevel` | Operator log level. Possible values: "all", "debug",  "info", "warn", "error", "none" | `"info"` |
109 | `prometheusOperator.createCustomResource` | Create CRDs. Required if deploying anything besides the operator itself as part of the release. The operator will create / update these on startup. If your Helm version < 2.10 you will have to either create the CRDs first or deploy the operator first, then the rest of the resources | `true` |
110 | `prometheusOperator.crdApiGroup` | Specify the API Group for the CustomResourceDefinitions | `monitoring.coreos.com` |
111 | `prometheusOperator.cleanupCustomResource` | Attempt to delete CRDs when the release is removed. This option may be useful while testing but is not recommended, as deleting the CRD definition will delete resources and prevent the operator from being able to clean up resources that it manages | `false` |
112 | `prometheusOperator.podLabels` | Labels to add to the operator pod | `{}` |
113 | `prometheusOperator.priorityClassName` | Name of Priority Class to assign pods | `nil` |
114 | `prometheusOperator.kubeletService.enabled` | If true, the operator will create and maintain a service for scraping kubelets | `true` |
115 | `prometheusOperator.kubeletService.namespace` | Namespace to deploy kubelet service | `kube-system` |
116 | `prometheusOperator.serviceMonitor.selfMonitor` | Enable monitoring of prometheus operator | `true` |
117 | `prometheusOperator.service.type` | Prometheus operator service type | `ClusterIP` |
118 | `prometheusOperator.service.clusterIP` | Prometheus operator service clusterIP IP | `""` |
119 | `prometheusOperator.service.nodePort` | Port to expose prometheus operator service on each node | `38080` |
120 | `prometheusOperator.service.annotations` | Annotations to be added to the prometheus operator service | `{}` |
121 | `prometheusOperator.service.labels` |  Prometheus Operator Service Labels | `{}` |
122 | `prometheusOperator.service.externalIPs` | List of IP addresses at which the Prometheus Operator server service is available  | `[]` |
123 | `prometheusOperator.service.loadBalancerIP` |  Prometheus Operator Loadbalancer IP | `""` |
124 | `prometheusOperator.service.loadBalancerSourceRanges` | Prometheus Operator Load Balancer Source Ranges | `[]` |
125 | `prometheusOperator.resources` | Resource limits for prometheus operator | `{}` |
126 | `prometheusOperator.securityContext` | SecurityContext for prometheus operator | `{"runAsNonRoot": true, "runAsUser": 65534}` |
127 | `prometheusOperator.nodeSelector` | Prometheus operator node selector https://kubernetes.io/docs/user-guide/node-selection/ | `{}` |
128 | `prometheusOperator.tolerations` | Tolerations for use with node taints https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ | `[]` |
129 | `prometheusOperator.affinity` | Assign the prometheus operator to run on specific nodes https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | `{}` |
130 | `prometheusOperator.image.repository` | Repository for prometheus operator image | `quay.io/coreos/prometheus-operator` |
131 | `prometheusOperator.image.tag` | Tag for prometheus operator image | `v0.29.0` |
132 | `prometheusOperator.image.pullPolicy` | Pull policy for prometheus operator image | `IfNotPresent` |
133 | `prometheusOperator.configmapReloadImage.repository` | Repository for configmapReload image | `quay.io/coreos/configmap-reload` |
134 | `prometheusOperator.configmapReloadImage.tag` | Tag for configmapReload image | `v0.0.1` |
135 | `prometheusOperator.prometheusConfigReloaderImage.repository` | Repository for config-reloader image | `quay.io/coreos/prometheus-config-reloader` |
136 | `prometheusOperator.prometheusConfigReloaderImage.tag` | Tag for config-reloader image | `v0.29.0` |
137 | `prometheusOperator.hyperkubeImage.repository` | Repository for hyperkube image used to perform maintenance tasks | `k8s.gcr.io/hyperkube` |
138 | `prometheusOperator.hyperkubeImage.tag` | Tag for hyperkube image used to perform maintenance tasks | `v1.12.1` |
139 | `prometheusOperator.hyperkubeImage.repository` | Image pull policy for hyperkube image used to perform maintenance tasks | `IfNotPresent` |
140
141 ### Prometheus
142 | Parameter | Description | Default |
143 | ----- | ----------- | ------ |
144 | `prometheus.enabled` | Deploy prometheus | `true` |
145 | `prometheus.serviceMonitor.selfMonitor` | Create a `serviceMonitor` to automatically monitor the prometheus instance | `true` |
146 | `prometheus.serviceAccount.create` | Create a default serviceaccount for prometheus to use | `true` |
147 | `prometheus.serviceAccount.name` | Name for prometheus serviceaccount | `""` |
148 | `prometheus.rbac.roleNamespaces` | Create role bindings in the specified namespaces, to allow Prometheus monitoring a role binding in the release namespace will always be created. | `["kube-system"]` |
149 | `prometheus.podDisruptionBudget.enabled` | If true, create a pod disruption budget for prometheus pods. The created resource cannot be modified once created - it must be deleted to perform a change | `true` |
150 | `prometheus.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
151 | `prometheus.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `""` |
152 | `prometheus.ingress.enabled` | If true, Prometheus Ingress will be created | `false` |
153 | `prometheus.ingress.annotations` | Prometheus Ingress annotations | `{}` |
154 | `prometheus.ingress.labels` | Prometheus Ingress additional labels | `{}` |
155 | `prometheus.ingress.hosts` | Prometheus Ingress hostnames | `[]` |
156 | `prometheus.ingress.tls` | Prometheus Ingress TLS configuration (YAML) | `[]` |
157 | `prometheus.service.type` |  Prometheus Service type | `ClusterIP` |
158 | `prometheus.service.clusterIP` | Prometheus service clusterIP IP | `""` |
159 | `prometheus.service.targetPort` |  Prometheus Service internal port | `9090` |
160 | `prometheus.service.nodePort` |  Prometheus Service port for NodePort service type | `39090` |
161 | `prometheus.service.annotations` |  Prometheus Service Annotations | `{}` |
162 | `prometheus.service.labels` |  Prometheus Service Labels | `{}` |
163 | `prometheus.service.externalIPs` | List of IP addresses at which the Prometheus server service is available  | `[]` |
164 | `prometheus.service.loadBalancerIP` |  Prometheus Loadbalancer IP | `""` |
165 | `prometheus.service.loadBalancerSourceRanges` | Prometheus Load Balancer Source Ranges | `[]` |
166 | `prometheus.service.sessionAffinity` | Prometheus Service Session Affinity | `""` |
167 | `prometheus.additionalServiceMonitors` | List of `serviceMonitor` objects to create. See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#servicemonitorspec | `[]` |
168 | `prometheus.prometheusSpec.podMetadata` | Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata Metadata Labels and Annotations gets propagated to the prometheus pods. | `{}` |
169 | `prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues` | If true, a nil or {} value for prometheus.prometheusSpec.serviceMonitorSelector will cause the prometheus resource to be created with selectors based on values in the helm deployment, which will also match the servicemonitors created | `true` |
170 | `prometheus.prometheusSpec.serviceMonitorSelector` | ServiceMonitors to be selected for target discovery. If {}, select all ServiceMonitors | `{}` |
171 | `prometheus.prometheusSpec.serviceMonitorNamespaceSelector` | Namespaces to be selected for ServiceMonitor discovery. See [namespaceSelector](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#namespaceselector) for usage | `{}` |
172 | `prometheus.prometheusSpec.image.repository` | Base image to use for a Prometheus deployment. | `quay.io/prometheus/prometheus` |
173 | `prometheus.prometheusSpec.image.tag` | Tag of Prometheus container image to be deployed. | `v2.7.1` |
174 | `prometheus.prometheusSpec.paused` | When a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects. | `false` |
175 | `prometheus.prometheusSpec.replicas` | Number of instances to deploy for a Prometheus deployment. | `1` |
176 | `prometheus.prometheusSpec.retention` | Time duration Prometheus shall retain data for. Must match the regular expression `[0-9]+(ms\|s\|m\|h\|d\|w\|y)` (milliseconds seconds minutes hours days weeks years). | `120h` |
177 | `prometheus.prometheusSpec.logLevel` | Log level for Prometheus to be configured with. | `info` |
178 | `prometheus.prometheusSpec.scrapeInterval` | Interval between consecutive scrapes. | `""` |
179 | `prometheus.prometheusSpec.evaluationInterval` | Interval between consecutive evaluations. | `""` |
180 | `prometheus.prometheusSpec.externalLabels` | The labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). | `[]` |
181 | `prometheus.prometheusSpec.externalUrl` | The external URL the Prometheus instances will be available under. This is necessary to generate correct URLs. This is necessary if Prometheus is not served from root of a DNS name. | `""` |
182 | `prometheus.prometheusSpec.routePrefix` | The route prefix Prometheus registers HTTP handlers for. This is useful, if using ExternalURL and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, but the server serves requests under a different route prefix. For example for use with `kubectl proxy`. | `/` |
183 | `prometheus.prometheusSpec.storageSpec` | Storage spec to specify how storage shall be used. | `{}` |
184 | `prometheus.prometheusSpec.ruleSelectorNilUsesHelmValues` | If true, a nil or {} value for prometheus.prometheusSpec.ruleSelector will cause the prometheus resource to be created with selectors based on values in the helm deployment, which will also match the PrometheusRule resources created. | `true` |
185 | `prometheus.prometheusSpec.ruleSelector` | A selector to select which PrometheusRules to mount for loading alerting rules from. Until (excluding) Prometheus Operator v0.24.0 Prometheus Operator will migrate any legacy rule ConfigMaps to PrometheusRule custom resources selected by RuleSelector. Make sure it does not match any config maps that you do not want to be migrated. If {}, select all PrometheusRules | `{}` |
186 | `prometheus.prometheusSpec.ruleNamespaceSelector` | Namespaces to be selected for PrometheusRules discovery. If nil, select own namespace. See [namespaceSelector](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#namespaceselector) for usage | `{}` |
187 | `prometheus.prometheusSpec.alertingEndpoints` | Alertmanagers to which alerts will be sent https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#alertmanagerendpoints Default configuration will connect to the alertmanager deployed as part of this release | `[]` |
188 | `prometheus.prometheusSpec.resources` | Define resources requests and limits for single Pods. | `{}` |
189 | `prometheus.prometheusSpec.nodeSelector` | Define which Nodes the Pods are scheduled on. | `{}` |
190 | `prometheus.prometheusSpec.secrets` | Secrets is a list of Secrets in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. The Secrets are mounted into /etc/prometheus/secrets/<secret-name>. Secrets changes after initial creation of a Prometheus object are not reflected in the running Pods. To change the secrets mounted into the Prometheus Pods, the object must be deleted and recreated with the new list of secrets. | `[]` |
191 | `prometheus.prometheusSpec.configMaps` | ConfigMaps is a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. The ConfigMaps are mounted into /etc/prometheus/configmaps/ | `[]` |
192 |`prometheus.prometheusSpec.podAntiAffinity` | Pod anti-affinity can prevent the scheduler from placing Prometheus replicas on the same node. The default value "soft" means that the scheduler should *prefer* to not schedule two replica pods onto the same node but no guarantee is provided. The value "hard" means that the scheduler is *required* to not schedule two replica pods onto the same node. The value "" will disable pod anti-affinity so that no anti-affinity rules will be configured. | `""` |
193 |`prometheus.prometheusSpec.podAntiAffinityTopologyKey` | If anti-affinity is enabled sets the topologyKey to use for anti-affinity. This can be changed to, for example `failure-domain.beta.kubernetes.io/zone`| `kubernetes.io/hostname` |
194 | `prometheus.prometheusSpec.tolerations` | If specified, the pod's tolerations. | `[]` |
195 | `prometheus.prometheusSpec.remoteWrite` | If specified, the remote_write spec. This is an experimental feature, it may change in any upcoming release in a breaking way. | `[]` |
196 | `prometheus.prometheusSpec.remoteRead` | If specified, the remote_read spec. This is an experimental feature, it may change in any upcoming release in a breaking way. | `[]` |
197 | `prometheus.prometheusSpec.securityContext` | SecurityContext holds pod-level security attributes and common container settings. This defaults to non root user with uid 1000 and gid 2000 in order to support migration from operator version <0.26. | `{"runAsNonRoot": true, "runAsUser": 1000, "fsGroup": 2000}` |
198 | `prometheus.prometheusSpec.listenLocal` | ListenLocal makes the Prometheus server listen on loopback, so that it does not bind against the Pod IP. | `false` |
199 | `prometheus.prometheusSpec.containers` | Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to a Prometheus pod. |`[]`|
200 | `prometheus.prometheusSpec.additionalScrapeConfigs` | AdditionalScrapeConfigs allows specifying additional Prometheus scrape configurations. Scrape configurations are appended to the configurations generated by the Prometheus Operator. Job configurations must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<scrape_config>. As scrape configs are appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible scrape configs are going to break Prometheus after the upgrade. | `{}` |
201 | `prometheus.prometheusSpec.additionalScrapeConfigsExternal` | Enable additional scrape configs that are managed externally to this chart. Note that the prometheus will fail to provision if the correct secret does not exist. | `false` |
202 | `prometheus.prometheusSpec.additionalAlertManagerConfigs` | AdditionalAlertManagerConfigs allows for manual configuration of alertmanager jobs in the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<alertmanager_config>. AlertManager configurations specified are appended to the configurations generated by the Prometheus Operator. As AlertManager configs are appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible AlertManager configs are going to break Prometheus after the upgrade. | `{}` |
203 | `prometheus.prometheusSpec.additionalAlertRelabelConfigs` | AdditionalAlertRelabelConfigs allows specifying additional Prometheus alert relabel configurations. Alert relabel configurations specified are appended to the configurations generated by the Prometheus Operator. Alert relabel configurations specified must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs. As alert relabel configs are appended, the user is responsible to make sure it is valid. Note that using this feature may expose the possibility to break upgrades of Prometheus. It is advised to review Prometheus release notes to ensure that no incompatible alert relabel configs are going to break Prometheus after the upgrade. | `[]` |
204 | `prometheus.prometheusSpec.thanos` | Thanos configuration allows configuring various aspects of a Prometheus server in a Thanos environment. This section is experimental, it may change significantly without deprecation notice in any release.This is experimental and may change significantly without backward compatibility in any release. See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#thanosspec | `{}` |
205 | `prometheus.prometheusSpec.priorityClassName` | Priority class assigned to the Pods | `""` |
206
207 ### Alertmanager
208 | Parameter | Description | Default |
209 | ----- | ----------- | ------ |
210 | `alertmanager.enabled` | Deploy alertmanager | `true` |
211 | `alertmanager.serviceMonitor.selfMonitor` | Create a `serviceMonitor` to automatically monitor the alartmanager instance | `true` |
212 | `alertmanager.serviceAccount.create` | Create a `serviceAccount` for alertmanager | `true` |
213 | `alertmanager.serviceAccount.name` | Name for Alertmanager service account | `""` |
214 | `alertmanager.podDisruptionBudget.enabled` | If true, create a pod disruption budget for Alertmanager pods. The created resource cannot be modified once created - it must be deleted to perform a change | `true` |
215 | `alertmanager.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
216 | `alertmanager.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `""` |
217 | `alertmanager.ingress.enabled` | If true, Alertmanager Ingress will be created | `false` |
218 | `alertmanager.ingress.annotations` | Alertmanager Ingress annotations | `{}` |
219 | `alertmanager.ingress.labels` | Alertmanager Ingress additional labels | `{}` |
220 | `alertmanager.ingress.hosts` | Alertmanager Ingress hostnames | `[]` |
221 | `alertmanager.ingress.tls` | Alertmanager Ingress TLS configuration (YAML) | `[]` |
222 | `alertmanager.service.type` | Alertmanager Service type | `ClusterIP` |
223 | `alertmanager.service.clusterIP` | Alertmanager service clusterIP IP | `""` |
224 | `alertmanager.service.nodePort` | Alertmanager Service port for NodePort service type | `30903` |
225 | `alertmanager.service.annotations` | Alertmanager Service annotations | `{}` |
226 | `alertmanager.service.labels` |  Alertmanager Service Labels | `{}` |
227 | `alertmanager.service.externalIPs` | List of IP addresses at which the Alertmanager server service is available  | `[]` |
228 | `alertmanager.service.loadBalancerIP` |  Alertmanager Loadbalancer IP | `""` |
229 | `alertmanager.service.loadBalancerSourceRanges` | Alertmanager Load Balancer Source Ranges | `[]` |
230 | `alertmanager.config` | Provide YAML to configure Alertmanager. See https://prometheus.io/docs/alerting/configuration/#configuration-file. The default provided works to suppress the Watchdog alert from `defaultRules.create` | `{"global":{"resolve_timeout":"5m"},"route":{"group_by":["job"],"group_wait":"30s","group_interval":"5m","repeat_interval":"12h","receiver":"null","routes":[{"match":{"alertname":"Watchdog"},"receiver":"null"}]},"receivers":[{"name":"null"}]}` |
231 | `alertmanager.alertmanagerSpec.podMetadata` | Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata Metadata Labels and Annotations gets propagated to the prometheus pods. | `{}` |
232 | `alertmanager.alertmanagerSpec.image.tag` | Tag of Alertmanager container image to be deployed. | `v0.16.1` |
233 | `alertmanager.alertmanagerSpec.image.repository` | Base image that is used to deploy pods, without tag. | `quay.io/prometheus/alertmanager` |
234 | `alertmanager.alertmanagerSpec.secrets` | Secrets is a list of Secrets in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager Pods. The Secrets are mounted into /etc/alertmanager/secrets/<secret-name>. | `[]` |
235 | `alertmanager.alertmanagerSpec.configMaps` | ConfigMaps is a list of ConfigMaps in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager Pods. The ConfigMaps are mounted into /etc/alertmanager/configmaps/ | `[]` |
236 | `alertmanager.alertmanagerSpec.logLevel` | Log level for Alertmanager to be configured with. | `info` |
237 | `alertmanager.alertmanagerSpec.replicas` | Size is the expected size of the alertmanager cluster. The controller will eventually make the size of the running cluster equal to the expected size. | `1` |
238 | `alertmanager.alertmanagerSpec.retention` | Time duration Alertmanager shall retain data for. Value must match the regular expression `[0-9]+(ms\|s\|m\|h)` (milliseconds seconds minutes hours). | `120h` |
239 | `alertmanager.alertmanagerSpec.storage` | Storage is the definition of how storage will be used by the Alertmanager instances. | `{}` |
240 | `alertmanager.alertmanagerSpec.externalUrl` | The external URL the Alertmanager instances will be available under. This is necessary to generate correct URLs. This is necessary if Alertmanager is not served from root of a DNS name. | `""` |
241 | `alertmanager.alertmanagerSpec.routePrefix` | The route prefix Alertmanager registers HTTP handlers for. This is useful, if using ExternalURL and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, but the server serves requests under a different route prefix. For example for use with `kubectl proxy`. | `/` |
242 | `alertmanager.alertmanagerSpec.paused` | If set to true all actions on the underlying managed objects are not going to be performed, except for delete actions. | `false` |
243 | `alertmanager.alertmanagerSpec.nodeSelector` | Define which Nodes the Pods are scheduled on. | `{}` |
244 | `alertmanager.alertmanagerSpec.resources` | Define resources requests and limits for single Pods. | `{}` |
245 | `alertmanager.alertmanagerSpec.podAntiAffinity` | Pod anti-affinity can prevent the scheduler from placing Prometheus replicas on the same node. The default value "soft" means that the scheduler should *prefer* to not schedule two replica pods onto the same node but no guarantee is provided. The value "hard" means that the scheduler is *required* to not schedule two replica pods onto the same node. The value "" will disable pod anti-affinity so that no anti-affinity rules will be configured. | `""` |
246 |`prometheus.prometheusSpec.podAntiAffinityTopologyKey` | If anti-affinity is enabled sets the topologyKey to use for anti-affinity. This can be changed to, for example `failure-domain.beta.kubernetes.io/zone`| `kubernetes.io/hostname` |
247 | `alertmanager.alertmanagerSpec.tolerations` | If specified, the pod's tolerations. | `[]` |
248 | `alertmanager.alertmanagerSpec.securityContext` | SecurityContext holds pod-level security attributes and common container settings. This defaults to non root user with uid 1000 and gid 2000 in order to support migration from operator version < 0.26 | `{"runAsNonRoot": true, "runAsUser": 1000, "fsGroup": 2000}` |
249 | `alertmanager.alertmanagerSpec.listenLocal` | ListenLocal makes the Alertmanager server listen on loopback, so that it does not bind against the Pod IP. Note this is only for the Alertmanager UI, not the gossip communication. | `false` |
250 | `alertmanager.alertmanagerSpec.containers` | Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an Alertmanager pod. | `[]` |
251 | `alertmanager.alertmanagerSpec.priorityClassName` | Priority class assigned to the Pods | `""` |
252 | `alertmanager.alertmanagerSpec.additionalPeers` | AdditionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster. | `[]` |
253
254 ### Grafana
255 | Parameter | Description | Default |
256 | ----- | ----------- | ------ |
257 | `grafana.enabled` | If true, deploy the grafana sub-chart | `true` |
258 | `grafana.serviceMonitor.selfMonitor` | Create a `serviceMonitor` to automatically monitor the grafana instance | `true` |
259 | `grafana.adminPassword` | Admin password to log into the grafana UI | "prom-operator" |
260 | `grafana.defaultDashboardsEnabled` | Deploy default dashboards. These are loaded using the sidecar | `true` |
261 | `grafana.ingress.enabled` | Enables Ingress for Grafana | `false` |
262 | `grafana.ingress.annotations` | Ingress annotations for Grafana | `{}` |
263 | `grafana.ingress.labels` | Custom labels for Grafana Ingress | `{}` |
264 | `grafana.ingress.hosts` | Ingress accepted hostnames for Grafana| `[]` |
265 | `grafana.ingress.tls` | Ingress TLS configuration for Grafana | `[]` |
266 | `grafana.sidecar.dashboards.enabled` | Enable the Grafana sidecar to automatically load dashboards with a label `{{ grafana.sidecar.dashboards.label }}=1` | `true` |
267 | `grafana.sidecar.dashboards.label` | If the sidecar is enabled, configmaps with this label will be loaded into Grafana as dashboards | `grafana_dashboard` |
268 | `grafana.sidecar.datasources.enabled` | Enable the Grafana sidecar to automatically load dashboards with a label `{{ grafana.sidecar.datasources.label }}=1` | `true` |
269 | `grafana.sidecar.datasources.label` | If the sidecar is enabled, configmaps with this label will be loaded into Grafana as datasources configurations | `grafana_datasource` |
270 | `grafana.rbac.pspUseAppArmor` | Enforce AppArmor in created PodSecurityPolicy (requires rbac.pspEnabled) | `true` |
271 | `grafana.extraConfigmapMounts` | Additional grafana server configMap volume mounts | `[]` |
272
273 ### Exporters
274 | Parameter | Description | Default |
275 | ----- | ----------- | ------ |
276 | `kubeApiServer.enabled` | Deploy `serviceMonitor` to scrape the Kubernetes API server | `true` |
277 | `kubeApiServer.relabelings` | Relablings for the API Server ServiceMonitor | `[]` |
278 | `kubeApiServer.tlsConfig.serverName` | Name of the server to use when validating TLS certificate | `kubernetes` |
279 | `kubeApiServer.tlsConfig.insecureSkipVerify` | Skip TLS certificate validation when scraping | `false` |
280 | `kubeApiServer.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus | `component` |
281 | `kubeApiServer.serviceMonitor.selector` | The service selector | `{"matchLabels":{"component":"apiserver","provider":"kubernetes"}}`
282 | `kubelet.enabled` | Deploy servicemonitor to scrape the kubelet service. See also `prometheusOperator.kubeletService` | `true` |
283 | `kubelet.namespace` | Namespace where the kubelet is deployed. See also `prometheusOperator.kubeletService.namespace` | `kube-system` |
284 | `kubelet.serviceMonitor.https` | Enable scraping of the kubelet over HTTPS. For more information, see https://github.com/coreos/prometheus-operator/issues/926 | `false` |
285 | `kubelet.serviceMonitor.cAdvisorMetricRelabelings` | The `metric_relabel_configs` for scraping cAdvisor. | `` |
286 | `kubeControllerManager.enabled` | Deploy a `service` and `serviceMonitor` to scrape the Kubernetes controller-manager | `true` |
287 | `kubeControllerManager.endpoints` | Endpoints where Controller-manager runs. Provide this if running Controller-manager outside the cluster | `[]` |
288 | `kubeControllermanager.service.port` | Controller-manager port for the service runs on | `10252` |
289 | `kubeControllermanager.service.targetPort` | Controller-manager targetPort for the service runs on | `10252` |
290 | `kubeControllermanager.service.selector` | Controller-manager service selector | `{"k8s-app" : "kube-controller-manager" }`
291 | `coreDns.enabled` | Deploy coreDns scraping components. Use either this or kubeDns | true |
292 | `coreDns.service.port` | CoreDns port | `9153` |
293 | `coreDns.service.targetPort` | CoreDns targetPort | `9153` |
294 | `coreDns.service.selector` | CoreDns service selector | `{"k8s-app" : "coredns" }`
295 | `kubeDns.enabled` | Deploy kubeDns scraping components. Use either this or coreDns| `false` |
296 | `kubeDns.service.selector` | CoreDns service selector | `{"k8s-app" : "kube-dns" }` |
297 | `kubeEtcd.enabled` | Deploy components to scrape etcd | `true` |
298 | `kubeEtcd.endpoints` | Endpoints where etcd runs. Provide this if running etcd outside the cluster | `[]` |
299 | `kubeEtcd.service.port` | Etcd port | `4001` |
300 | `kubeEtcd.service.targetPort` | Etcd targetPort | `4001` |
301 | `kubeEtcd.service.selector` | Selector for etcd if running inside the cluster | `{"k8s-app":"etcd-server"}` |
302 | `kubeEtcd.serviceMonitor.scheme` | Etcd servicemonitor scheme | `http` |
303 | `kubeEtcd.serviceMonitor.insecureSkipVerify` | Skip validating etcd TLS certificate when scraping | `false` |
304 | `kubeEtcd.serviceMonitor.serverName` | Etcd server name to validate certificate against when scraping | `""` |
305 | `kubeEtcd.serviceMonitor.caFile` | Certificate authority file to use when connecting to etcd. See `prometheus.prometheusSpec.secrets` | `""` |
306 | `kubeEtcd.serviceMonitor.certFile` | Client certificate file to use when connecting to etcd. See `prometheus.prometheusSpec.secrets` | `""` |
307 | `kubeEtcd.serviceMonitor.keyFile` | Client key file to use when connecting to etcd.  See `prometheus.prometheusSpec.secrets` | `""` |
308 | `kubeScheduler.enabled` | Deploy a `service` and `serviceMonitor` to scrape the Kubernetes scheduler | `true` |
309 | `kubeScheduler.endpoints` | Endpoints where scheduler runs. Provide this if running scheduler outside the cluster | `[]` |
310 | `kubeScheduler.service.port` | Scheduler port for the service runs on | `10251` |
311 | `kubeScheduler.service.targetPort` | Scheduler targetPort for the service runs on | `10251` |
312 | `kubeScheduler.service.selector` | Scheduler service selector | `{"k8s-app" : "kube-scheduler" }`
313 | `kubeStateMetrics.enabled` | Deploy the `kube-state-metrics` chart and configure a servicemonitor to scrape | `true` |
314 | `kube-state-metrics.rbac.create` | Create RBAC components in kube-state-metrics. See `global.rbac.create` | `true` |
315 | `kube-state-metrics.podSecurityPolicy.enabled` | Create pod security policy resource for kube-state-metrics. | `true` |
316 | `nodeExporter.enabled` | Deploy the `prometheus-node-exporter` and scrape it | `true` |
317 | `nodeExporter.jobLabel` | The name of the label on the target service to use as the job name in prometheus. See `prometheus-node-exporter.podLabels.jobLabel=node-exporter` default | `jobLabel` |
318 | `prometheus-node-exporter.podLabels` | Additional labels for pods in the DaemonSet | `{"jobLabel":"node-exporter"}` |
319 | `prometheus-node-exporter.extraArgs` | Additional arguments for the node exporter container | `["--collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+)($|/)", "--collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$"]` |
320
321
322 Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
323
324 ```console
325 $ helm install --name my-release stable/prometheus-operator --set prometheusOperator.enabled=true
326 ```
327
328 Alternatively, one or more YAML files that specify the values for the above parameters can be provided while installing the chart. For example,
329
330 ```console
331 $ helm install --name my-release stable/prometheus-operator -f values1.yaml,values2.yaml
332 ```
333
334 > **Tip**: You can use the default [values.yaml](values.yaml)
335
336
337 ## Developing Prometheus Rules and Grafana Dashboards
338
339 This chart Grafana Dashboards and Prometheus Rules are just a copy from coreos/prometheus-operator and other sources, synced (with alterations) by scripts in [hack](hack) folder. In order to introduce any changes you need to first [add them to original repo](https://github.com/coreos/prometheus-operator/blob/master/contrib/kube-prometheus/docs/developing-prometheus-rules-and-grafana-dashboards.md) and then sync there by scripts.
340
341 ## Further Information
342
343 For more in-depth documentation of configuration options meanings, please see
344 - [Prometheus Operator](https://github.com/coreos/prometheus-operator)
345 - [Prometheus](https://prometheus.io/docs/introduction/overview/)
346 - [Grafana](https://github.com/helm/charts/tree/master/stable/grafana#grafana-helm-chart)
347
348 ## Helm <2.10 workaround
349 The `crd-install` hook is required to deploy the prometheus operator CRDs before they are used. If you are forced to use an earlier version of Helm you can work around this requirement as follows:
350 1. Install prometheus-operator by itself, disabling everything but the prometheus-operator component, and also setting `prometheusOperator.serviceMonitor.selfMonitor=false`
351 2. Install all the other components, and configure `prometheus.additionalServiceMonitors` to scrape the prometheus-operator service.
352
353 # Migrating from coreos/prometheus-operator chart
354
355 The multiple charts have been combined into a single chart that installs prometheus operator, prometheus, alertmanager, grafana as well as the multitude of exporters necessary to monitor a cluster.
356
357 There is no simple and direct migration path between the charts as the changes are extensive and intended to make the chart easier to support.
358
359 The capabilities of the old chart are all available in the new chart, including the ability to run multiple prometheus instances on a single cluster - you will need to disable the parts of the chart you do not wish to deploy.
360
361 You can check out the tickets for this change [here](https://github.com/coreos/prometheus-operator/issues/592) and [here](https://github.com/helm/charts/pull/6765)
362
363 ## High-level overview of Changes
364 The chart has 3 dependencies, that can be seen in the chart's requirements file:
365 https://github.com/helm/charts/blob/master/stable/prometheus-operator/requirements.yaml
366
367 ### Node-Exporter, Kube-State-Metrics
368 These components are loaded as dependencies into the chart. The source for both charts is found in the same repository. They are relatively simple components.
369
370 ### Grafana
371 The Grafana chart is more feature-rich than this chart - it contains a sidecar that is able to load data sources and dashboards from configmaps deployed into the same cluster. For more information check out the [documentation for the chart](https://github.com/helm/charts/tree/master/stable/grafana)
372
373 ### Coreos CRDs
374 The CRDs are provisioned using crd-install hooks, rather than relying on a separate chart installation. If you already have these CRDs provisioned and don't want to remove them, you can disable the CRD creation by these hooks by passing `prometheusOperator.createCustomResource=false`
375
376 ### Kubelet Service
377 Because the kubelet service has a new name in the chart, make sure to clean up the old kubelet service in the `kube-system` namespace to prevent counting container metrics twice
378
379 ### Persistent Volumes
380 If you would like to keep the data of the current persistent volumes, it should be possible to attach existing volumes to new PVCs and PVs that are created using the conventions in the new chart. For example, in order to use an existing Azure disk for a helm release called `prometheus-migration` the following resources can be created:
381 ```
382 apiVersion: v1
383 kind: PersistentVolume
384 metadata:
385   name: pvc-prometheus-migration-prometheus-0
386 spec:
387   accessModes:
388   - ReadWriteOnce
389   azureDisk:
390     cachingMode: None
391     diskName: pvc-prometheus-migration-prometheus-0
392     diskURI: /subscriptions/f5125d82-2622-4c50-8d25-3f7ba3e9ac4b/resourceGroups/sample-migration-resource-group/providers/Microsoft.Compute/disks/pvc-prometheus-migration-prometheus-0
393     fsType: ""
394     kind: Managed
395     readOnly: false
396   capacity:
397     storage: 1Gi
398   persistentVolumeReclaimPolicy: Delete
399   storageClassName: prometheus
400   volumeMode: Filesystem
401 ```
402 ```
403 apiVersion: v1
404 kind: PersistentVolumeClaim
405 metadata:
406   labels:
407     app: prometheus
408     prometheus: prometheus-migration-prometheus
409   name: prometheus-prometheus-migration-prometheus-db-prometheus-prometheus-migration-prometheus-0
410   namespace: monitoring
411 spec:
412   accessModes:
413   - ReadWriteOnce
414   dataSource: null
415   resources:
416     requests:
417       storage: 1Gi
418   storageClassName: prometheus
419   volumeMode: Filesystem
420   volumeName: pvc-prometheus-migration-prometheus-0
421 status:
422   accessModes:
423   - ReadWriteOnce
424   capacity:
425     storage: 1Gi
426 ```
427
428 The PVC will take ownership of the PV and when you create a release using a persistent volume claim template it will use the existing PVCs as they match the naming convention used by the chart. For other cloud providers similar approaches can be used.