914b67d6306a4ac210bbe34b5b317b371f7c1eb4
[demo.git] / vnfs / DAaaS / 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.
4
5 ## TL;DR;
6
7 ```console
8 $ helm install stable/prometheus-operator
9 ```
10
11 ## Introduction
12
13 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.
14
15 ## Prerequisites
16   - Kubernetes 1.10+ with Beta APIs
17   - Helm 2.10+ (For a workaround using an earlier version see [below](#helm-210-workaround))
18
19 ## Installing the Chart
20
21 To install the chart with the release name `my-release`:
22
23 ```console
24 $ helm install --name my-release stable/prometheus-operator
25 ```
26
27 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.
28
29 The default installation includes Prometheus Operator, Alertmanager, Grafana, and configuration for scraping Kubernetes infrastructure.
30
31 ## Uninstalling the Chart
32
33 To uninstall/delete the `my-release` deployment:
34
35 ```console
36 $ helm delete my-release
37 ```
38
39 The command removes all the Kubernetes components associated with the chart and deletes the release.
40
41 CRDs created by this chart are not removed by default and should be manually cleaned up:
42
43 ```
44 kubectl delete crd prometheuses.monitoring.coreos.com
45 kubectl delete crd prometheusrules.monitoring.coreos.com
46 kubectl delete crd servicemonitors.monitoring.coreos.com
47 kubectl delete crd alertmanagers.monitoring.coreos.com
48 ```
49
50 ## Configuration
51
52 The following tables lists the configurable parameters of the prometheus-operator chart and their default values.
53
54 ### General
55 | Parameter | Description | Default |
56 | ----- | ----------- | ------ |
57 | `nameOverride` | Provide a name in place of `prometheus-operator` |`""`|
58 | `fullNameOverride` | Provide a name to substitute for the full names of resources |`""`|
59 | `commonLabels` | Labels to apply to all resources | `[]` |
60 | `defaultRules.create` | Create default rules for monitoring the cluster | `true` |
61 | `defaultRules.labels` | Labels for default rules for monitoring the cluster | `{}` |
62 | `defaultRules.annotations` | Annotations for default rules for monitoring the cluster | `{}` |
63 | `global.rbac.create` | Create RBAC resources | `true` |
64 | `global.rbac.pspEnabled` | Create pod security policy resources | `true` |
65 | `global.imagePullSecrets` | Reference to one or more secrets to be used when pulling images | `[]` |
66
67 ### Prometheus Operator
68 | Parameter | Description | Default |
69 | ----- | ----------- | ------ |
70 | `prometheusOperator.enabled` | Deploy Prometheus Operator. Only one of these should be deployed into the cluster | `true` |
71 | `prometheusOperator.serviceAccount` | Create a serviceaccount for the operator | `true` |
72 | `prometheusOperator.name` | Operator serviceAccount name | `""` |
73 | `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` |
74 | `prometheusOperator.crdApiGroup` | Specify the API Group for the CustomResourceDefinitions | `monitoring.coreos.com` |
75 | `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` |
76 | `prometheusOperator.podLabels` | Labels to add to the operator pod | `{}` |
77 | `prometheusOperator.priorityClassName` | Name of Priority Class to assign pods | `nil` |
78 | `prometheusOperator.kubeletService.enabled` | If true, the operator will create and maintain a service for scraping kubelets | `true` |
79 | `prometheusOperator.kubeletService.namespace` | Namespace to deploy kubelet service | `kube-system` |
80 | `prometheusOperator.serviceMonitor.selfMonitor` | Enable monitoring of prometheus operator | `true` |
81 | `prometheusOperator.service.type` | Prometheus operator service type | `ClusterIP` |
82 | `prometheusOperator.service.clusterIP` | Prometheus operator service clusterIP IP | `""` |
83 | `prometheusOperator.service.nodePort` | Port to expose prometheus operator service on each node | `38080` |
84 | `prometheusOperator.service.annotations` | Annotations to be added to the prometheus operator service | `{}` |
85 | `prometheusOperator.service.labels` |  Prometheus Operator Service Labels | `{}` |
86 | `prometheusOperator.service.externalIPs` | List of IP addresses at which the Prometheus Operator server service is available  | `[]` |
87 | `prometheusOperator.service.loadBalancerIP` |  Prometheus Operator Loadbalancer IP | `""` |
88 | `prometheusOperator.service.loadBalancerSourceRanges` | Prometheus Operator Load Balancer Source Ranges | `[]` |
89 | `prometheusOperator.resources` | Resource limits for prometheus operator | `{}` |
90 | `prometheusOperator.securityContext` | SecurityContext for prometheus operator | `{"runAsNonRoot": true, "runAsUser": 65534}` |
91 | `prometheusOperator.nodeSelector` | Prometheus operator node selector https://kubernetes.io/docs/user-guide/node-selection/ | `{}` |
92 | `prometheusOperator.tolerations` | Tolerations for use with node taints https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ | `[]` |
93 | `prometheusOperator.affinity` | Assign the prometheus operator to run on specific nodes https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | `{}` |
94 | `prometheusOperator.image.repository` | Repository for prometheus operator image | `quay.io/coreos/prometheus-operator` |
95 | `prometheusOperator.image.tag` | Tag for prometheus operator image | `v0.26.0` |
96 | `prometheusOperator.image.pullPolicy` | Pull policy for prometheus operator image | `IfNotPresent` |
97 | `prometheusOperator.configmapReloadImage.repository` | Repository for configmapReload image | `quay.io/coreos/configmap-reload` |
98 | `prometheusOperator.configmapReloadImage.tag` | Tag for configmapReload image | `v0.0.1` |
99 | `prometheusOperator.prometheusConfigReloaderImage.repository` | Repository for config-reloader image | `quay.io/coreos/prometheus-config-reloader` |
100 | `prometheusOperator.prometheusConfigReloaderImage.tag` | Tag for config-reloader image | `v0.26.0` |
101 | `prometheusOperator.hyperkubeImage.repository` | Repository for hyperkube image used to perform maintenance tasks | `k8s.gcr.io/hyperkube` |
102 | `prometheusOperator.hyperkubeImage.tag` | Tag for hyperkube image used to perform maintenance tasks | `v1.12.1` |
103 | `prometheusOperator.hyperkubeImage.repository` | Image pull policy for hyperkube image used to perform maintenance tasks | `IfNotPresent` |
104
105 ### Prometheus
106 | Parameter | Description | Default |
107 | ----- | ----------- | ------ |
108 | `prometheus.enabled` | Deploy prometheus | `true` |
109 | `prometheus.serviceMonitor.selfMonitor` | Create a `serviceMonitor` to automatically monitor the prometheus instance | `true` |
110 | `prometheus.serviceAccount.create` | Create a default serviceaccount for prometheus to use | `true` |
111 | `prometheus.serviceAccount.name` | Name for prometheus serviceaccount | `""` |
112 | `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"]` |
113 | `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` |
114 | `prometheus.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
115 | `prometheus.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `""` |
116 | `prometheus.ingress.enabled` | If true, Prometheus Ingress will be created | `false` |
117 | `prometheus.ingress.annotations` | Prometheus Ingress annotations | `{}` |
118 | `prometheus.ingress.labels` | Prometheus Ingress additional labels | `{}` |
119 | `prometheus.ingress.hosts` | Prometheus Ingress hostnames | `[]` |
120 | `prometheus.ingress.tls` | Prometheus Ingress TLS configuration (YAML) | `[]` |
121 | `prometheus.service.type` |  Prometheus Service type | `ClusterIP` |
122 | `prometheus.service.clusterIP` | Prometheus service clusterIP IP | `""` |
123 | `prometheus.service.nodePort` |  Prometheus Service port for NodePort service type | `39090` |
124 | `prometheus.service.annotations` |  Prometheus Service Annotations | `{}` |
125 | `prometheus.service.labels` |  Prometheus Service Labels | `{}` |
126 | `prometheus.service.externalIPs` | List of IP addresses at which the Prometheus server service is available  | `[]` |
127 | `prometheus.service.loadBalancerIP` |  Prometheus Loadbalancer IP | `""` |
128 | `prometheus.service.loadBalancerSourceRanges` | Prometheus Load Balancer Source Ranges | `[]` |
129 | `prometheus.additionalServiceMonitors` | List of `serviceMonitor` objects to create. See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#servicemonitorspec | `[]` |
130 | `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. | `{}` |
131 | `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` |
132 | `prometheus.prometheusSpec.serviceMonitorSelector` | ServiceMonitors to be selected for target discovery. | `{}` |
133 | `prometheus.prometheusSpec.serviceMonitorNamespaceSelector` | Namespaces to be selected for ServiceMonitor discovery. If nil, only check own namespace. | `{}` |
134 | `prometheus.prometheusSpec.image.repository` | Base image to use for a Prometheus deployment. | `quay.io/prometheus/prometheus` |
135 | `prometheus.prometheusSpec.image.tag` | Tag of Prometheus container image to be deployed. | `v2.5.0` |
136 | `prometheus.prometheusSpec.paused` | When a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects. | `false` |
137 | `prometheus.prometheusSpec.replicas` | Number of instances to deploy for a Prometheus deployment. | `1` |
138 | `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` |
139 | `prometheus.prometheusSpec.logLevel` | Log level for Prometheus to be configured with. | `info` |
140 | `prometheus.prometheusSpec.scrapeInterval` | Interval between consecutive scrapes. | `""` |
141 | `prometheus.prometheusSpec.evaluationInterval` | Interval between consecutive evaluations. | `""` |
142 | `prometheus.prometheusSpec.externalLabels` | The labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). | `[]` |
143 | `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. | `""` |
144 | `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`. | `/` |
145 | `prometheus.prometheusSpec.storageSpec` | Storage spec to specify how storage shall be used. | `{}` |
146 | `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` |
147 | `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. | `{}` |
148 | `prometheus.prometheusSpec.ruleNamespaceSelector` | Namespaces to be selected for PrometheusRules discovery. If unspecified, only the same namespace as the Prometheus object is in is used. | `{}` |
149 | `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 | `[]` |
150 | `prometheus.prometheusSpec.resources` | Define resources requests and limits for single Pods. | `{}` |
151 | `prometheus.prometheusSpec.nodeSelector` | Define which Nodes the Pods are scheduled on. | `{}` |
152 | `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. | `[]` |
153 | `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/ | `[]` |
154 |`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. | `""` |
155 | `prometheus.prometheusSpec.tolerations` | If specified, the pod's tolerations. | `[]` |
156 | `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. | `[]` |
157 | `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. | `[]` |
158 | `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}` |
159 | `prometheus.prometheusSpec.listenLocal` | ListenLocal makes the Prometheus server listen on loopback, so that it does not bind against the Pod IP. | `false` |
160 | `prometheus.prometheusSpec.containers` | Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to a Prometheus pod. |`[]`|
161 | `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. | `{}` |
162 | `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` |
163 | `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. | `{}` |
164 | `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. | `[]` |
165 | `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 | `{}` |
166 | `prometheus.prometheusSpec.priorityClassName` | Priority class assigned to the Pods | `""` |
167
168 ### Alertmanager
169 | Parameter | Description | Default |
170 | ----- | ----------- | ------ |
171 | `alertmanager.enabled` | Deploy alertmanager | `true` |
172 | `alertmanager.serviceAccount.create` | Create a `serviceAccount` for alertmanager | `true` |
173 | `alertmanager.serviceAccount.name` | Name for Alertmanager service account | `""` |
174 | `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` |
175 | `alertmanager.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
176 | `alertmanager.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `""` |
177 | `alertmanager.ingress.enabled` | If true, Alertmanager Ingress will be created | `false` |
178 | `alertmanager.ingress.annotations` | Alertmanager Ingress annotations | `{}` |
179 | `alertmanager.ingress.labels` | Alertmanager Ingress additional labels | `{}` |
180 | `alertmanager.ingress.hosts` | Alertmanager Ingress hostnames | `[]` |
181 | `alertmanager.ingress.tls` | Alertmanager Ingress TLS configuration (YAML) | `[]` |
182 | `alertmanager.service.type` | Alertmanager Service type | `ClusterIP` |
183 | `alertmanager.service.clusterIP` | Alertmanager service clusterIP IP | `""` |
184 | `alertmanager.service.nodePort` | Alertmanager Service port for NodePort service type | `30903` |
185 | `alertmanager.service.annotations` | Alertmanager Service annotations | `{}` |
186 | `alertmanager.service.labels` |  Alertmanager Service Labels | `{}` |
187 | `alertmanager.service.externalIPs` | List of IP addresses at which the Alertmanager server service is available  | `[]` |
188 | `alertmanager.service.loadBalancerIP` |  Alertmanager Loadbalancer IP | `""` |
189 | `alertmanager.service.loadBalancerSourceRanges` | Alertmanager Load Balancer Source Ranges | `[]` |
190 | `alertmanager.config` | Provide YAML to configure Alertmanager. See https://prometheus.io/docs/alerting/configuration/#configuration-file. The default provided works to suppress the DeadMansSwitch 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":"DeadMansSwitch"},"receiver":"null"}]},"receivers":[{"name":"null"}]}` |
191 | `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. | `{}` |
192 | `alertmanager.alertmanagerSpec.image.tag` | Tag of Alertmanager container image to be deployed. | `v0.15.3` |
193 | `alertmanager.alertmanagerSpec.image.repository` | Base image that is used to deploy pods, without tag. | `quay.io/prometheus/alertmanager` |
194 | `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>. | `[]` |
195 | `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/ | `[]` |
196 | `alertmanager.alertmanagerSpec.logLevel` | Log level for Alertmanager to be configured with. | `info` |
197 | `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` |
198 | `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` |
199 | `alertmanager.alertmanagerSpec.storage` | Storage is the definition of how storage will be used by the Alertmanager instances. | `{}` |
200 | `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. | `""` |
201 | `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`. | `/` |
202 | `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` |
203 | `alertmanager.alertmanagerSpec.nodeSelector` | Define which Nodes the Pods are scheduled on. | `{}` |
204 | `alertmanager.alertmanagerSpec.resources` | Define resources requests and limits for single Pods. | `{}` |
205 | `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. | `""` |
206 | `alertmanager.alertmanagerSpec.tolerations` | If specified, the pod's tolerations. | `[]` |
207 | `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}` |
208 | `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` |
209 | `alertmanager.alertmanagerSpec.containers` | Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an Alertmanager pod. | `[]` |
210 | `alertmanager.alertmanagerSpec.priorityClassName` | Priority class assigned to the Pods | `""` |
211 | `alertmanager.alertmanagerSpec.additionalPeers` | AdditionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster. | `[]` |
212
213 ### Grafana
214 | Parameter | Description | Default |
215 | ----- | ----------- | ------ |
216 | `grafana.enabled` | If true, deploy the grafana sub-chart | `true` |
217 | `grafana.adminPassword` | Admin password to log into the grafana UI | "prom-operator" |
218 | `grafana.defaultDashboardsEnabled` | Deploy default dashboards. These are loaded using the sidecar | `true` |
219 | `grafana.ingress.enabled` | Enables Ingress for Grafana | `false` |
220 | `grafana.ingress.annotations` | Ingress annotations for Grafana | `{}` |
221 | `grafana.ingress.labels` | Custom labels for Grafana Ingress | `{}` |
222 | `grafana.ingress.hosts` | Ingress accepted hostnames for Grafana| `[]` |
223 | `grafana.ingress.tls` | Ingress TLS configuration for Grafana | `[]` |
224 | `grafana.sidecar.dashboards.enabled` | Enable the Grafana sidecar to automatically load dashboards with a label `{{ grafana.sidecar.dashboards.label }}=1` | `true` |
225 | `grafana.sidecar.dashboards.label` | If the sidecar is enabled, configmaps with this label will be loaded into Grafana as dashboards | `grafana_dashboard` |
226 | `grafana.sidecar.datasources.enabled` | Enable the Grafana sidecar to automatically load dashboards with a label `{{ grafana.sidecar.datasources.label }}=1` | `true` |
227 | `grafana.sidecar.datasources.label` | If the sidecar is enabled, configmaps with this label will be loaded into Grafana as datasources configurations | `grafana_datasource` |
228 | `grafana.rbac.pspUseAppArmor` | Enforce AppArmor in created PodSecurityPolicy (requires rbac.pspEnabled) | `true` |
229
230 ### Exporters
231 | Parameter | Description | Default |
232 | ----- | ----------- | ------ |
233 | `kubeApiServer.enabled` | Deploy `serviceMonitor` to scrape the Kubernetes API server | `true` |
234 | `kubeApiServer.tlsConfig.serverName` | Name of the server to use when validating TLS certificate | `kubernetes` |
235 | `kubeApiServer.tlsConfig.insecureSkipVerify` | Skip TLS certificate validation when scraping | `false` |
236 | `kubeApiServer.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus | `component` |
237 | `kubeApiServer.serviceMonitor.selector` | The service selector | `{"matchLabels":{"component":"apiserver","provider":"kubernetes"}}`
238 | `kubelet.enabled` | Deploy servicemonitor to scrape the kubelet service. See also `prometheusOperator.kubeletService` | `true` |
239 | `kubelet.namespace` | Namespace where the kubelet is deployed. See also `prometheusOperator.kubeletService.namespace` | `kube-system` |
240 | `kubelet.serviceMonitor.https` | Enable scraping of the kubelet over HTTPS. For more information, see https://github.com/coreos/prometheus-operator/issues/926 | `false` |
241 | `kubeControllerManager.enabled` | Deploy a `service` and `serviceMonitor` to scrape the Kubernetes controller-manager | `true` |
242 | `kubeControllerManager.endpoints` | Endpoints where Controller-manager runs. Provide this if running Controller-manager outside the cluster | `[]` |
243 | `kubeControllermanager.service.port` | Controller-manager port for the service runs on | `10252` |
244 | `kubeControllermanager.service.targetPort` | Controller-manager targetPort for the service runs on | `10252` |
245 | `kubeControllermanager.service.targetPort.selector` | Controller-manager service selector | `{"k8s-app" : "kube-controller-manager" }`
246 | `coreDns.enabled` | Deploy coreDns scraping components. Use either this or kubeDns | true |
247 | `coreDns.service.port` | CoreDns port | `9153` |
248 | `coreDns.service.targetPort` | CoreDns targetPort | `9153` |
249 | `coreDns.service.selector` | CoreDns service selector | `{"k8s-app" : "coredns" }`
250 | `kubeDns.enabled` | Deploy kubeDns scraping components. Use either this or coreDns| `false` |
251 | `kubeDns.service.selector` | CoreDns service selector | `{"k8s-app" : "kube-dns" }` |
252 | `kubeEtcd.enabled` | Deploy components to scrape etcd | `true` |
253 | `kubeEtcd.endpoints` | Endpoints where etcd runs. Provide this if running etcd outside the cluster | `[]` |
254 | `kubeEtcd.service.port` | Etct port | `4001` |
255 | `kubeEtcd.service.targetPort` | Etct targetPort | `4001` |
256 | `kubeEtcd.service.selector` | Selector for etcd if running inside the cluster | `{"k8s-app":"etcd-server"}` |
257 | `kubeEtcd.servicemonitor.scheme` | Etcd servicemonitor scheme | `http` |
258 | `kubeEtcd.servicemonitor.insecureSkipVerify` | Skip validating etcd TLS certificate when scraping | `false` |
259 | `kubeEtcd.servicemonitor.serverName` | Etcd server name to validate certificate against when scraping | `""` |
260 | `kubeEtcd.servicemonitor.caFile` | Certificate authority file to use when connecting to etcd. See `prometheus.prometheusSpec.secrets` | `""` |
261 | `kubeEtcd.servicemonitor.certFile` | Client certificate file to use when connecting to etcd. See `prometheus.prometheusSpec.secrets` | `""` |
262 | `kubeEtcd.servicemonitor.keyFile` | Client key file to use when connecting to etcd.  See `prometheus.prometheusSpec.secrets` | `""` |
263 | `kubeScheduler.enabled` | Deploy a `service` and `serviceMonitor` to scrape the Kubernetes scheduler | `true` |
264 | `kubeScheduler.endpoints` | Endpoints where scheduler runs. Provide this if running scheduler outside the cluster | `[]` |
265 | `kubeScheduler.service.port` | Scheduler port for the service runs on | `10251` |
266 | `kubeScheduler.service.targetPort` | Scheduler targetPort for the service runs on | `10251` |
267 | `kubeScheduler.service.targetPort.selector` | Scheduler service selector | `{"k8s-app" : "kube-scheduler" }`
268 | `kubeStateMetrics.enabled` | Deploy the `kube-state-metrics` chart and configure a servicemonitor to scrape | `true` |
269 | `kube-state-metrics.rbac.create` | Create RBAC components in kube-state-metrics. See `global.rbac.create` | `true` |
270 | `nodeExporter.enabled` | Deploy the `prometheus-node-exporter` and scrape it | `true` |
271 | `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` |
272 | `prometheus-node-exporter.podLabels` | Additional labels for pods in the DaemonSet | `{"jobLabel":"node-exporter"}` |
273 | `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)$"]` |
274
275
276 Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
277
278 ```console
279 $ helm install --name my-release stable/prometheus-operator --set prometheusOperator.enabled=true
280 ```
281
282 Alternatively, one or more YAML files that specify the values for the above parameters can be provided while installing the chart. For example,
283
284 ```console
285 $ helm install --name my-release stable/prometheus-operator -f values1.yaml,values2.yaml
286 ```
287
288 > **Tip**: You can use the default [values.yaml](values.yaml)
289
290
291 ## Developing Prometheus Rules and Grafana Dashboards
292
293 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.
294
295 ## Further Information
296
297 For more in-depth documentation of configuration options meanings, please see
298 - [Prometheus Operator](https://github.com/coreos/prometheus-operator)
299 - [Prometheus](https://prometheus.io/docs/introduction/overview/)
300 - [Grafana](https://github.com/helm/charts/tree/master/stable/grafana#grafana-helm-chart)
301
302 ## Helm <2.10 workaround
303 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:
304 1. Install prometheus-operator by itself, disabling everything but the prometheus-operator component, and also setting `prometheusOperator.serviceMonitor.selfMonitor=false`
305 2. Install all the other components, and configure `prometheus.additionalServiceMonitors` to scrape the prometheus-operator service.