Skip to content

Add TerminatedPodGcThreshold to control plane component config - #8853

Open
chithreshazad wants to merge 1 commit into
eksctl-io:mainfrom
chithreshazad:crucible-podgc-threshold
Open

Add TerminatedPodGcThreshold to control plane component config#8853
chithreshazad wants to merge 1 commit into
eksctl-io:mainfrom
chithreshazad:crucible-podgc-threshold

Conversation

@chithreshazad

@chithreshazad chithreshazad commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description

Adds support for kubeControllerManagerConfig.podGcControllerConfig.terminatedPodGcThreshold, wiring it through the create path (CloudFormation via the vendored goformation structs) and the update path (eksctl utils update-control-plane-component-config, via the EKS SDK).

The kube-controller-manager converters are restructured so the pod GC and horizontal pod autoscaler sub-configs are independent: either or both may be set, and setting one no longer drops the other.

Tested

Wrote unit tests and also did e2e testing for this new config, testing both the create and update paths.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes
  • (Core team) Added labels for change area (e.g. area/nodegroup) and kind (e.g. kind/improvement)

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

@naclonts naclonts self-assigned this Sep 2, 2026
@naclonts naclonts added area/config-file kind/feature New feature or request labels Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Hello chithreshazad 👋 Thank you for opening a Pull Request in eksctl project. The team will review the Pull Request and aim to respond within 1-10 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

// before the pod garbage collector starts deleting terminated pods.
// +optional
TerminatedPodGcThreshold *int `json:"terminatedPodGcThreshold,omitempty"`
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should follow the Go initialism pattern for these (podGCControllerConfig / terminatedPodGCThreshold / etc)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Will fix this.

horizontalPodAutoscalerControllerConfig:
horizontalPodAutoscalerSyncPeriod: 15s
podGcControllerConfig:
terminatedPodGcThreshold: 12000

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is 12000 a valid value? Checking with DescribeClusterVersions, it looks like 12500 is the min and max today.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a valid value though this configuration is only supported on PCP tiers. You can see the controlPlaneScalingTiers in the DescribeClusterVersions API

...
"controlPlaneScalingTiers": [
                {
                    "tierName": "tier-xl",
                    "apiRequestConcurrency": 1700,
                    "podSchedulingRatePerSecond": 167,
                    "clusterDatabaseSizeGb": 16,
                    "controlPlaneComponentConfigOverrides": {
                        "kubeControllerManagerConfig": {
                            "podGcControllerConfig": {
                                "terminatedPodGcThreshold": {
                                    "defaultValue": 12500,
                                    "constraints": {
                                        "min": 10000,
                                        "max": 12500
                                    }
                                }
                            },
                            "horizontalPodAutoscalerControllerConfig": {
                                "horizontalPodAutoscalerSyncPeriod": {
                                    "defaultValue": "15s",
                                    "constraints": {
                                        "min": "10s",
                                        "max": "15s"
                                    }
                                }
                            }
                        }
                    }
                },
...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me reword some paragraphs to clarify that config is PCP only in the docs.

return out
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this wasn't autogenerated, so will get overwritten. Can regenerate with make generate-all

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Seems like AI manually did it. Will fix this.

Adds support for kubeControllerManagerConfig.podGcControllerConfig.
terminatedPodGcThreshold, wiring it through the create path (CloudFormation
via the vendored goformation structs) and the update path
(eksctl utils update-control-plane-component-config, via the EKS SDK).

The kube-controller-manager converters are restructured so the pod GC and
horizontal pod autoscaler sub-configs are independent: either or both may be
set, and setting one no longer drops the other.

Signed-off-by: Chithresh Azad <chithres@amazon.com>
@chithreshazad
chithreshazad force-pushed the crucible-podgc-threshold branch from b6ea490 to 596b1f9 Compare September 3, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config-file kind/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants