mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/prometheus-adapter] Adds support for external metrics v0.5.0 (#13133)
* Add external metrics support v0.5.0 Signed-off-by: Vitaly Gorodetsky <gorodetsky@gmail.com> * fixes trailing spaces Signed-off-by: Vitaly Gorodetsky <gorodetsky@gmail.com> * PR fixes Signed-off-by: Vitaly Gorodetsky <gorodetsky@gmail.com> * PR fixes Signed-off-by: Vitaly Gorodetsky <gorodetsky@gmail.com> * Fixes @steven-sheehy comments Signed-off-by: Vitaly Gorodetsky <gorodetsky@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
c4e0e1fdd5
commit
2eeaaeace5
@@ -1,6 +1,6 @@
|
||||
name: prometheus-adapter
|
||||
version: v0.4.2
|
||||
appVersion: v0.4.1
|
||||
version: v0.5.0
|
||||
appVersion: v0.5.0
|
||||
description: A Helm chart for k8s prometheus adapter
|
||||
home: https://github.com/DirectXMan12/k8s-prometheus-adapter
|
||||
keywords:
|
||||
|
||||
@@ -38,7 +38,7 @@ The following table lists the configurable parameters of the Prometheus Adapter
|
||||
| ------------------------------- | ------------------------------------------------------------------------------- | --------------------------------------------|
|
||||
| `affinity` | Node affinity | `{}` |
|
||||
| `image.repository` | Image repository | `directxman12/k8s-prometheus-adapter-amd64` |
|
||||
| `image.tag` | Image tag | `v0.4.1` |
|
||||
| `image.tag` | Image tag | `v0.5.0` |
|
||||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
|
||||
| `image.pullSecrets` | Image pull secrets | `{}` |
|
||||
| `logLevel` | Log level | `4` |
|
||||
@@ -50,7 +50,8 @@ The following table lists the configurable parameters of the Prometheus Adapter
|
||||
| `resources` | CPU/Memory resource requests/limits | `{}` |
|
||||
| `rules.default` | If `true`, enable a set of default rules in the configmap | `true` |
|
||||
| `rules.custom` | A list of custom configmap rules | `[]` |
|
||||
| `rules.existing` | The name of an existing configMap with rules. Overrides default and custom. | `` |
|
||||
| `rules.existing` | The name of an existing configMap with rules. Overrides default, custom and external. | `` |
|
||||
| `rules.external` | A list of custom rules for external metrics API | `[]` |
|
||||
| `service.annotations` | Annotations to add to the service | `{}` |
|
||||
| `service.port` | Service port to expose | `443` |
|
||||
| `service.type` | Type of service to create | `ClusterIP` |
|
||||
|
||||
@@ -82,4 +82,8 @@ data:
|
||||
{{- if .Values.rules.custom }}
|
||||
{{ toYaml .Values.rules.custom | indent 4 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if .Values.rules.external }}
|
||||
externalRules:
|
||||
{{ toYaml .Values.rules.external | indent 4 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
apiVersion: apiregistration.k8s.io/v1beta1
|
||||
kind: APIService
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "k8s-prometheus-adapter.name" . }}
|
||||
chart: {{ template "k8s-prometheus-adapter.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
name: v1beta1.external.metrics.k8s.io
|
||||
spec:
|
||||
service:
|
||||
name: {{ template "k8s-prometheus-adapter.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
{{ if .Values.tls.enable -}}
|
||||
caBundle: {{ b64enc .Values.tls.ca }}
|
||||
{{- end }}
|
||||
group: external.metrics.k8s.io
|
||||
version: v1beta1
|
||||
insecureSkipTLSVerify: {{ if .Values.tls.enable }}false{{ else }}true{{ end }}
|
||||
groupPriorityMinimum: 100
|
||||
versionPriority: 100
|
||||
@@ -0,0 +1,20 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "k8s-prometheus-adapter.name" . }}
|
||||
chart: {{ template "k8s-prometheus-adapter.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
name: {{ template "k8s-prometheus-adapter.name" . }}-external-metrics
|
||||
rules:
|
||||
- apiGroups:
|
||||
- "external.metrics.k8s.io"
|
||||
resources:
|
||||
- "*"
|
||||
verbs:
|
||||
- list
|
||||
- get
|
||||
- watch
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "k8s-prometheus-adapter.name" . }}
|
||||
chart: {{ template "k8s-prometheus-adapter.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
name: {{ template "k8s-prometheus-adapter.name" . }}-hpa-controller-external-metrics
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ template "k8s-prometheus-adapter.name" . }}-external-metrics
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: horizontal-pod-autoscaler
|
||||
namespace: kube-system
|
||||
{{- end -}}
|
||||
@@ -3,7 +3,7 @@ affinity: {}
|
||||
|
||||
image:
|
||||
repository: directxman12/k8s-prometheus-adapter-amd64
|
||||
tag: v0.4.1
|
||||
tag: v0.5.0
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
logLevel: 4
|
||||
@@ -49,8 +49,16 @@ rules:
|
||||
# as: "my_custom_metric"
|
||||
# metricsQuery: sum(<<.Series>>{<<.LabelMatchers>>}) by (<<.GroupBy>>)
|
||||
# Mounts a configMap with pre-generated rules for use. Overrides the
|
||||
# default and custom entries
|
||||
# default, custom and external entries
|
||||
existing:
|
||||
external: []
|
||||
# - seriesQuery: '{__name__=~"^some_metric_count$"}'
|
||||
# resources:
|
||||
# template: <<.Resource>>
|
||||
# name:
|
||||
# matches: ""
|
||||
# as: "my_custom_metric"
|
||||
# metricsQuery: sum(<<.Series>>{<<.LabelMatchers>>}) by (<<.GroupBy>>)
|
||||
|
||||
service:
|
||||
annotations: {}
|
||||
|
||||
Reference in New Issue
Block a user