forked from prometheus-community/helm-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[prometheus-blackbox-exporter] Add Vertical Pod Autoscaler to Prometh…
…eus Blackbox Exporter (prometheus-community#3578) * fix: allow minReplicas to be set for VPA Signed-off-by: t3mi <[email protected]> * feat: add support for controlledValues Signed-off-by: t3mi <[email protected]> * fix: disable vpa by default Signed-off-by: t3mi <[email protected]> --------- Signed-off-by: t3mi <[email protected]>
- Loading branch information
Showing
3 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
charts/prometheus-blackbox-exporter/templates/verticalpodautoscaler.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1") (.Values.verticalPodAutoscaler.enabled) }} | ||
apiVersion: autoscaling.k8s.io/v1 | ||
kind: VerticalPodAutoscaler | ||
metadata: | ||
name: {{ include "prometheus-blackbox-exporter.fullname" . }} | ||
namespace: {{ template "prometheus-blackbox-exporter.namespace" . }} | ||
labels: | ||
{{- include "prometheus-blackbox-exporter.labels" . | nindent 4 }} | ||
spec: | ||
resourcePolicy: | ||
containerPolicies: | ||
- containerName: blackbox-exporter | ||
{{- if .Values.verticalPodAutoscaler.controlledResources }} | ||
controlledResources: {{ .Values.verticalPodAutoscaler.controlledResources }} | ||
{{- end }} | ||
{{- if .Values.verticalPodAutoscaler.controlledValues }} | ||
controlledValues: {{ .Values.verticalPodAutoscaler.controlledValues }} | ||
{{- end }} | ||
{{- if .Values.verticalPodAutoscaler.maxAllowed }} | ||
maxAllowed: | ||
{{ toYaml .Values.verticalPodAutoscaler.maxAllowed | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.verticalPodAutoscaler.minAllowed }} | ||
minAllowed: | ||
{{ toYaml .Values.verticalPodAutoscaler.minAllowed | nindent 8 }} | ||
{{- end }} | ||
targetRef: | ||
apiVersion: apps/v1 | ||
{{- if (eq .Values.kind "DaemonSet") }} | ||
kind: DaemonSet | ||
{{- else }} | ||
kind: Deployment | ||
{{- end }} | ||
name: {{ template "prometheus-blackbox-exporter.fullname" . }} | ||
{{- with .Values.verticalPodAutoscaler.updatePolicy }} | ||
updatePolicy: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters