From cda499bf47a1b95e4464b6aeb683ca8aa95880c2 Mon Sep 17 00:00:00 2001 From: kangsheng89 Date: Tue, 26 Sep 2023 13:05:52 +0800 Subject: [PATCH] update deployment with revision history limit --- keda/templates/manager/deployment.yaml | 1 + keda/templates/metrics-server/deployment.yaml | 1 + keda/templates/webhooks/deployment.yaml | 1 + keda/values.yaml | 6 ++++++ 4 files changed, 9 insertions(+) diff --git a/keda/templates/manager/deployment.yaml b/keda/templates/manager/deployment.yaml index 0168230e..bfc642a3 100644 --- a/keda/templates/manager/deployment.yaml +++ b/keda/templates/manager/deployment.yaml @@ -13,6 +13,7 @@ metadata: app.kubernetes.io/name: {{ .Values.operator.name }} {{- include "keda.labels" . | indent 4 }} spec: + revisionHistoryLimit: {{ .Values.operator.revisionHistoryLimit}} replicas: {{ .Values.operator.replicaCount}} {{- with .Values.upgradeStrategy.operator }} strategy: diff --git a/keda/templates/metrics-server/deployment.yaml b/keda/templates/metrics-server/deployment.yaml index 972e95b9..3965e3ff 100644 --- a/keda/templates/metrics-server/deployment.yaml +++ b/keda/templates/metrics-server/deployment.yaml @@ -12,6 +12,7 @@ metadata: app.kubernetes.io/name: {{ .Values.operator.name }}-metrics-apiserver {{- include "keda.labels" . | indent 4 }} spec: + revisionHistoryLimit: {{ .Values.metricsServer.revisionHistoryLimit}} replicas: {{ .Values.metricsServer.replicaCount }} {{- with .Values.upgradeStrategy.metricsApiServer }} strategy: diff --git a/keda/templates/webhooks/deployment.yaml b/keda/templates/webhooks/deployment.yaml index a3a7d02d..c47c6210 100644 --- a/keda/templates/webhooks/deployment.yaml +++ b/keda/templates/webhooks/deployment.yaml @@ -14,6 +14,7 @@ metadata: app.kubernetes.io/name: {{ .Values.webhooks.name }} {{- include "keda.labels" . | indent 4 }} spec: + revisionHistoryLimit: {{ .Values.webhooks.revisionHistoryLimit}} replicas: {{ .Values.webhooks.replicaCount}} {{- with .Values.upgradeStrategy.webhooks }} strategy: diff --git a/keda/values.yaml b/keda/values.yaml index 01938e42..7fec4e09 100644 --- a/keda/values.yaml +++ b/keda/values.yaml @@ -37,6 +37,8 @@ imagePullSecrets: [] operator: # -- Name of the KEDA operator name: keda-operator + # -- ReplicaSets for this Deployment you want to retain (Default: 10) + revisionHistoryLimit: 10 # -- Capability to configure the number of replicas for KEDA operator. # While you can run more replicas of our operator, only one operator instance will be the leader and serving traffic. # You can run multiple replicas, but they will not improve the performance of KEDA, it could only reduce downtime during a failover. @@ -69,6 +71,8 @@ operator: successThreshold: 1 metricsServer: + # -- ReplicaSets for this Deployment you want to retain (Default: 10) + revisionHistoryLimit: 10 # -- Capability to configure the number of replicas for KEDA metric server. # While you can run more replicas of our metric server, only one instance will used and serve traffic. # You can run multiple replicas, but they will not improve the performance of KEDA, it could only reduce downtime during a failover. @@ -130,6 +134,8 @@ webhooks: useHostNetwork: false # -- Name of the KEDA admission webhooks name: keda-admission-webhooks + # -- ReplicaSets for this Deployment you want to retain (Default: 10) + revisionHistoryLimit: 10 # -- Capability to configure the number of replicas for KEDA admission webhooks replicaCount: 1 # -- [Affinity] for pod scheduling for KEDA admission webhooks. Takes precedence over the `affinity` field