Skip to content

Commit

Permalink
Mark scheduler canary pods as safe-to-evict for autoscaler
Browse files Browse the repository at this point in the history
  • Loading branch information
simu committed Dec 11, 2024
1 parent a1001fe commit ca6771e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
12 changes: 10 additions & 2 deletions component/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ local canary = kube._Object('monitoring.appuio.io/v1beta1', 'SchedulerCanary', '
interval: sliConfig.podStartInterval,
maxPodCompletionTimeout: sliConfig.overallPodTimeout,
podTemplate: {
metadata: {},
metadata: {
annotations: {
'cluster-autoscaler.kubernetes.io/safe-to-evict': 'true',
},
},
spec: {
affinity: {
nodeAffinity: params.canary_node_affinity,
Expand Down Expand Up @@ -129,7 +133,11 @@ local storageCanaries = std.flattenArrays(std.filterMap(
maxPodCompletionTimeout: p.maxPodCompletionTimeout,
forbidParallelRuns: true,
podTemplate: {
metadata: {},
metadata: {
annotations: {
'cluster-autoscaler.kubernetes.io/safe-to-evict': 'true',
},
},
spec: {
affinity: {
nodeAffinity: params.canary_node_affinity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ spec:
interval: 1m
maxPodCompletionTimeout: 3m
podTemplate:
metadata: {}
metadata:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: 'true'
spec:
affinity:
nodeAffinity:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ spec:
interval: 1m
maxPodCompletionTimeout: 3m
podTemplate:
metadata: {}
metadata:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: 'true'
spec:
affinity:
nodeAffinity:
Expand Down Expand Up @@ -93,7 +95,9 @@ spec:
interval: 1m
maxPodCompletionTimeout: 3m
podTemplate:
metadata: {}
metadata:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: 'true'
spec:
affinity:
nodeAffinity:
Expand Down Expand Up @@ -160,7 +164,9 @@ spec:
interval: 1m
maxPodCompletionTimeout: 3m
podTemplate:
metadata: {}
metadata:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: 'true'
spec:
affinity:
nodeAffinity:
Expand Down

0 comments on commit ca6771e

Please sign in to comment.