Skip to content

Commit 9c3276b

Browse files
authored
Mark krelay servers as safe to evict by the cluster autoscaler (#51)
The kubernetes cluster autoscaler doesn't remove pods that are not backed by a controller object (so not created by deployment, replica set, job, stateful set etc), thus without this annotation, krelay is preventing it from removing a node
1 parent b5d8969 commit 9c3276b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/client/utils.go

+3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ func createServerPod(ctx context.Context, cs kubernetes.Interface, svrImg, names
4444
"app.kubernetes.io/name": constants.ServerName,
4545
"app": constants.ServerName,
4646
},
47+
Annotations: map[string]string{
48+
"cluster-autoscaler.kubernetes.io/safe-to-evict": "true",
49+
},
4750
},
4851
Spec: corev1.PodSpec{
4952
AutomountServiceAccountToken: toPtr(false),

0 commit comments

Comments
 (0)