From 819f7dbe5239e586323a94b1917679189a57adc4 Mon Sep 17 00:00:00 2001 From: Giancarlo Rubio Date: Tue, 23 Oct 2018 18:34:30 +0200 Subject: [PATCH] Migrate prometheus operator from coreos (#6765) * Create promethues-operator chart Signed-off-by: Giancarlo Rubio * Fixes for stable/prometheus-operator Changed: - Update Prometheus to 2.4.3, alertmanager to 0.15.2 - Change some job labels - should refer to a label appearing on the service. Tried to keep this consistent with what was used in the coreos version - Add confguration for using CoreDNS - Add insecureSkipVerify to kubeApiServer - Add `prometheus.additionalScrapeConfigs`, `prometheus.additionalAlertManagerConfigs` - Add ability to deploy an operated prometheus without installing anything else - Switch `prometheus.serviceAccountName` to be based on `prometheus.fullname` to prevent clashes - Fix `serviceMonitorSelector` typo - Add `serviceMonitorNamespaceSelector` to values.yaml - Fix grafana typo (https://github.com/helm/charts/pull/6765#issuecomment-428653560) Add CoreDNS dashboard - Fixed dashboard use of updated name metric Signed-off-by: Giancarlo Rubio Signed-off-by: Vasily Sliouniaev Vas prometheus operator (#5) * Fix lint * Fix missing selector on kubelet https://github.com/helm/charts/pull/6765#issuecomment-431035212 * Fix braces in files * Fix naming * Move non-exporters out of exporters folder * Use common value names, add to readme * Change value names deploy -> enabled https://github.com/helm/charts/pull/6765#issuecomment-428283768 https://github.com/helm/charts/pull/6765#issuecomment-430070684 * Update etcd rules https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/etcd3_alert.rules.yml * Fix etcd rules to match job name * Review readme * Change initial version to 0.1.0 Additional Fixes While Github is down (#6) * Fix additional service monitor template * Fix label indentation https://github.com/helm/charts/pull/6765#issuecomment-431788727 Fix cleanup, requirements.lock file (#7) --- stable/prometheus-operator/.helmignore | 21 + stable/prometheus-operator/Chart.yaml | 17 + stable/prometheus-operator/OWNERS | 4 + stable/prometheus-operator/README.md | 253 ++ .../prometheus-operator/ci/test-values.yaml | 868 +++++ .../dashboards/grafana-coredns-k8s.json | 1308 +++++++ .../dashboards/grafana-dashboard-etcd.json | 1805 ++++++++++ ...rafana-dashboard-k8s-cluster-rsrc-use.json | 909 +++++ .../grafana-dashboard-k8s-node-rsrc-use.json | 936 +++++ ...afana-dashboard-k8s-resources-cluster.json | 1321 +++++++ ...ana-dashboard-k8s-resources-namespace.json | 832 +++++ .../grafana-dashboard-k8s-resources-pod.json | 859 +++++ .../dashboards/grafana-dashboard-nodes.json | 1111 ++++++ .../grafana-dashboard-statefulset.json | 843 +++++ stable/prometheus-operator/requirements.lock | 12 + stable/prometheus-operator/requirements.yaml | 16 + .../prometheus-operator/templates/NOTES.txt | 5 + .../templates/_helpers.tpl | 91 + .../templates/alertmanager/alertmanager.yaml | 97 + .../templates/alertmanager/ingress.yaml | 33 + .../alertmanager/podDisruptionBudget.yaml | 20 + .../alertmanager/psp-clusterrole.yaml | 15 + .../alertmanager/psp-clusterrolebinding.yaml | 17 + .../templates/alertmanager/psp.yaml | 48 + .../templates/alertmanager/secret.yaml | 14 + .../templates/alertmanager/service.yaml | 22 + .../alertmanager/serviceaccount.yaml | 11 + .../alertmanager/servicemonitor.yaml | 20 + .../templates/all-prometheus-rules.yaml | 1226 +++++++ .../templates/exporters/core-dns/service.yaml | 20 + .../exporters/core-dns/servicemonitor.yaml | 22 + .../kube-api-server/servicemonitor.yaml | 25 + .../kube-controller-manager/service.yaml | 20 + .../servicemonitor.yaml | 25 + .../templates/exporters/kube-dns/service.yaml | 24 + .../exporters/kube-dns/servicemonitor.yaml | 25 + .../exporters/kube-etcd/endpoints.yaml | 20 + .../exporters/kube-etcd/service.yaml | 23 + .../exporters/kube-etcd/servicemonitor.yaml | 39 + .../exporters/kube-scheduler/service.yaml | 21 + .../kube-scheduler/servicemonitor.yaml | 21 + .../kube-state-metrics/serviceMonitor.yaml | 19 + .../exporters/kubelet/servicemonitor.yaml | 44 + .../node-exporter/servicemonitor.yaml | 18 + .../grafana/configmap-dashboards.yaml | 20 + .../grafana/configmaps-datasources.yaml | 19 + .../prometheus-operator/cleanup-crds.yaml | 43 + .../prometheus-operator/clusterrole.yaml | 71 + .../clusterrolebinding.yaml | 17 + .../prometheus-operator/crd-alertmanager.yaml | 2442 +++++++++++++ .../prometheus-operator/crd-prometheus.yaml | 3140 +++++++++++++++++ .../crd-prometheusrules.yaml | 360 ++ .../crd-servicemonitor.yaml | 310 ++ .../prometheus-operator/deployment.yaml | 62 + .../prometheus-operator/psp-clusterrole.yaml | 15 + .../psp-clusterrolebinding.yaml | 17 + .../templates/prometheus-operator/psp.yaml | 47 + .../prometheus-operator/service.yaml | 19 + .../prometheus-operator/serviceaccount.yaml | 11 + .../prometheus-operator/servicemonitor.yaml | 20 + .../additionalAlertmanagerConfigs.yaml | 11 + .../prometheus/additionalScrapeConfigs.yaml | 11 + .../templates/prometheus/clusterrole.yaml | 35 + .../prometheus/clusterrolebinding.yaml | 18 + .../templates/prometheus/ingress.yaml | 33 + .../prometheus/podDisruptionBudget.yaml | 20 + .../templates/prometheus/prometheus.yaml | 154 + .../templates/prometheus/psp-clusterrole.yaml | 15 + .../prometheus/psp-clusterrolebinding.yaml | 18 + .../templates/prometheus/psp.yaml | 47 + .../templates/prometheus/role-config.yaml | 16 + .../prometheus/role-specificNamespace.yaml | 27 + .../prometheus/rolebinding-config.yaml | 17 + .../rolebinding-specificNamespace.yaml | 23 + .../templates/prometheus/service.yaml | 17 + .../templates/prometheus/serviceaccount.yaml | 11 + .../templates/prometheus/servicemonitor.yaml | 20 + .../templates/prometheus/servicemonitors.yaml | 29 + stable/prometheus-operator/values.yaml | 872 +++++ 79 files changed, 21107 insertions(+) create mode 100644 stable/prometheus-operator/.helmignore create mode 100644 stable/prometheus-operator/Chart.yaml create mode 100644 stable/prometheus-operator/OWNERS create mode 100644 stable/prometheus-operator/README.md create mode 100644 stable/prometheus-operator/ci/test-values.yaml create mode 100644 stable/prometheus-operator/dashboards/grafana-coredns-k8s.json create mode 100644 stable/prometheus-operator/dashboards/grafana-dashboard-etcd.json create mode 100644 stable/prometheus-operator/dashboards/grafana-dashboard-k8s-cluster-rsrc-use.json create mode 100644 stable/prometheus-operator/dashboards/grafana-dashboard-k8s-node-rsrc-use.json create mode 100644 stable/prometheus-operator/dashboards/grafana-dashboard-k8s-resources-cluster.json create mode 100644 stable/prometheus-operator/dashboards/grafana-dashboard-k8s-resources-namespace.json create mode 100644 stable/prometheus-operator/dashboards/grafana-dashboard-k8s-resources-pod.json create mode 100644 stable/prometheus-operator/dashboards/grafana-dashboard-nodes.json create mode 100644 stable/prometheus-operator/dashboards/grafana-dashboard-statefulset.json create mode 100644 stable/prometheus-operator/requirements.lock create mode 100644 stable/prometheus-operator/requirements.yaml create mode 100644 stable/prometheus-operator/templates/NOTES.txt create mode 100644 stable/prometheus-operator/templates/_helpers.tpl create mode 100644 stable/prometheus-operator/templates/alertmanager/alertmanager.yaml create mode 100644 stable/prometheus-operator/templates/alertmanager/ingress.yaml create mode 100644 stable/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml create mode 100644 stable/prometheus-operator/templates/alertmanager/psp-clusterrole.yaml create mode 100644 stable/prometheus-operator/templates/alertmanager/psp-clusterrolebinding.yaml create mode 100644 stable/prometheus-operator/templates/alertmanager/psp.yaml create mode 100644 stable/prometheus-operator/templates/alertmanager/secret.yaml create mode 100644 stable/prometheus-operator/templates/alertmanager/service.yaml create mode 100644 stable/prometheus-operator/templates/alertmanager/serviceaccount.yaml create mode 100644 stable/prometheus-operator/templates/alertmanager/servicemonitor.yaml create mode 100644 stable/prometheus-operator/templates/all-prometheus-rules.yaml create mode 100644 stable/prometheus-operator/templates/exporters/core-dns/service.yaml create mode 100644 stable/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml create mode 100644 stable/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml create mode 100644 stable/prometheus-operator/templates/exporters/kube-controller-manager/service.yaml create mode 100644 stable/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml create mode 100644 stable/prometheus-operator/templates/exporters/kube-dns/service.yaml create mode 100644 stable/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml create mode 100644 stable/prometheus-operator/templates/exporters/kube-etcd/endpoints.yaml create mode 100644 stable/prometheus-operator/templates/exporters/kube-etcd/service.yaml create mode 100644 stable/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml create mode 100644 stable/prometheus-operator/templates/exporters/kube-scheduler/service.yaml create mode 100644 stable/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml create mode 100644 stable/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml create mode 100644 stable/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml create mode 100644 stable/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml create mode 100644 stable/prometheus-operator/templates/grafana/configmap-dashboards.yaml create mode 100644 stable/prometheus-operator/templates/grafana/configmaps-datasources.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/cleanup-crds.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/clusterrole.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/clusterrolebinding.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/crd-alertmanager.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/crd-prometheus.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/crd-prometheusrules.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/crd-servicemonitor.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/deployment.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/psp-clusterrole.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/psp-clusterrolebinding.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/psp.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/service.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml create mode 100644 stable/prometheus-operator/templates/prometheus-operator/servicemonitor.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/additionalAlertmanagerConfigs.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/additionalScrapeConfigs.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/clusterrole.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/clusterrolebinding.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/ingress.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/podDisruptionBudget.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/prometheus.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/psp-clusterrole.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/psp-clusterrolebinding.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/psp.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/role-config.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/role-specificNamespace.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/rolebinding-config.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/rolebinding-specificNamespace.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/service.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/serviceaccount.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/servicemonitor.yaml create mode 100644 stable/prometheus-operator/templates/prometheus/servicemonitors.yaml create mode 100644 stable/prometheus-operator/values.yaml diff --git a/stable/prometheus-operator/.helmignore b/stable/prometheus-operator/.helmignore new file mode 100644 index 000000000000..f0c131944441 --- /dev/null +++ b/stable/prometheus-operator/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/stable/prometheus-operator/Chart.yaml b/stable/prometheus-operator/Chart.yaml new file mode 100644 index 000000000000..bc9a6fc8bfcb --- /dev/null +++ b/stable/prometheus-operator/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +description: Provides easy monitoring definitions for Kubernetes services, and deployment and management of Prometheus instances. +icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png +engine: gotpl +maintainers: + - name: gianrubio + email: gianrubio@gmail.com +name: prometheus-operator +sources: + - https://github.com/coreos/prometheus-operator + - https://coreos.com/operators/prometheus +version: 0.1.0 +appVersion: "0.22.2" +home: https://github.com/coreos/prometheus-operator +keywords: +- operator +- prometheus diff --git a/stable/prometheus-operator/OWNERS b/stable/prometheus-operator/OWNERS new file mode 100644 index 000000000000..ca300fa25d28 --- /dev/null +++ b/stable/prometheus-operator/OWNERS @@ -0,0 +1,4 @@ +approvers: +- gianrubio +reviewers: +- gianrubio diff --git a/stable/prometheus-operator/README.md b/stable/prometheus-operator/README.md new file mode 100644 index 000000000000..fa55b21eab08 --- /dev/null +++ b/stable/prometheus-operator/README.md @@ -0,0 +1,253 @@ +# prometheus-operator + +Installs [prometheus-operator](https://github.com/coreos/prometheus-operator) to create/configure/manage Prometheus clusters atop Kubernetes. + +## TL;DR; + +```console +$ helm install stable/prometheus-operator +``` + +## Introduction + +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 Proemtheus Operator. + +## Prerequisites + - Kubernetes 1.10+ with Beta APIs + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +$ helm install --name my-release incubator/prometheus-operator +``` + +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. + +The default installation includes Prometheus Operator, Alertmanager, Grafana, and configuration for scraping Kubernetes infrastructure. + +## 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. + +CRDs created by this chart are not removed by default and should be manually cleaned up: + +``` +kubectl delete crd prometheuses.monitoring.coreos.com +kubectl delete crd prometheusrules.monitoring.coreos.com +kubectl delete crd servicemonitors.monitoring.coreos.com +kubectl delete crd alertmanagers.monitoring.coreos.com +``` + +## Configuration + +The following tables lists the configurable parameters of the prometheus-operator chart and their default values. + +### General +| Parameter | Description | Default | +| ----- | ----------- | ------ | +| `nameOverride` | Provide a name in place of `prometheus-operator` |`""`| +| `fullNameOverride` | Provide a name to substitue for the full names of resources |`""`| +| `commonLabels` | Labels to apply to all resources | `[]` | +| `defaultRules.create` | Create default rules for monitoring the cluster | `true` | +| `global.rbac.create` | Create RBAC resources | `true` | +| `global.rbac.pspEnabled` | Create pod security policy resources | `true` | +| `global.imagePullSecrets` | Reference to one or more secrets to be used when pulling images | `[]` | + +### Prometheus Operator +| Parameter | Description | Default | +| ----- | ----------- | ------ | +| `prometheusOperator.enabled` | Deploy Prometheus Operator. Only one of these should be deployed into the cluster | `true` | +| `prometheusOperator.serviceAccount` | Create a serviceaccount for the operator | `true` | +| `prometheusOperator.name` | Operator serviceAccount name | `""` | +| `prometheusOperator.createCustomResource` | Create CRDs. Required if deploying anyting 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` | +| `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 oeprator from being able to clean up resources that it manages | `false` | +| `prometheusOperator.podLabels` | Labels to add to the operator pod | `{}` | +| `prometheusOperator.kubeletService.enabled` | If true, the operator will create and maintain a service for scraping kubelets | `true` | +| `prometheusOperator.kubeletService.namespace` | Namespace to deploy kubelet service | `true` | +| `prometheusOperator.serviceMonitor.selfMonitor` | Enabel monitoring of prometheus operator | `true` | +| `prometheusOperator.resources` | Resource limits for prometheus operator | `{}` | +| `prometheusOperator.nodeSelector` | Prometheus operator node selector https://kubernetes.io/docs/user-guide/node-selection/ | `[]` | +| `prometheusOperator.tolerations` | Tolerations for use with node taints https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ | `{}` | +| `prometheusOperator.affinity` | Assign the prometheus operator to run on specific nodes https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | `{}` | +| `prometheusOperator.image.repository` | Repository for prometheus operator image | `quay.io/coreos/prometheus-operator` | +| `prometheusOperator.image.tag` | Tag for prometheus operator image | `v0.24.0` | +| `prometheusOperator.image.pullPolicy` | Pull policy for prometheus operator image | `IfNotPresent` | +| `prometheusOperator.configmapReloadImage.repository` | Repository for configmapReload image | `quay.io/coreos/configmap-reload` | +| `prometheusOperator.configmapReloadImage.tag` | Tag for configmapReload image | `v0.0.1` | +| `prometheusOperator.prometheusConfigReloaderImage.repository` | Repository for config-reloader image | `quay.io/coreos/prometheus-config-reloader` | +| `prometheusOperator.prometheusConfigReloaderImage.tag` | Tag for config-reloader image | `v0.24.0` | +| `prometheusOperator.hyperkubeImage.repository` | Repository for hyperkube image used to perform maintenance tasks | `gcr.io/google-containers/hyperkube` | +| `prometheusOperator.hyperkubeImage.tag` | Tag for hyperkube image used to perform maintenance tasks | `v1.12.1` | +| `prometheusOperator.hyperkubeImage.repository` | Image pull policy for hyperkube image used to perform maintenance tasks | `IfNotPresent` | + +### Prometheus +| Parameter | Description | Default | +| ----- | ----------- | ------ | +| `prometheus.enabled` | Deploy prometheus | `true` | +| `prometheus.serviceMonitor.selfMonitor` | Create a `serviceMonitor` to automatically monitor the prometheus instance | `true` | +| `prometheus.serviceAccount.create` | Create a default serviceaccount for prometheus to use | `true` | +| `prometheus.serviceAccount.name` | Name for prometheus serviceaccount | `""` | +| `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"]` | +| `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` | +| `prometheus.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `prometheus.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `""` | +| `prometheus.ingress.enabled` | If true, alertmanager Ingress will be created | `false` | +| `prometheus.ingress.annotations` | Alertmanager Ingress annotations | `{}` | +| `prometheus.ingress.labels` | Alertmanager Ingress additional labels | `{}` | +| `prometheus.ingress.hosts` | Alertmanager Ingress hostnames | `[]` | +| `prometheus.ingress.tls` | Alertmanager Ingress TLS configuration (YAML) | `[]` | +| `prometheus.additionalServiceMonitors` | List of `serviceMonitor` objects to create. See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#servicemonitorspec | `[]` | +| `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. | `{}` | +| `prometheus.prometheusSpec.serviceMonitorSelector` | ServiceMonitors to be selected for target discovery. | `{}` | +| `prometheus.prometheusSpec.serviceMonitorNamespaceSelector` | Namespaces to be selected for ServiceMonitor discovery. If nil, only check own namespace. | `{}` | +| `prometheus.prometheusSpec.image.repository` | Base image to use for a Prometheus deployment. | `quay.io/prometheus/prometheus` | +| `prometheus.prometheusSpec.image.tag` | Tag of Prometheus container image to be deployed. | `v2.3.4` | +| `prometheus.prometheusSpec.paused` | When a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects. | `false` | +| `prometheus.prometheusSpec.replicas` | Number of instances to deploy for a Prometheus deployment. | `1` | +| `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` | +| `prometheus.prometheusSpec.logLevel` | Log level for Prometheus to be configured with. | `info` | +| `prometheus.prometheusSpec.scrapeInterval` | Interval between consecutive scrapes. | `""` | +| `prometheus.prometheusSpec.evaluationInterval` | Interval between consecutive evaluations. | `""` | +| `prometheus.prometheusSpec.externalLabels` | The labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). | `[]` | +| `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. | `""` | +| `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`. | `/` | +| `prometheus.prometheusSpec.storage` | Storage spec to specify how storage shall be used. | `{}` | +| `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. | `{}` | +| `prometheus.prometheusSpec.ruleNamespaceSelector` | Namespaces to be selected for PrometheusRules discovery. If unspecified, only the same namespace as the Prometheus object is in is used. | `{}` | +| `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 | `[]` | +| `prometheus.prometheusSpec.resources` | Define resources requests and limits for single Pods. | `{}` | +| `prometheus.prometheusSpec.nodeSelector` | Define which Nodes the Pods are scheduled on. | `[]` | +| `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/. 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. | `[]` | +|`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. | `""` | +| `prometheus.prometheusSpec.tolerations` | If specified, the pod's tolerations. | `[]` | +| `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. | `[]` | +| `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. | `[]` | +| `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 for Prometheus >v2.0 and default PodSecurityContext for other versions. | `{}` | +| `prometheus.prometheusSpec.listenLocal` | ListenLocal makes the Prometheus server listen on loopback, so that it does not bind against the Pod IP. | `false` | +| `prometheus.prometheusSpec.containers` | Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to a Prometheus pod. |`[]`| +| `prometheus.prometheusSpec.additionalScrapeConfigs` | AdditionalScrapeConfigs allows specifying a key of a Secret containing additional Prometheus scrape configurations. Scrape configurations specified are appended to the configurations generated by the Prometheus Operator. Job configurations specified must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#. 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. | `{}` | +| `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` | +| `prometheus.prometheusSpec.additionalAlertManagerConfigs` | AdditionalAlertManagerConfigs allows specifying a key of a Secret containing additional Prometheus AlertManager configurations. AlertManager configurations specified are appended to the configurations generated by the Prometheus Operator. Job configurations specified must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#. 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. | `{}` | +| `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 | `{}` | +| `prometheus.prometheusSpec.priorityClassName` | Priority class assigned to the Pods | `""` | + +### Alertmanager +| Parameter | Description | Default | +| ----- | ----------- | ------ | +| `alertmanager.enabled` | Deploy alertmanager | `true` | +| `alertmanager.serviceAccount.create` | Create a `serviceAccount` for alertmanager | `true` | +| `alertmanager.serviceAccount.name` | Name for Alertmanager service account | `""` | +| `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` | +| `alertmanager.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `alertmanager.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `""` | +| `alertmanager.ingress.enabled` | If true, alertmanager Ingress will be created | `false` | +| `alertmanager.ingress.annotations` | Alertmanager Ingress annotations | `{}` | +| `alertmanager.ingress.labels` | Alertmanager Ingress additional labels | `{}` | +| `alertmanager.ingress.hosts` | Alertmanager Ingress hostnames | `[]` | +| `alertmanager.ingress.tls` | Alertmanager Ingress TLS configuration (YAML) | `[]` | +| `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"}]}` | +| `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. | `{}` | +| `alertmanager.alertmanagerSpec.image.tag` | Tag of Alertmanager container image to be deployed. | `v0.15.2` | +| `alertmanager.alertmanagerSpec.image.repository` | Base image that is used to deploy pods, without tag. | `quay.io/prometheus/alertmanager` | +| `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/. | `[]` | +| `alertmanager.alertmanagerSpec.logLevel` | Log level for Alertmanager to be configured with. | `info` | +| `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` | +| `alertmanager.alertmanagerSpec.retention` | Time duration Alertmanager shall retain data for. Value must match the regular expression `[0-9]+(ms\|s\|m\|h\|d\|w\|y)` (milliseconds seconds minutes hours days weeks years). | `120h` | +| `alertmanager.alertmanagerSpec.storage` | Storage is the definition of how storage will be used by the Alertmanager instances. | `{}` | +| `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. | `""` | +| `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`. | `/` | +| `alertmanager.alertmanagerSpec.paused` | If set to true all actions on the underlaying managed objects are not goint to be performed, except for delete actions. | `false` | +| `alertmanager.alertmanagerSpec.nodeSelector` | Define which Nodes the Pods are scheduled on. | `{}` | +| `alertmanager.alertmanagerSpec.resources` | Define resources requests and limits for single Pods. | `{}` | +| `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. | `""` | +| `alertmanager.alertmanagerSpec.tolerations` | If specified, the pod's tolerations. | `[]` | +| `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. | `{}` | +| `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` | +| `alertmanager.alertmanagerSpec.containers` | Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an Alertmanager pod. | `[]` | +| `alertmanager.alertmanagerSpec.priorityClassName` | Priority class assigned to the Pods | `""` | +| `alertmanager.alertmanagerSpec.additionalPeers` | AdditionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster. | `[]` | + +### Grafana +| Parameter | Description | Default | +| ----- | ----------- | ------ | +| `grafana.enabled` | If true, deploy the grafana sub-chart | `true` | +| `grafana.adminPassword` | Admin password to log into the grafana UI | "prom-operator" | +| `grafana.defaultDashboardsEnabled` | Deploy default dashboards. These are loaded using the sidecar | `true` | +| `grafana.ingress.enabled` | Enables Ingress for Grafana | `false` | +| `grafana.ingress.annotations` | Ingress annotations for Grafana | `{}` | +| `grafana.ingress.labels` | Custom labels for Grafana Ingress | `{}` | +| `grafana.ingress.hosts` | Ingress accepted hostnames for Grafana| `[]` | +| `grafana.ingress.tls` | Ingress TLS configuration for Grafana | `[]` | +| `grafana.sidecar.dashboards.enabled` | Enable the Grafana sidecar to automatically load dashboards with a label `{{ grafana.sidecar.dashboards.label }}=1` | `true` | +| `grafana.sidecar.dashboards.label` | If the sidecar is enabled, configmaps with this label will be loaded into Grafana as dashboards | `grafana_dashboard` | +| `grafana.sidecar.datasources.enabled` | Enable the Grafana sidecar to automatically load dashboards with a label `{{ grafana.sidecar.datasources.label }}=1` | `true` | +| `grafana.sidecar.datasourcess.label` | If the sidecar is enabled, configmaps with this label will be loaded into Grafana as datasources configurations | `grafana_datasource` | + +### Exporters +| Parameter | Description | Default | +| ----- | ----------- | ------ | +| `kubeApiServer.enabled` | Deploy `serviceMonitor` to scrape the Kubernetes API server | `true` | +| `kubeApiServer.tlsConfig.serverName` | Name of the server to use when validating TLS certificate | `kubernetes` | +| `kubeApiServer.tlsConfig.insecureSkipVerify` | Skip TLS certificate validation when scraping | `false` | +| `kubeApiServer.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus | `component` | +| `kubeApiServer.serviceMonitor.selector` | The service selector | `{"matchLabels":{"component":"apiserver","provider":"kubernetes"}}` +| `kubelet.enabled` | Deploy servicemonitor to scrape the kubelet service. See also `prometheusOperator.kubeletService` | `true` | +| `kubelet.namespace` | Namespace where the kubelet is deployed. See also `prometheusOperator.kubeletService.namespace` | `kube-system` | +| `kubelet.serviceMonitor.https` | Enable scraping of the kubelet over HTTPS. For more information, see https://github.com/coreos/prometheus-operator/issues/926 | `false` | +| `kubeControllerManager.enabled` | Deploy a `service` and `serviceMonitor` to scrape the Kubernetes controller-manager | `true` | +| `kubeControllermanager.service.port` | Controller-manager port for the service runs on | `10252` | +| `kubeControllermanager.service.targetPort` | Controller-manager targetPort for the service runs on | `10252` | +| `kubeControllermanager.service.targetPort.selector` | Controller-manager service selector | `{"k8s-app" : "kube-controller-manager" }` +| `coreDns.enabled` | Deploy coreDns scraping components. Use either this or kubeDns | true | +| `coreDns.service.port` | CoreDns port | `9153` | +| `coreDns.service.targetPort` | CoreDns targetPort | `9153` | +| `coreDns.service.selector` | CoreDns service selector | `{"k8s-app" : "coredns" }` +| `kubeDns.enabled` | Deploy kubeDns scraping compoents. Use either this or coreDns| `false` | +| `kubeDns.service.selector` | CoreDns service selector | `{"k8s-app" : "kube-dns" }` | +| `kubeEtcd.enabled` | Deploy components to scrape etcd | `true` | +| `kubeEtcd.endpoints` | Endpoints where etcd runs. Provide this if running etcd outside the cluster | `[]` | +| `kubeEtcd.service.port` | Etct port | `4001` | +| `kubeEtcd.service.targetPort` | Etct targetPort | `4001` | +| `kubeEtcd.service.selector` | Selector for etcd if running inside the cluster | `{"k8s-app":"etcd-server"}` | +| `kubeEtcd.servicemonitor.scheme` | Etcd servicemonitor scheme | `http` | +| `kubeEtcd.servicemonitor.insecureSkipVerify` | Skip validating etcd TLS certificate when scraping | `false` | +| `kubeEtcd.servicemonitor.serverName` | Etcd server name to validate certificate against when scraping | `""` | +| `kubeEtcd.servicemonitor.caFile` | Certificate authority file to use when connecting to etcd. See `prometheus.prometheusSpec.secrets` | `""` | +| `kubeEtcd.servicemonitor.certFile` | Client certificate file to use when connecting to etcd. See `prometheus.prometheusSpec.secrets` | `""` | +| `kubeEtcd.servicemonitor.keyFile` | Client key file to use when connecting to etcd. See `prometheus.prometheusSpec.secrets` | `""` | +| `kubeStateMetrics.enabled` | Deploy the `kube-state-metrics` chart and configure a servicemonitor to scrape | `true` | +| `kube-state-metrics.rbac.create` | Create RBAC components in kube-state-metrics. See `global.rbac.create` | `true` | +| `nodeExporter.enabled` | Deploy the `prometheus-node-exporter` and scrape it | `true` | +| `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` | +| `prometheus-node-exporter.podLabels` | Additional labels for pods in the DaemonSet | `{"jobLabel":"node-exporter"}` | +| `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)$"]` | + + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```console +$ helm install --name my-release incubator/prometheus-operator --set sendAnalytics=true +``` + +Alternatively, one or more YAML files that specify the values for the above parameters can be provided while installing the chart. For example, + +```console +$ helm install --name my-release incubator/prometheus-operator -f values1.yaml,values2.yaml +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Further Information + +For more in-depth documentation of configuration options meanings, please see +- [Prometheus Operator](https://github.com/coreos/prometheus-operator) +- [Prometheus](https://prometheus.io/docs/introduction/overview/) +- [Grafana](https://github.com/helm/charts/tree/master/stable/grafana#grafana-helm-chart) \ No newline at end of file diff --git a/stable/prometheus-operator/ci/test-values.yaml b/stable/prometheus-operator/ci/test-values.yaml new file mode 100644 index 000000000000..5394a93c0e66 --- /dev/null +++ b/stable/prometheus-operator/ci/test-values.yaml @@ -0,0 +1,868 @@ +# Default values for prometheus-operator. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +## Provide a name in place of prometheus-operator +## +nameOverride: "" + +## Labels to apply to all resources +## +commonLabels: {} +# scmhash: abc123 +# myLabel: aakkmd + +## Create default rules for monitoring the cluster +## +defaultRules: + create: true + +## +global: + rbac: + create: true + pspEnabled: true + + ## Reference to one or more secrets to be used when pulling images + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + imagePullSecrets: [] + # - name: "image-pull-secret" + +## Configuration for alertmanager +## ref: https://prometheus.io/docs/alerting/alertmanager/ +## +alertmanager: + + ## Deploy alertmanager + ## + enabled: true + + ## Service account for Alertmanager to use. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ## + serviceAccount: + create: true + name: "" + + ## Configure pod disruption budgets for Alertmanager + ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget + ## This configuration is immutable once created and will require the PDB to be deleted to be changed + ## https://github.com/kubernetes/kubernetes/issues/45398 + ## + podDisruptionBudget: + enabled: false + minAvailable: 1 + maxUnavailable: "" + + ## Alertmanager configuration directives + ## ref: https://prometheus.io/docs/alerting/configuration/#configuration-file + ## https://prometheus.io/webtools/alerting/routing-tree-editor/ + ## + config: + 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' + + ## Alertmanager template files to format alerts + ## ref: https://prometheus.io/docs/alerting/notifications/ + ## https://prometheus.io/docs/alerting/notification_examples/ + ## + templateFiles: {} + # + # An example template: + # template_1.tmpl: |- + # {{ define "cluster" }}{{ .ExternalURL | reReplaceAll ".*alertmanager\\.(.*)" "$1" }}{{ end }} + # + # {{ define "slack.myorg.text" }} + # {{- $root := . -}} + # {{ range .Alerts }} + # *Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}` + # *Cluster:* {{ template "cluster" $root }} + # *Description:* {{ .Annotations.description }} + # *Graph:* <{{ .GeneratorURL }}|:chart_with_upwards_trend:> + # *Runbook:* <{{ .Annotations.runbook }}|:spiral_note_pad:> + # *Details:* + # {{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}` + # {{ end }} + + ingress: + enabled: false + + annotations: {} + + labels: {} + + ## Hosts must be provided if Ingress is enabled. + ## + hosts: [] + # - alertmanager.domain.com + + ## TLS configuration for Alertmanager Ingress + ## Secret must be manually created in the namespace + ## + tls: [] + # - secretName: alertmanager-general-tls + # hosts: + # - alertmanager.example.com + + ## Configuration for Alertmanager service + ## + service: + ## Port to expose on each node + ## Only used if service.type is 'NodePort' + ## + nodePort: 30903 + + ## Service type + ## + type: ClusterIP + + ## If true, create a serviceMonitor for alertmanager + ## + serviceMonitor: + selfMonitor: true + + ## Settings affecting alertmanagerSpec + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#alertmanagerspec + ## + alertmanagerSpec: + ## 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 Alertmanager pods. + ## + podMetadata: {} + + ## Image of Alertmanager + ## + image: + repository: quay.io/prometheus/alertmanager + tag: v0.15.2 + + ## 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/. + secrets: [] + + ## Log level for Alertmanager to be configured with. + ## + logLevel: info + + ## 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. + replicas: 1 + + ## Time duration Alertmanager shall retain data for. Default is '120h', and must match the regular expression + ## [0-9]+(ms|s|m|h|d|w|y) (milliseconds seconds minutes hours days weeks years). + ## + retention: 120h + + ## Storage is the definition of how storage will be used by the Alertmanager instances. + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/storage.md + ## + storage: {} + # volumeClaimTemplate: + # spec: + # storageClassName: gluster + # accessModes: ["ReadWriteOnce"] + # resources: + # requests: + # storage: 50Gi + # selector: {} + + + ## 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. string false + ## + externalUrl: + + ## 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. + ## + routePrefix: + + ## If set to true all actions on the underlaying managed objects are not goint to be performed, except for delete actions. + ## + paused: false + + ## Define which Nodes the Pods are scheduled on. + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: [] + + ## Define resources requests and limits for single Pods. + ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: + # requests: + # memory: 400Mi + + ## 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. + ## + podAntiAffinity: "" + + ## If specified, the pod's tolerations. + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + + ## SecurityContext holds pod-level security attributes and common container settings. + ## This defaults to non root user with uid 1000 and gid 2000. *v1.PodSecurityContext false + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + ## + securityContext: {} + + ## 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. + ## + listenLocal: false + + ## Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an Alertmanager pod. + ## + containers: [] + + ## Priority class assigned to the Pods + ## + priorityClassName: "" + + ## AdditionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster. + ## + additionalPeers: [] + +## Using default values from https://github.com/helm/charts/blob/master/stable/grafana/values.yaml +## +grafana: + enabled: true + + ## Deploy default dashboards. + ## + defaultDashboardsEnabled: true + + adminPassword: prom-operator + + ingress: + ## If true, Prometheus Ingress will be created + ## + enabled: false + + ## Annotations for Prometheus Ingress + ## + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + + ## Labels to be added to the Ingress + ## + labels: {} + + ## Hostnames. + ## Must be provided if Ingress is enable. + ## + # hosts: + # - prometheus.domain.com + hosts: [] + + ## TLS configuration for prometheus Ingress + ## Secret must be manually created in the namespace + ## + tls: [] + # - secretName: prometheus-general-tls + # hosts: + # - prometheus.example.com + + sidecar: + dashboards: + enabled: true + label: grafana_dashboard + datasources: + enabled: true + label: grafana_datasource + +## Component scraping the kube api server +## +kubeApiServer: + enabled: true + tlsConfig: + serverName: kubernetes + insecureSkipVerify: false + + serviceMonitor: + jobLabel: component + selector: + matchLabels: + component: apiserver + provider: kubernetes + +## Component scraping the kubelet and kubelet-hosted cAdvisor +## +kubelet: + enabled: true + namespace: kube-system + + serviceMonitor: + ## Enable scraping the kubelet over https. For requirements to enable this see + ## https://github.com/coreos/prometheus-operator/issues/926 + ## + https: false + +## Component scraping the kube controller manager +## +kubeControllerManager: + enabled: true + service: + port: 10252 + targetPort: 10252 + selector: + k8s-app: kube-controller-manager +## Component scraping coreDns. Use either this or kubeDns +## +coreDns: + enabled: true + service: + port: 9153 + targetPort: 9153 + selector: + k8s-app: coredns + +## Component scraping kubeDns. Use either this or coreDns +## +kubeDns: + enabled: false + service: + selector: + k8s-app: kube-dns +## Component scraping etcd +## +kubeEtcd: + enabled: true + + ## If your etcd is not deployed as a pod, specify IPs it can be found on + ## + endpoints: [] + # - 10.141.4.22 + # - 10.141.4.23 + # - 10.141.4.24 + + ## Etcd service. If using kubeEtcd.endpoints only the port and targetPort are used + ## + service: + port: 4001 + targetPort: 4001 + selector: + k8s-app: etcd-server + + ## Configure secure access to the etcd cluster by loading a secret into prometheus and + ## specifying security configuration below. For example, with a secret named etcd-client-cert + ## + ## serviceMonitor: + ## scheme: https + ## insecureSkipVerify: false + ## serverName: localhost + ## caFile: /etc/prometheus/secrets/etcd-client-cert/etcd-ca + ## certFile: /etc/prometheus/secrets/etcd-client-cert/etcd-client + ## keyFile: /etc/prometheus/secrets/etcd-client-cert/etcd-client-key + ## + serviceMonitor: + scheme: http + insecureSkipVerify: false + serverName: "" + caFile: "" + certFile: "" + keyFile: "" + + +## Component scraping kube scheduler +## +kubeScheduler: + enabled: true + service: + port: 10251 + targetPort: 10251 + selector: + k8s-app: kube-scheduler + +## Component scraping kube state metrics +## +kubeStateMetrics: + enabled: true + +## Configuration for kube-state-metrics subchart +## +kube-state-metrics: + rbac: + create: true + +## Deploy node exporter as a daemonset to all nodes +## +nodeExporter: + enabled: true + + ## Use the value configured in prometheus-node-exporter.podLabels + ## + jobLabel: jobLabel + +## Configuration for prometheus-node-exporter subchart +## +prometheus-node-exporter: + podLabels: + ## Add the 'node-exporter' label to be used by serviceMonitor to match standard common usage in rules and grafana dasboards + ## + jobLabel: node-exporter + extraArgs: + - --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)$ + +## Manages Prometheus and Alertmanager components +## +prometheusOperator: + enabled: true + + ## Service account for Alertmanager to use. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ## + serviceAccount: + create: true + name: "" + + ## Deploy CRDs used by Prometheus Operator. + ## + createCustomResource: true + + ## Attempt to clean up CRDs created by Prometheus Operator. + ## + cleanupCustomResource: true + + ## Labels to add to the operator pod + ## + podLabels: {} + + ## If true, the operator will create and maintain a service for scraping kubelets + ## ref: https://github.com/coreos/prometheus-operator/blob/master/helm/prometheus-operator/README.md + ## + kubeletService: + enabled: true + namespace: kube-system + + ## Create a servicemonitor for the operator + ## + serviceMonitor: + selfMonitor: true + + ## Resource limits & requests + ## + resources: {} + # limits: + # cpu: 200m + # memory: 200Mi + # requests: + # cpu: 100m + # memory: 100Mi + + ## Define which Nodes the Pods are scheduled on. + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: [] + + ## Tolerations for use with node taints + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: {} + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + + ## Assign the prometheus operator to run on specific nodes + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + ## + affinity: {} + # requiredDuringSchedulingIgnoredDuringExecution: + # nodeSelectorTerms: + # - matchExpressions: + # - key: kubernetes.io/e2e-az-name + # operator: In + # values: + # - e2e-az1 + # - e2e-az2 + + ## Prometheus-operator image + ## + image: + repository: quay.io/coreos/prometheus-operator + tag: v0.24.0 + pullPolicy: IfNotPresent + + ## Configmap-reload image to use for reloading configmaps + ## + configmapReloadImage: + repository: quay.io/coreos/configmap-reload + tag: v0.0.1 + + ## Prometheus-config-reloader image to use for config and rule reloading + ## + prometheusConfigReloaderImage: + repository: quay.io/coreos/prometheus-config-reloader + tag: v0.24.0 + + ## Hyperkube image to use when cleaning up + ## + hyperkubeImage: + repository: gcr.io/google-containers/hyperkube + tag: v1.12.1 + pullPolicy: IfNotPresent + +## Deploy a Prometheus instance +## +prometheus: + + enabled: true + + ## Service account for Prometheuses to use. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ## + serviceAccount: + create: true + name: "" + + rbac: + ## Create role bindings in the specified namespaces, to allow Prometheus monitoring + ## a role binding in the release namespace will always be created. + ## + roleNamespaces: + - kube-system + + ## Configure pod disruption budgets for Prometheus + ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget + ## This configuration is immutable once created and will require the PDB to be deleted to be changed + ## https://github.com/kubernetes/kubernetes/issues/45398 + ## + podDisruptionBudget: + enabled: false + minAvailable: 1 + maxUnavailable: "" + + ingress: + enabled: false + annotations: {} + labels: {} + + ## Hostnames. + ## Must be provided if Ingress is enabled. + ## + # hosts: + # - prometheus.domain.com + hosts: [] + + ## TLS configuration for Prometheus Ingress + ## Secret must be manually created in the namespace + ## + tls: [] + # - secretName: prometheus-general-tls + # hosts: + # - prometheus.example.com + + serviceMonitor: + selfMonitor: true + + ## Settings affecting prometheusSpec + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec + ## + prometheusSpec: + + ## Interval between consecutive scrapes. + ## + scrapeInterval: "" + + ## Interval between consecutive evaluations. + ## + evaluationInterval: "" + + ## ListenLocal makes the Prometheus server listen on loopback, so that it does not bind against the Pod IP. + ## + listenLocal: false + + ## Image of Prometheus. + ## + image: + repository: quay.io/prometheus/prometheus + tag: v2.4.3 + + # repository: quay.io/coreos/prometheus + # tag: v2.4.3 + + ## Tolerations for use with node taints + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: {} + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + + ## Alertmanagers to which alerts will be sent + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#alertmanagerendpoints + ## + ## Default configuration will connect to the alertmanager deployed as part of this relase + ## + alertingEndpoints: [] + # - name: "" + # namespace: "" + # port: http + # scheme: http + + ## External labels to add to any time series or alerts when communicating with external systems + ## + externalLabels: {} + + ## External URL at which Prometheus will be reachable. + ## + externalUrl: "" + + ## Define which Nodes the Pods are scheduled on. + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: [] + + ## 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/. 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. + ## + secrets: [] + + ## Namespaces to be selected for PrometheusRules discovery. + ## If unspecified, only the same namespace as the Prometheus object is in is used. + ## + ruleNamespaceSelector: {} + + ## Rules CRD selector + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/design.md + ## + ## 1. If `matchLabels` is used, `rules.additionalLabels` must contain all the labels from + ## `matchLabels` in order to be be matched by Prometheus + ## 2. If `matchExpressions` is used `rules.additionalLabels` must contain at least one label + ## from `matchExpressions` in order to be matched by Prometheus + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + ## + ## If unspecified the release `app` and `release` will be used as the label selector + ## to load rules + ## + ruleSelector: {} + # ruleSelector: { + # matchExpressions: [{key: prometheus, operator: In, values: [example-rules, example-rules-2]}] + # } + ### OR + # ruleSelector: { + # matchLabels: [{role: example-rules}] + # } + + ## serviceMonitorSelector will limit which servicemonitors are used to create scrape + ## configs in Prometheus. By default all are loaded + ## + serviceMonitorSelector: {} + + # serviceMonitorSelector: {} + # matchLabels: + # prometheus: somelabel + + ## serviceMonitorNamespaceSelector will limit namespaces from which serviceMonitors are used to create scrape + ## configs in Prometheus. By default all namespaces will be used + ## + serviceMonitorNamespaceSelector: {} + + ## How long to retain metrics + ## + retention: 10d + + ## If true, the Operator won't process any Prometheus configuration changes + ## + paused: false + + ## Number of Prometheus replicas desired + ## + replicas: 1 + + ## Log level for Prometheus be configured in + ## + logLevel: info + + ## Prefix used to register routes, overriding externalUrl route. + ## Useful for proxies that rewrite URLs. + ## + routePrefix: / + + ## 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. + ## + podMetadata: {} + # labels: + # app: prometheus + # k8s-app: prometheus + + ## 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. + podAntiAffinity: "" + + ## The remote_read spec configuration for Prometheus. + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#remotereadspec + remoteRead: {} + # - url: http://remote1/read + + ## The remote_write spec configuriation for Prometheus. + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#remotewritespec + remoteWrite: {} + # remoteWrite: + # - url: http://remote1/push + + ## Resource limits & requests + ## + resources: {} + # requests: + # memory: 400Mi + + ## Prometheus StorageSpec for persistent data + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/storage.md + ## + storageSpec: {} + # volumeClaimTemplate: + # spec: + # storageClassName: gluster + # accessModes: ["ReadWriteOnce"] + # resources: + # requests: + # storage: 50Gi + # selector: {} + + ## Provide additional scrape configurations + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec + ## + additionalScrapeConfigs: [] + + ## Provide additional alertmanager configurations + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec + ## + additionalAlertManagerConfigs: [] + + ## SecurityContext holds pod-level security attributes and common container settings. + ## This defaults to non root user with uid 1000 and gid 2000. + ## https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md + ## + securityContext: {} + + ## Priority class assigned to the Pods + ## + priorityClassName: "" + + ## 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. + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#thanosspec + ## + thanos: {} + + ## Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to a Prometheus pod. + ## + containers: [] + + ## 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. + ## + additionalScrapeConfigsExternal: false + + additionalServiceMonitors: [] + ## Name of the ServiceMonitor to create + ## + # - name: "" + + ## Additional labels to set used for the ServiceMonitorSelector. Together with standard labels from + ## the chart + ## + # additionalLabels: {} + + ## Service label for use in assembling a job name of the form