[stable/prometheus-operator] Add configuration options (#11811)

* Add configuration options for reloader limits

Signed-off-by: Vasily <vasily.sliouniaev@jet.com>

* Add documentation to work around crd-install hook issue

Signed-off-by: Vasily <vasily.sliouniaev@jet.com>

* Add query params to prometheus

Signed-off-by: Vasily <vasily.sliouniaev@jet.com>

* Bump version

Signed-off-by: Vasily <vasily.sliouniaev@jet.com>

* Fix indent

Signed-off-by: Vasily <vasily.sliouniaev@jet.com>
This commit is contained in:
Vasily Sliouniaev
2019-03-07 11:46:08 -08:00
committed by Kubernetes Prow Robot
parent 71b05a4ce1
commit 90e50f1e08
10 changed files with 211 additions and 219 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ name: prometheus-operator
sources:
- https://github.com/coreos/prometheus-operator
- https://coreos.com/operators/prometheus
version: 4.3.1
version: 4.3.2
appVersion: 0.29.0
home: https://github.com/coreos/prometheus-operator
keywords:
+29 -6
View File
@@ -57,13 +57,38 @@ The command removes all the Kubernetes components associated with the chart and
CRDs created by this chart are not removed by default and should be manually cleaned up:
```
```console
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
```
## Work-Arounds for Known Issues
### Helm fails to create CRDs
Due to a bug in helm, it is possible for the 4 CRDs that are created by this chart to fail to get fully deployed before Helm attempts to create resources that require them. This affects all versions of Helm with a [potential fix pending](https://github.com/helm/helm/pull/5112). In order to work around this issue when installing the chart you will need to make sure all 4 CRDs exist in the cluster first and disable their previsioning by the chart:
1. Create CRDs
```console
kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/alertmanager.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/prometheus.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/prometheusrule.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/servicemonitor.crd.yaml
```
2. Wait for CRDs to be created, which should only take a few seconds
3. Install the chart, but disabling the CRD provisioning by setting `prometheusOperator.createCustomResource=false`
```console
$ helm install --name my-release stable/prometheus-operator --set prometheusOperator.createCustomResource=false
```
### Helm <2.10 workaround
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:
1. Install prometheus-operator by itself, disabling everything but the prometheus-operator component, and also setting `prometheusOperator.serviceMonitor.selfMonitor=false`
2. Install all the other components, and configure `prometheus.additionalServiceMonitors` to scrape the prometheus-operator service.
## Configuration
The following tables lists the configurable parameters of the prometheus-operator chart and their default values.
@@ -134,6 +159,8 @@ The following tables lists the configurable parameters of the prometheus-operato
| `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.29.0` |
| `prometheusOperator.configReloaderCpu` | Set the prometheus config reloader side-car CPU limit. If unset, uses the prometheus-operator project default | `nil` |
| `prometheusOperator.configReloaderMemory` | Set the prometheus config reloader side-car memory limit. If unset, uses the prometheus-operator project default | `nil` |
| `prometheusOperator.hyperkubeImage.repository` | Repository for hyperkube image used to perform maintenance tasks | `k8s.gcr.io/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` |
@@ -190,6 +217,7 @@ The following tables lists the configurable parameters of the prometheus-operato
| `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/<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. | `[]` |
| `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/ | `[]` |
| `prometheus.prometheusSpec.query` | QuerySpec defines the query command line flags when starting Prometheus. Not all parameters are supported by the operator - [see coreos documentation](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#queryspec) | `{}` |
|`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.podAntiAffinityTopologyKey` | If anti-affinity is enabled sets the topologyKey to use for anti-affinity. This can be changed to, for example `failure-domain.beta.kubernetes.io/zone`| `kubernetes.io/hostname` |
| `prometheus.prometheusSpec.tolerations` | If specified, the pod's tolerations. | `[]` |
@@ -349,11 +377,6 @@ For more in-depth documentation of configuration options meanings, please see
- [Prometheus](https://prometheus.io/docs/introduction/overview/)
- [Grafana](https://github.com/helm/charts/tree/master/stable/grafana#grafana-helm-chart)
## Helm <2.10 workaround
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:
1. Install prometheus-operator by itself, disabling everything but the prometheus-operator component, and also setting `prometheusOperator.serviceMonitor.selfMonitor=false`
2. Install all the other components, and configure `prometheus.additionalServiceMonitors` to scrape the prometheus-operator service.
# Migrating from coreos/prometheus-operator chart
The multiple charts have been combined into a single chart that installs prometheus operator, prometheus, alertmanager, grafana as well as the multitude of exporters necessary to monitor a cluster.
+22 -9
View File
@@ -576,6 +576,13 @@ prometheusOperator:
##
nodePort: 38080
## Additional ports to open for Prometheus service
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#multi-port-services
##
additionalPorts: []
# - name: thanos-cluster
# port: 10900
# nodePort: 30111
## Loadbalancer IP
## Only use if service.type is "loadbalancer"
@@ -690,6 +697,14 @@ prometheusOperator:
repository: quay.io/coreos/prometheus-config-reloader
tag: v0.29.0
## Set the prometheus config reloader side-car CPU limit. If unset, uses the prometheus-operator project default
##
# configReloaderCpu: 100m
## Set the prometheus config reloader side-car memory limit. If unset, uses the prometheus-operator project default
##
# configReloaderMemory: 25Mi
## Hyperkube image to use when cleaning up
##
hyperkubeImage:
@@ -731,14 +746,6 @@ prometheus:
##
nodePort: 39090
## Additional ports to open for Prometheus service
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#multi-port-services
##
additionalPorts: []
# - name: thanos-cluster
# port: 10900
# nodePort: 30111
## Loadbalancer IP
## Only use if service.type is "loadbalancer"
loadBalancerIP: ""
@@ -857,6 +864,12 @@ prometheus:
##
configMaps: []
## QuerySpec defines the query command line flags when starting Prometheus.
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#queryspec
##
query: {}
## Namespaces to be selected for PrometheusRules discovery.
## If nil, select own namespace. Namespaces to be selected for ServiceMonitor discovery.
## See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#namespaceselector for usage
@@ -1069,7 +1082,7 @@ prometheus:
thanos: {}
## Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to a Prometheus pod.
##
## if using proxy extraContainer update targetPort with proxy container port
containers: []
## Enable additional scrape configs that are managed externally to this chart. Note that the prometheus
@@ -742,7 +742,6 @@ spec:
configMapRef:
description: |-
ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.
The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.
properties:
name:
@@ -758,7 +757,6 @@ spec:
secretRef:
description: |-
SecretEnvSource selects a Secret to populate the environment variables with.
The contents of the target Secret's Data field will represent the key-value pairs as environment variables.
properties:
name:
@@ -1323,8 +1321,7 @@ spec:
type: boolean
volumeDevices:
description: volumeDevices is the list of block devices to be
used by the container. This is an alpha feature and may change
in the future.
used by the container. This is a beta feature.
items:
description: volumeDevice describes a mapping of a raw block
device within a container.
@@ -1386,6 +1383,12 @@ spec:
under. This is necessary to generate correct URLs. This is necessary
if Alertmanager is not served from root of a DNS name.
type: string
image:
description: Image if specified has precedence over baseImage, tag and
sha combinations. Specifying the version is still necessary to ensure
the Prometheus Operator knows what version of Alertmanager is being
configured.
type: string
imagePullSecrets:
description: An optional list of references to secrets in the same namespace
to use for pulling prometheus and alertmanager images from registries
@@ -1459,9 +1462,7 @@ spec:
generateName:
description: |-
GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.
If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).
Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
type: string
generation:
@@ -1525,7 +1526,6 @@ spec:
field:
description: |-
The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
Examples:
"name" - the field "name" on the current resource
"items[0].name" - the field "name" on the first array entry in "items"
@@ -1638,7 +1638,6 @@ spec:
namespace:
description: |-
Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.
Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces
type: string
ownerReferences:
@@ -1649,8 +1648,9 @@ spec:
set to true. There cannot be more than one managing controller.
items:
description: OwnerReference contains enough information to let
you identify an owning object. Currently, an owning object must
be in the same namespace, so there is no namespace field.
you identify an owning object. An owning object must be in the
same namespace as the dependent, or be cluster-scoped, so there
is no namespace field.
properties:
apiVersion:
description: API version of the referent.
@@ -1684,7 +1684,6 @@ spec:
resourceVersion:
description: |-
An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
type: string
selfLink:
@@ -1694,7 +1693,6 @@ spec:
uid:
description: |-
UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
type: string
priorityClassName:
@@ -1721,8 +1719,8 @@ spec:
type: object
retention:
description: 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).
is '120h', and must match the regular expression `[0-9]+(ms|s|m|h)`
(milliseconds seconds minutes hours).
type: string
routePrefix:
description: The route prefix Alertmanager registers HTTP handlers for.
@@ -1747,9 +1745,7 @@ spec:
fsGroup:
description: |-
A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:
1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----
If unset, the Kubelet will not modify the ownership and permissions of any volume.
format: int64
type: integer
@@ -1838,11 +1834,6 @@ spec:
is specified, then by default an [EmptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir)
will be used.
properties:
class:
description: 'Name of the StorageClass to use when requesting storage
provisioning. More info: https://kubernetes.io/docs/user-guide/persistent-volumes/#storageclasses
(DEPRECATED - instead use `volumeClaimTemplate.spec.storageClassName`)'
type: string
emptyDir:
description: Represents an empty directory for a pod. Empty directory
volumes support ownership management and SELinux relabeling.
@@ -1853,63 +1844,6 @@ spec:
Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
type: string
sizeLimit: {}
resources:
description: ResourceRequirements describes the compute resource
requirements.
properties:
limits:
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
requests:
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified, otherwise
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
selector:
description: A label selector is a label query over a set of resources.
The result of matchLabels and matchExpressions are ANDed. An empty
label selector matches all objects. A null label selector matches
no objects.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the
key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a
strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: array
matchLabels:
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
type: object
volumeClaimTemplate:
description: PersistentVolumeClaim is a user's request for and claim
to a persistent volume
@@ -1977,9 +1911,7 @@ spec:
generateName:
description: |-
GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.
If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).
Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
type: string
generation:
@@ -2047,7 +1979,6 @@ spec:
field:
description: |-
The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
Examples:
"name" - the field "name" on the current resource
"items[0].name" - the field "name" on the first array entry in "items"
@@ -2168,7 +2099,6 @@ spec:
namespace:
description: |-
Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.
Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces
type: string
ownerReferences:
@@ -2180,9 +2110,9 @@ spec:
There cannot be more than one managing controller.
items:
description: OwnerReference contains enough information
to let you identify an owning object. Currently, an
owning object must be in the same namespace, so there
is no namespace field.
to let you identify an owning object. An owning object
must be in the same namespace as the dependent, or be
cluster-scoped, so there is no namespace field.
properties:
apiVersion:
description: API version of the referent.
@@ -2217,7 +2147,6 @@ spec:
resourceVersion:
description: |-
An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
type: string
selfLink:
@@ -2227,7 +2156,6 @@ spec:
uid:
description: |-
UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
type: string
spec:
@@ -2327,8 +2255,7 @@ spec:
volumeMode:
description: volumeMode defines what type of volume is required
by the claim. Value of Filesystem is implied when not
included in claim spec. This is an alpha feature and may
change in the future.
included in claim spec. This is a beta feature.
type: string
volumeName:
description: VolumeName is the binding reference to the
@@ -1488,8 +1488,7 @@ spec:
type: boolean
volumeDevices:
description: volumeDevices is the list of block devices to be
used by the container. This is an alpha feature and may change
in the future.
used by the container. This is a beta feature.
items:
description: volumeDevice describes a mapping of a raw block
device within a container.
@@ -1546,6 +1545,14 @@ spec:
required:
- name
type: array
enableAdminAPI:
description: 'Enable access to prometheus web admin API. Defaults to
the value of `false`. WARNING: Enabling the admin APIs enables mutating
endpoints, to delete data, shutdown Prometheus, and more. Enabling
this should be done with care and the user is advised to add additional
authentication authorization via a proxy to ensure only clients authorized
to perform these actions can do so. For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis'
type: boolean
evaluationInterval:
description: Interval between consecutive evaluations.
type: string
@@ -1558,6 +1565,12 @@ spec:
under. This is necessary to generate correct URLs. This is necessary
if Prometheus is not served from root of a DNS name.
type: string
image:
description: Image if specified has precedence over baseImage, tag and
sha combinations. Specifying the version is still necessary to ensure
the Prometheus Operator knows what version of Prometheus is being
configured.
type: string
imagePullSecrets:
description: An optional list of references to secrets in the same namespace
to use for pulling prometheus and alertmanager images from registries
@@ -1574,6 +1587,9 @@ spec:
description: ListenLocal makes the Prometheus server listen on loopback,
so that it does not bind against the Pod IP.
type: boolean
logFormat:
description: Log format for Prometheus to be configured with.
type: string
logLevel:
description: Log level for Prometheus to be configured with.
type: string
@@ -1820,8 +1836,9 @@ spec:
set to true. There cannot be more than one managing controller.
items:
description: OwnerReference contains enough information to let
you identify an owning object. Currently, an owning object must
be in the same namespace, so there is no namespace field.
you identify an owning object. An owning object must be in the
same namespace as the dependent, or be cluster-scoped, so there
is no namespace field.
properties:
apiVersion:
description: API version of the referent.
@@ -1871,6 +1888,21 @@ spec:
priorityClassName:
description: Priority class assigned to the Pods
type: string
query:
description: QuerySpec defines the query command line flags when starting
Prometheus.
properties:
lookbackDelta:
description: The delta difference allowed for retrieving metrics
during expression evaluations.
type: string
maxConcurrency:
description: Number of concurrent queries that can be run at once.
format: int32
type: integer
timeout:
description: Maximum time a query may take before being aborted.
type: string
remoteRead:
description: If specified, the remote_read spec. This is an experimental
feature, it may change in any upcoming release in a breaking way.
@@ -2046,6 +2078,11 @@ spec:
description: MinBackoff is the initial retry delay. Gets doubled
for every retry.
type: string
minShards:
description: MinShards is the minimum number of shards, i.e.
amount of concurrency.
format: int32
type: integer
remoteTimeout:
description: Timeout for requests to the remote write endpoint.
type: string
@@ -2117,6 +2154,10 @@ spec:
required:
- url
type: array
replicaExternalLabelName:
description: Name of Prometheus external label used to denote replica
name. Defaults to the value of `prometheus_replica`.
type: string
replicas:
description: Number of instances to deploy for a Prometheus deployment.
format: int32
@@ -2230,6 +2271,25 @@ spec:
"In", and the values array contains only "value". The requirements
are ANDed.
type: object
rules:
description: /--rules.*/ command-line arguments
properties:
alert:
description: /--rules.alert.*/ command-line arguments
properties:
forGracePeriod:
description: Minimum duration between alert and restored 'for'
state. This is maintained only for alerts with configured
'for' time greater than grace period.
type: string
forOutageTolerance:
description: Max time to tolerate prometheus outage for restoring
'for' state of alert.
type: string
resendDelay:
description: Minimum amount of time to wait before resending
an alert to Alertmanager.
type: string
scrapeInterval:
description: Interval between consecutive scrapes.
type: string
@@ -2424,11 +2484,6 @@ spec:
is specified, then by default an [EmptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir)
will be used.
properties:
class:
description: 'Name of the StorageClass to use when requesting storage
provisioning. More info: https://kubernetes.io/docs/user-guide/persistent-volumes/#storageclasses
(DEPRECATED - instead use `volumeClaimTemplate.spec.storageClassName`)'
type: string
emptyDir:
description: Represents an empty directory for a pod. Empty directory
volumes support ownership management and SELinux relabeling.
@@ -2439,63 +2494,6 @@ spec:
Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
type: string
sizeLimit: {}
resources:
description: ResourceRequirements describes the compute resource
requirements.
properties:
limits:
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
requests:
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified, otherwise
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
selector:
description: A label selector is a label query over a set of resources.
The result of matchLabels and matchExpressions are ANDed. An empty
label selector matches all objects. A null label selector matches
no objects.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the
key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a
strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: array
matchLabels:
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
type: object
volumeClaimTemplate:
description: PersistentVolumeClaim is a user's request for and claim
to a persistent volume
@@ -2766,9 +2764,9 @@ spec:
There cannot be more than one managing controller.
items:
description: OwnerReference contains enough information
to let you identify an owning object. Currently, an
owning object must be in the same namespace, so there
is no namespace field.
to let you identify an owning object. An owning object
must be in the same namespace as the dependent, or be
cluster-scoped, so there is no namespace field.
properties:
apiVersion:
description: API version of the referent.
@@ -2913,8 +2911,7 @@ spec:
volumeMode:
description: volumeMode defines what type of volume is required
by the claim. Value of Filesystem is implied when not
included in claim spec. This is an alpha feature and may
change in the future.
included in claim spec. This is a beta feature.
type: string
volumeName:
description: VolumeName is the binding reference to the
@@ -2989,9 +2986,14 @@ spec:
baseImage:
description: Thanos base image if other than default.
type: string
clusterAdvertiseAddress:
description: Explicit (external) ip:port address to advertise for
gossip in gossip cluster. Used internally for membership only.
type: string
gcs:
description: ThanosGCSSpec defines parameters for use of Google
Cloud Storage (GCS) with Thanos.
description: 'Deprecated: ThanosGCSSpec should be configured with
an ObjectStorageConfig secret starting with Thanos v0.2.0. ThanosGCSSpec
will be removed.'
properties:
bucket:
description: Google Cloud Storage bucket name for stored blocks.
@@ -3013,6 +3015,33 @@ spec:
type: boolean
required:
- key
grpcAdvertiseAddress:
description: Explicit (external) host:port address to advertise
for gRPC StoreAPI in gossip cluster. If empty, 'grpc-address'
will be used.
type: string
image:
description: Image if specified has precedence over baseImage, tag
and sha combinations. Specifying the version is still necessary
to ensure the Prometheus Operator knows what version of Thanos
is being configured.
type: string
objectStorageConfig:
description: SecretKeySelector selects a key of a Secret.
properties:
key:
description: The key of the secret to select from. Must be
a valid secret key.
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
optional:
description: Specify whether the Secret or it's key must be
defined
type: boolean
required:
- key
peers:
description: Peers is a DNS name for Thanos to discover peers through.
type: string
@@ -3031,8 +3060,9 @@ spec:
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
s3:
description: ThanosS3Spec defines parameters for of AWS Simple Storage
Service (S3) with Thanos. (S3 compatible services apply as well)
description: 'Deprecated: ThanosS3Spec should be configured with
an ObjectStorageConfig secret starting with Thanos v0.2.0. ThanosS3Spec
will be removed.'
properties:
accessKey:
description: SecretKeySelector selects a key of a Secret.
@@ -12,20 +12,10 @@ metadata:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
additionalPrinterColumns:
- JSONPath: .metadata.creationTimestamp
description: |-
CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
name: Age
type: date
group: {{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }}
names:
kind: PrometheusRule
listKind: PrometheusRuleList
plural: prometheusrules
singular: prometheusrule
scope: Namespaced
validation:
openAPIV3Schema:
@@ -85,9 +75,7 @@ spec:
generateName:
description: |-
GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.
If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).
Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
type: string
generation:
@@ -151,7 +139,6 @@ spec:
field:
description: |-
The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
Examples:
"name" - the field "name" on the current resource
"items[0].name" - the field "name" on the first array entry in "items"
@@ -214,11 +201,12 @@ spec:
server has more data available. The value is opaque and
may be used to issue another request to the endpoint that
served this list to retrieve the next set of available
objects. Continuing a list may not be possible if the
server configuration has changed or more than a few minutes
have passed. The resourceVersion field returned when using
this continue value will be identical to the value in
the first response.
objects. Continuing a consistent list may not be possible
if the server configuration has changed or more than a
few minutes have passed. The resourceVersion field returned
when using this continue value will be identical to the
value in the first response, unless you have received
this token from an error message.
type: string
resourceVersion:
description: 'String that identifies the server''s internal
@@ -259,7 +247,6 @@ spec:
namespace:
description: |-
Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.
Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces
type: string
ownerReferences:
@@ -270,8 +257,9 @@ spec:
There cannot be more than one managing controller.
items:
description: OwnerReference contains enough information to let you
identify an owning object. Currently, an owning object must be in
the same namespace, so there is no namespace field.
identify an owning object. An owning object must be in the same
namespace as the dependent, or be cluster-scoped, so there is no
namespace field.
properties:
apiVersion:
description: API version of the referent.
@@ -304,7 +292,6 @@ spec:
resourceVersion:
description: |-
An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
type: string
selfLink:
@@ -314,7 +301,6 @@ spec:
uid:
description: |-
UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
type: string
spec:
@@ -12,20 +12,10 @@ metadata:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
additionalPrinterColumns:
- JSONPath: .metadata.creationTimestamp
description: |-
CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
name: Age
type: date
group: {{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }}
names:
kind: ServiceMonitor
listKind: ServiceMonitorList
plural: servicemonitors
singular: servicemonitor
scope: Namespaced
validation:
openAPIV3Schema:
@@ -156,7 +146,7 @@ spec:
type: string
relabelings:
description: 'RelabelConfigs to apply to samples before ingestion.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<relabel_config>'
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
items:
description: 'RelabelConfig allows dynamic rewriting of the
label set, being applied to samples before ingestion. It defines
@@ -174,7 +164,7 @@ spec:
type: integer
regex:
description: Regular expression against which the extracted
value is matched. default is '(.*)'
value is matched. defailt is '(.*)'
type: string
replacement:
description: Replacement value against which a regex replace
@@ -42,7 +42,13 @@ spec:
- --crd-apigroup={{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }}
- --localhost=127.0.0.1
- --prometheus-config-reloader={{ .Values.prometheusOperator.prometheusConfigReloaderImage.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloaderImage.tag }}
- --config-reloader-image={{ .Values.prometheusOperator.configmapReloadImage.repository }}:{{ .Values.prometheusOperator.configmapReloadImage.tag }}
- --config-reloader-image={{ .Values.prometheusOperator.configmapReloadImage.repository }}:{{ .Values.prometheusOperator.configmapReloadImage.tag }}
{{- if .Values.prometheusOperator.configReloaderCpu }}
- --config-reloader-cpu={{ .Values.prometheusOperator.configReloaderCpu }}
{{- end }}
{{- if .Values.prometheusOperator.configReloaderMemory }}
- --config-reloader-memory={{ .Values.prometheusOperator.configReloaderMemory }}
{{- end }}
ports:
- containerPort: 8080
name: http
@@ -103,7 +103,7 @@ spec:
ruleSelector:
{{ toYaml .Values.prometheus.prometheusSpec.ruleSelector | indent 4}}
{{- else if .Values.prometheus.prometheusSpec.ruleSelectorNilUsesHelmValues }}
ruleSelector:
ruleSelector:
matchLabels:
app: {{ template "prometheus-operator.name" . }}
release: {{ .Release.Name | quote }}
@@ -114,10 +114,14 @@ spec:
storage:
{{ toYaml .Values.prometheus.prometheusSpec.storageSpec | indent 4 }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.podMetadata }}
{{- if .Values.prometheus.prometheusSpec.podMetadata }}
podMetadata:
{{ toYaml .Values.prometheus.prometheusSpec.podMetadata | indent 4 }}
{{- end }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.query }}
query:
{{ toYaml .Values.prometheus.prometheusSpec.query | indent 4}}
{{- end }}
{{- if eq .Values.prometheus.prometheusSpec.podAntiAffinity "hard" }}
affinity:
podAntiAffinity:
+13
View File
@@ -710,6 +710,14 @@ prometheusOperator:
repository: quay.io/coreos/prometheus-config-reloader
tag: v0.29.0
## Set the prometheus config reloader side-car CPU limit. If unset, uses the prometheus-operator project default
##
# configReloaderCpu: 100m
## Set the prometheus config reloader side-car memory limit. If unset, uses the prometheus-operator project default
##
# configReloaderMemory: 25Mi
## Hyperkube image to use when cleaning up
##
hyperkubeImage:
@@ -869,6 +877,11 @@ prometheus:
##
configMaps: []
## QuerySpec defines the query command line flags when starting Prometheus.
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#queryspec
##
query: {}
## Namespaces to be selected for PrometheusRules discovery.
## If nil, select own namespace. Namespaces to be selected for ServiceMonitor discovery.
## See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#namespaceselector for usage