Skip to content

Commit e8d94f9

Browse files
author
borg-z
authored
cluster-autoscaler ds eviction annotation (#57)
Signed-off-by: borg-z <[email protected]>
1 parent ebcad6c commit e8d94f9

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

charts/helm_lib/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
22
type: library
33
name: deckhouse_lib_helm
4-
version: 1.22.0
4+
version: 1.23.0
55
description: "Helm utils template definitions for Deckhouse modules."

charts/helm_lib/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
| Table of contents |
66
|---|
7+
| **Enable Ds Eviction** |
8+
| [helm_lib_ds_eviction_annotation](#helm_lib_ds_eviction_annotation) |
79
| **Envs For Proxy** |
810
| [helm_lib_envs_for_proxy](#helm_lib_envs_for_proxy) |
911
| **High Availability** |
@@ -102,6 +104,18 @@
102104
| [helm_lib_deployment_on_master_custom_strategy_and_replicas_for_ha](#helm_lib_deployment_on_master_custom_strategy_and_replicas_for_ha) |
103105
| [helm_lib_deployment_strategy_and_replicas_for_ha](#helm_lib_deployment_strategy_and_replicas_for_ha) |
104106

107+
## Enable Ds Eviction
108+
109+
### helm_lib_ds_eviction_annotation
110+
111+
Adds `cluster-autoscaler.kubernetes.io/enable-ds-eviction` annotation to manage DaemonSet eviction by the Cluster Autoscaler.
112+
This is important to prevent the eviction of DaemonSet pods during cluster scaling.
113+
114+
#### Usage
115+
116+
`{{ include "helm_lib_ds_eviction_annotation" . }} `
117+
118+
105119
## Envs For Proxy
106120

107121
### helm_lib_envs_for_proxy
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{- /* Usage: {{ include "helm_lib_ds_eviction_annotation" . }} */ -}}
2+
{{- /* Adds `cluster-autoscaler.kubernetes.io/enable-ds-eviction` annotation to manage DaemonSet eviction by the Cluster Autoscaler. */ -}}
3+
{{- /* This is important to prevent the eviction of DaemonSet pods during cluster scaling. */ -}}
4+
{{- define "helm_lib_ds_eviction_annotation" -}}
5+
{{- $enableEviction := default "false" (index . 1) }}
6+
cluster-autoscaler.kubernetes.io/enable-ds-eviction: "{{ $enableEviction }}"
7+
{{- end }}

0 commit comments

Comments
 (0)