Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vpa crs for keda-operator and metrics-server #562

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/external-scaler-azure-cosmos-db-0.1.0.tgz
Binary file not shown.
147 changes: 74 additions & 73 deletions docs/index.yaml

Large diffs are not rendered by default.

Binary file modified docs/keda-2.12.0.tgz
Binary file not shown.
Binary file modified docs/keda-add-ons-http-0.6.0.tgz
Binary file not shown.
10 changes: 10 additions & 0 deletions keda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ their default values.
| `securityContext.operator` | object | [See below](#KEDA-is-secure-by-default) | [Security context] of the operator container |
| `topologySpreadConstraints.operator` | list | `[]` | [Pod Topology Constraints] of KEDA operator pod |
| `upgradeStrategy.operator` | object | `{}` | Capability to configure [Deployment upgrade strategy] for operator |
| `verticalPodAutoscaler.keda.cpu.maxAllowed` | int | `2` | |
zroubalik marked this conversation as resolved.
Show resolved Hide resolved
| `verticalPodAutoscaler.keda.cpu.minAllowed` | string | `"20m"` | |
| `verticalPodAutoscaler.keda.enabled` | bool | `false` | Enables the creation of a vpa for the keda-operator |
| `verticalPodAutoscaler.keda.memory.maxAllowed` | string | `"2Gi"` | |
| `verticalPodAutoscaler.keda.memory.minAllowed` | string | `"200Mi"` | |
| `volumes.keda.extraVolumeMounts` | list | `[]` | Extra volume mounts for KEDA deployment |
| `volumes.keda.extraVolumes` | list | `[]` | Extra volumes for KEDA deployment |

Expand Down Expand Up @@ -162,6 +167,11 @@ their default values.
| `service.type` | string | `"ClusterIP"` | KEDA Metric Server service type |
| `topologySpreadConstraints.metricsServer` | list | `[]` | [Pod Topology Constraints] of KEDA metrics apiserver pod |
| `upgradeStrategy.metricsApiServer` | object | `{}` | Capability to configure [Deployment upgrade strategy] for Metrics Api Server |
| `verticalPodAutoscaler.metricsApiServer.cpu.maxAllowed` | int | `2` | |
| `verticalPodAutoscaler.metricsApiServer.cpu.minAllowed` | string | `"20m"` | |
| `verticalPodAutoscaler.metricsApiServer.enabled` | bool | `false` | Enables the creation of a vpa for the keda-operator-metrics-apiserver |
| `verticalPodAutoscaler.metricsApiServer.memory.maxAllowed` | string | `"2Gi"` | |
| `verticalPodAutoscaler.metricsApiServer.memory.minAllowed` | string | `"200Mi"` | |
| `volumes.metricsApiServer.extraVolumeMounts` | list | `[]` | Extra volume mounts for metric server deployment |
| `volumes.metricsApiServer.extraVolumes` | list | `[]` | Extra volumes for metric server deployment |

Expand Down
30 changes: 30 additions & 0 deletions keda/templates/manager/verticalpodautoscaler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{- if .Values.verticalPodAutoscaler.keda.enabled }}
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: {{ .Values.operator.name }}-vpa
namespace: {{ .Release.Namespace }}
annotations:
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
labels:
{{- include "keda.labels" . | indent 4 }}
spec:
targetRef:
apiVersion: "apps/v1"
kind: Deployment
name: {{ .Values.operator.name }}
resourcePolicy:
containerPolicies:
- containerName: '*'
controlledResources:
- cpu
- memory
maxAllowed:
cpu: {{ .Values.verticalPodAutoscaler.keda.cpu.maxAllowed }}
memory: {{ .Values.verticalPodAutoscaler.keda.memory.maxAllowed }}
minAllowed:
cpu: {{ .Values.verticalPodAutoscaler.keda.cpu.minAllowed }}
memory: {{ .Values.verticalPodAutoscaler.keda.memory.minAllowed }}
updatePolicy:
updateMode: "Auto"
{{- end }}
30 changes: 30 additions & 0 deletions keda/templates/metrics-server/verticalpodautoscaler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{- if .Values.verticalPodAutoscaler.metricsApiServer.enabled }}
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: {{ .Values.operator.name }}-metrics-apiserver-vpa
namespace: {{ .Release.Namespace }}
annotations:
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
labels:
{{- include "keda.labels" . | indent 4 }}
spec:
targetRef:
apiVersion: "apps/v1"
kind: Deployment
name: {{ .Values.operator.name }}-metrics-apiserver
resourcePolicy:
containerPolicies:
- containerName: '*'
controlledResources:
- cpu
- memory
maxAllowed:
cpu: {{ .Values.verticalPodAutoscaler.metricsApiServer.cpu.maxAllowed }}
memory: {{ .Values.verticalPodAutoscaler.metricsApiServer.memory.maxAllowed }}
minAllowed:
cpu: {{ .Values.verticalPodAutoscaler.metricsApiServer.cpu.minAllowed }}
memory: {{ .Values.verticalPodAutoscaler.metricsApiServer.memory.minAllowed }}
updatePolicy:
updateMode: "Auto"
{{- end }}
20 changes: 20 additions & 0 deletions keda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,26 @@ image:
# -- Kubernetes cluster domain
clusterDomain: cluster.local

verticalPodAutoscaler:
zroubalik marked this conversation as resolved.
Show resolved Hide resolved
keda:
# -- Enables the creation of a vpa for the keda-operator
enabled: false
cpu:
minAllowed: 20m
maxAllowed: 2
memory:
minAllowed: 200Mi
maxAllowed: 2Gi
metricsApiServer:
# -- Enables the creation of a vpa for the keda-operator-metrics-apiserver
enabled: false
cpu:
minAllowed: 20m
maxAllowed: 2
memory:
minAllowed: 200Mi
maxAllowed: 2Gi

crds:
# -- Defines whether the KEDA CRDs have to be installed or not.
install: true
Expand Down
Loading