Skip to content

Commit a12909e

Browse files
committed
Update comments
1 parent 867d308 commit a12909e

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

pkg/model/awsmodel/autoscalinggroup.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ func (b *AutoscalingGroupModelBuilder) Build(c *fi.CloudupModelBuilderContext) e
7474
}
7575
}
7676

77+
// Always create the user data, even for Karpenter manged instance groups
78+
// Kaprenter expects the user data to be available in the state store:
79+
// ${KOPS_STATE_STORE}/${CLUSTER_NAME}/igconfig/node/${IG_NAME}/nodeupscript.sh
7780
userData, err := b.BootstrapScriptBuilder.ResourceNodeUp(c, ig)
7881
if err != nil {
7982
return err

pkg/model/bootstrapscript.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ type BootstrapScript struct {
6767

6868
// nodeupConfig contains the nodeup config.
6969
nodeupConfig fi.CloudupTaskDependentResource
70-
// nodeupScript contains the nodeup boostrap script.
70+
// nodeupScript contains the nodeup bootstrap script, for use with Karpenter.
7171
nodeupScript fi.CloudupTaskDependentResource
7272
}
7373

pkg/model/components/nodeterminationhandler.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ func (b *NodeTerminationHandlerOptionsBuilder) BuildOptions(o *kops.Cluster) err
4141
nth := clusterSpec.CloudProvider.AWS.NodeTerminationHandler
4242
if nth.Enabled == nil {
4343
if clusterSpec.Karpenter != nil && clusterSpec.Karpenter.Enabled {
44+
// Karpenter manages its own NTH, so we disable the NTH addon.
45+
// https://karpenter.sh/docs/troubleshooting/#aws-node-termination-handler-nth-interactions
4446
nth.Enabled = fi.PtrTo(false)
4547
} else {
4648
nth.Enabled = fi.PtrTo(true)

0 commit comments

Comments
 (0)