Skip to content

Commit

Permalink
Allow running on control plane nodes, but prefer worker nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
AndiDog committed Dec 9, 2024
1 parent 3fa3eea commit d2177bc
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions helm/cluster-aws/templates/aws-nth-helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
{{/* Default Helm values for the app */}}
{{/* See schema for the appropriate app version here https://github.com/giantswarm/aws-nth-bundle/blob/main/helm/aws-nth-bundle/values.schema.json */}}
{{- define "defaultAwsNodeTerminationHandlerHelmValues" }}
awsNodeTerminationHandler:
values:
image:
registry: {{ include "awsContainerImageRegistry" $ }}

# Allow running on control plane nodes. On deletion, CAPI will first delete the worker nodes
# and we still want aws-node-termination-handler to take care of the last workers' EC2 lifecycle
# hooks since they otherwise won't be completed, resulting in unnecessary waiting time before
# AWS can terminate the instances
# (see `AWSMachinePool.spec.lifecycleHooks["aws-node-termination-handler"].heartbeatTimeout`).
# This runs on workers by default but allows moving pods to control plane nodes. Requires
# queue processing mode i.e. running as `Deployment`, not `DaemonSet`.
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: DoesNotExist
weight: 10
tolerations:
- effect: NoSchedule
operator: Exists
key: node-role.kubernetes.io/control-plane

clusterID: {{ include "resource.default.name" $ }}
{{- if (.Values.global.connectivity.proxy).enabled }}
proxy:
Expand Down

0 comments on commit d2177bc

Please sign in to comment.