Add ServiceMonitor Support
This commit is contained in:
parent
14244e8c99
commit
7bcb918346
|
|
@ -1,7 +1,7 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
description: A chart for a Cadvisor deployment
|
description: A chart for a Cadvisor deployment
|
||||||
name: cadvisor
|
name: cadvisor
|
||||||
version: 1.0.1
|
version: 1.1.0
|
||||||
appVersion: 0.36.0
|
appVersion: 0.36.0
|
||||||
home: https://github.com/google/cadvisor
|
home: https://github.com/google/cadvisor
|
||||||
sources:
|
sources:
|
||||||
|
|
|
||||||
|
|
@ -41,21 +41,22 @@ The command removes all the Kubernetes components associated with the chart and
|
||||||
|
|
||||||
The following table lists the configurable parameters of the Prometheus MSTeams chart and their default values.
|
The following table lists the configurable parameters of the Prometheus MSTeams chart and their default values.
|
||||||
|
|
||||||
| Parameter | Description | Default |
|
| Parameter | Description | Default |
|
||||||
| -------------------------------------- | ------------------------------------------------- | ----------------------------- |
|
| -------------------------- | ------------------------------------------------ | --------------------- |
|
||||||
| `image.repository` | container image repository | `k8s.gcr.io/cadvisor` |
|
| `image.repository` | container image repository | `k8s.gcr.io/cadvisor` |
|
||||||
| `image.tag` | container image tag | `v0.36.0` |
|
| `image.tag` | container image tag | `v0.36.0` |
|
||||||
| `image.pullPolicy` | container image pull policy | `IfNotPresent` |
|
| `image.pullPolicy` | container image pull policy | `IfNotPresent` |
|
||||||
| `nodeSelector` | node labels for pod assignment | `{}` |
|
| `nodeSelector` | node labels for pod assignment | `{}` |
|
||||||
| `tolerations` | node tolerations for pod assignment | `[]` |
|
| `tolerations` | node tolerations for pod assignment | `[]` |
|
||||||
| `affinity` | node affinity for pod assignment | `{}` |
|
| `affinity` | node affinity for pod assignment | `{}` |
|
||||||
| `container.port` | the container and service port to use | 8080 |
|
| `container.port` | the container and service port to use | 8080 |
|
||||||
| `container.additionalArgs` | additional container arguments | see values.yaml |
|
| `container.additionalArgs` | additional container arguments | see values.yaml |
|
||||||
| `container.hostPaths` | hostPaths to mount in the container | see values.yaml |
|
| `container.hostPaths` | hostPaths to mount in the container | see values.yaml |
|
||||||
| `resources` | pod resource requests & limits | `{}` |
|
| `resources` | pod resource requests & limits | `{}` |
|
||||||
| `serviceAccount.create` | create a own serviceAccount for the pod | `true` |
|
| `serviceAccount.create` | create a own serviceAccount for the pod | `true` |
|
||||||
| `serviceAccount.name` | name of the serviceAccount to create | `""` |
|
| `serviceAccount.name` | name of the serviceAccount to create | `""` |
|
||||||
| `podSecurityPolicy.create` | create a own PodSecurityPolicy for the pod | `false` |
|
| `podSecurityPolicy.create` | create a own PodSecurityPolicy for the pod | `false` |
|
||||||
|
| `metrics.enabled` | create ServiceMonitor CR for Prometheus operator | `false` |
|
||||||
|
|
||||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
{{- if .Values.metrics.enabled -}}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: {{ template "cadvisor.name" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "cadvisor.name" . }}
|
||||||
|
chart: {{ template "cadvisor.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ template "cadvisor.name" . }}
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- {{ .Release.Namespace }}
|
||||||
|
endpoints:
|
||||||
|
- path: /metrics
|
||||||
|
port: http
|
||||||
|
{{- end -}}
|
||||||
|
|
@ -52,3 +52,8 @@ nodeSelector: {}
|
||||||
tolerations: []
|
tolerations: []
|
||||||
|
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
|
||||||
|
# This will create a ServiceMonitor Custom Resource indicating the prometheus operator what to scrape.
|
||||||
|
metrics:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
Loading…
Reference in New Issue