diff --git a/packaging/helm-charts/helm3/strimzi-kafka-operator/templates/057-VerticalPodAutoscaler-strimzi-cluster-operator.yaml b/packaging/helm-charts/helm3/strimzi-kafka-operator/templates/057-VerticalPodAutoscaler-strimzi-cluster-operator.yaml new file mode 100644 index 00000000000..6e483459daa --- /dev/null +++ b/packaging/helm-charts/helm3/strimzi-kafka-operator/templates/057-VerticalPodAutoscaler-strimzi-cluster-operator.yaml @@ -0,0 +1,26 @@ +{{- if .Values.verticalPodAutoscaler.enabled }} +apiVersion: autoscaling.k8s.io/v1 +kind: VerticalPodAutoscaler +metadata: + name: strimzi-cluster-operator + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "strimzi.name" . }} + chart: {{ template "strimzi.chart" . }} + component: vertical-pod-autoscaler + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + targetRef: + apiVersion: apps/v1 + kind: Deployment + name: strimzi-cluster-operator + updatePolicy: + updateMode: {{ .Values.verticalPodAutoscaler.updateMode | quote }} + resourcePolicy: + containerPolicies: + - containerName: strimzi-cluster-operator + controlledResources: + - cpu + - memory +{{- end }} diff --git a/packaging/helm-charts/helm3/strimzi-kafka-operator/values.yaml b/packaging/helm-charts/helm3/strimzi-kafka-operator/values.yaml index 91e1d17a83d..3e952accbde 100644 --- a/packaging/helm-charts/helm3/strimzi-kafka-operator/values.yaml +++ b/packaging/helm-charts/helm3/strimzi-kafka-operator/values.yaml @@ -79,6 +79,14 @@ podDisruptionBudget: maxUnavailable: unhealthyPodEvictionPolicy: IfHealthyBudget +verticalPodAutoscaler: + # If enabled, a VerticalPodAutoscaler resource will be created for the operator Deployment. + # Requires the VPA CRDs to be installed on the cluster. + enabled: false + # VPA update mode: Auto or Recreate restart pods to apply recommendations; + # Initial applies recommendations only at pod creation; Off disables updates. + updateMode: "Auto" + operatorNetworkPolicy: # If enabled, this will generate a networkPolicy for the strimzi-operator. # This flag DOES NOT control operator generated networkPolicies!