Skip to content

Commit

Permalink
fix: safe-to-evict annotation value (#2780)
Browse files Browse the repository at this point in the history
Signed-off-by: dkwon17 <[email protected]>
  • Loading branch information
dkwon17 authored and deerskindoll committed Aug 27, 2024
1 parent 3851070 commit e6556f7
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,26 @@ config:
----

== When the autoscaler removes a node
To prevent workspace pods from being evicted when the autoscaler needs to remove a node, add the `"cluster-autoscaler.kubernetes.io/safe-to-evict": "true"` annotation to every workspace pod.
To prevent workspace pods from being evicted when the autoscaler needs to remove a node, add the `"cluster-autoscaler.kubernetes.io/safe-to-evict": "false"` annotation to every workspace pod.

.Procedure

. In the CheCluster Custom Resource, add the `cluster-autoscaler.kubernetes.io/safe-to-evict: "true"` annotation in the `spec.devEnvironments.workspacesPodAnnotations` field.
. In the CheCluster Custom Resource, add the `cluster-autoscaler.kubernetes.io/safe-to-evict: "false"` annotation in the `spec.devEnvironments.workspacesPodAnnotations` field.
+
[source,yaml,subs="+quotes,+attributes"]
----
spec:
devEnvironments:
workspacesPodAnnotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
----

.Verification steps

. Start a workspace and verify that the workspace pod contains the `cluster-autoscaler.kubernetes.io/safe-to-evict: "true"` annotation.
. Start a workspace and verify that the workspace pod contains the `cluster-autoscaler.kubernetes.io/safe-to-evict: "false"` annotation.
+
[subs="+attributes,+quotes"]
----
$ {orch-cli} get pod __<workspace_pod_name>__ -o jsonpath='{.metadata.annotations.cluster-autoscaler\.kubernetes\.io/safe-to-evict}'
true
false
----

0 comments on commit e6556f7

Please sign in to comment.