From 274c330fa559e594d2eab1e897b581de6bc23e6d Mon Sep 17 00:00:00 2001 From: KangSheng Date: Tue, 26 Sep 2023 14:35:30 +0800 Subject: [PATCH] update deployment with revision history limit (#528) --- keda/README.md | 3 +++ keda/templates/manager/deployment.yaml | 1 + keda/templates/metrics-server/deployment.yaml | 1 + keda/templates/webhooks/deployment.yaml | 1 + keda/values.yaml | 6 ++++++ 5 files changed, 12 insertions(+) diff --git a/keda/README.md b/keda/README.md index 5bc573a9..3114f2d9 100644 --- a/keda/README.md +++ b/keda/README.md @@ -120,6 +120,7 @@ their default values. | `operator.name` | string | `"keda-operator"` | Name of the KEDA operator | | `operator.readinessProbe` | object | `{"failureThreshold":3,"initialDelaySeconds":20,"periodSeconds":3,"successThreshold":1,"timeoutSeconds":1}` | Readiness probes for operator ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes)) | | `operator.replicaCount` | int | `1` | 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. Learn more in [our documentation](https://keda.sh/docs/latest/operate/cluster/#high-availability). | +| `operator.revisionHistoryLimit` | int | `10` | ReplicaSets for this Deployment you want to retain (Default: 10) | | `permissions.operator.restrict.secret` | bool | `false` | Restrict Secret Access for KEDA operator | | `podAnnotations.keda` | object | `{}` | Pod annotations for KEDA operator | | `podDisruptionBudget.operator` | object | `{}` | Capability to configure [Pod Disruption Budget] | @@ -168,6 +169,7 @@ their default values. | `metricsServer.livenessProbe` | object | `{"failureThreshold":3,"initialDelaySeconds":5,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1}` | Liveness probes for Metrics API Server ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)) | | `metricsServer.readinessProbe` | object | `{"failureThreshold":3,"initialDelaySeconds":5,"periodSeconds":3,"successThreshold":1,"timeoutSeconds":1}` | Readiness probes for Metrics API Server ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes)) | | `metricsServer.replicaCount` | int | `1` | 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. Learn more in [our documentation](https://keda.sh/docs/latest/operate/cluster/#high-availability). | +| `metricsServer.revisionHistoryLimit` | int | `10` | ReplicaSets for this Deployment you want to retain (Default: 10) | | `metricsServer.useHostNetwork` | bool | `false` | Enable metric server to use host network | | `permissions.metricServer.restrict.secret` | bool | `false` | Restrict Secret Access for Metrics Server | | `podAnnotations.metricsAdapter` | object | `{}` | Pod annotations for KEDA Metrics Adapter | @@ -250,6 +252,7 @@ their default values. | `webhooks.port` | string | `""` | Port number to use for KEDA admission webhooks. Default is 9443. | | `webhooks.readinessProbe` | object | `{"failureThreshold":3,"initialDelaySeconds":20,"periodSeconds":3,"successThreshold":1,"timeoutSeconds":1}` | Readiness probes for admission webhooks ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes)) | | `webhooks.replicaCount` | int | `1` | Capability to configure the number of replicas for KEDA admission webhooks | +| `webhooks.revisionHistoryLimit` | int | `10` | ReplicaSets for this Deployment you want to retain (Default: 10) | | `webhooks.useHostNetwork` | bool | `false` | Enable webhook to use host network, this is required on EKS with custom CNI | Specify each parameter using the `--set key=value[,key=value]` argument to 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