Skip to content

feat(cluster): add terminatedPodGcThreshold (podGcControllerConfig) support - #252

Merged
ack-prow[bot] merged 1 commit into
aws-controllers-k8s:mainfrom
chithreshazad:crucible-podgc-controller-config
Sep 9, 2026
Merged

feat(cluster): add terminatedPodGcThreshold (podGcControllerConfig) support#252
ack-prow[bot] merged 1 commit into
aws-controllers-k8s:mainfrom
chithreshazad:crucible-podgc-controller-config

Conversation

@chithreshazad

Copy link
Copy Markdown
Contributor

Description of changes:

Exposes KubeControllerManagerConfig.podGcControllerConfig.terminatedPodGcThreshold (new in aws-sdk-go-v2/service/eks v1.95.1) on the Cluster resource.

  • generator.yaml: un-ignore the field and add nested late_initialize (skip_incomplete_check) for PodGcControllerConfig and its TerminatedPodGcThreshold leaf, matching the existing component-config pattern. The backend injects tier defaults on read, so nested late-init prevents false drift on the sibling/parent fields.
  • No hook change: updates flow through the existing updateComponentConfig, which sends the whole KubeControllerManagerConfig (now including podGc) via the regenerated newCreateRequestPayload whenever Spec.KubeControllerManagerConfig differs; delta.go now compares the field.
  • e2e: create asserts terminatedPodGcThreshold=12500, update to 12000, re-assert. Uses tier-xl (terminatedPodGcThreshold is valid only on PCP clusters, range 10000-12500).

CertificateAuthority and Cluster.certificateAuthority.active remain ignored (separate features).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-prow ack-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 3, 2026
@ack-prow

ack-prow Bot commented Sep 3, 2026

Copy link
Copy Markdown

Hi @chithreshazad. Thanks for your PR.

I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

kubeControllerManagerConfig:
horizontalPodAutoscalerControllerConfig:
horizontalPodAutoscalerSyncPeriod: "$HPA_SYNC_PERIOD"
# terminatedPodGcThreshold is valid only on PCP (Provisioned Control Plane)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If that's the case, you'll need to update this manifest with the PCP configuration, otherwise the e2e tests might fail.

@chithreshazad chithreshazad Sep 3, 2026

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.

The test is already using the PCP configuration. The test set the controlPlaneScalingConfig to tier-xl which is a PCP tier.

controlPlaneScalingConfig:
    tier: "tier-xl"

@gobos12

gobos12 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

/ok-to-test

@ack-prow ack-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 3, 2026

@michaelhtm michaelhtm left a comment

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.

Thanks @chithreshazad
left two comments below

Comment thread pkg/resource/cluster/sdk.go
Comment thread config/crd/bases/eks.services.k8s.aws_clusters.yaml Outdated
@michaelhtm

Copy link
Copy Markdown
Member

/label release/minor

@ack-prow ack-prow Bot added the release/minor Indicates this PR should trigger a minor version release on merge. label Sep 8, 2026
ack-prow Bot pushed a commit to aws-controllers-k8s/pkg that referenced this pull request Sep 8, 2026
Adds a `Gc` -> `GC` initialism so garbage-collection field names render the abbreviation uppercased, consistent with existing AWS abbreviations (DB, AZ, ARN, ...).

### Motivation
The EKS controller is adding `controlPlaneComponentConfig.kubeControllerManagerConfig.podGcControllerConfig.terminatedPodGcThreshold` (aws-controllers-k8s/eks-controller#252). Without this rule ACK renders `podGcControllerConfig` / `terminatedPodGcThreshold`; with it they become `podGCControllerConfig` / `terminatedPodGCThreshold`.

### Safety / scope
The rule matches `Gc` only when an uppercase letter follows (`Gc(?=[A-Z])`), so it does **not** touch `Gcp` (DMS `GcpMySQLSettings` = Google Cloud Platform), `Gcm` (Pinpoint/Chime GCM channels, KMS AES-GCM), `Gce`, or `Gcs`.

Scanned all 432 services in `aws-sdk-go-v2`: the only real API-model fields with a `Gc`+uppercase token are the EKS podGc family. The only other matches are randomized protocol-test fixtures under `service/internal` (not a generated service), so there is no fleet-wide impact.

### Testing
`go test ./names/names_test.go` passes, including new cases for the uppercased podGc fields and `Gcp`/`Gcm` guards.
@chithreshazad
chithreshazad force-pushed the crucible-podgc-controller-config branch from 065f0cb to 13ae600 Compare September 8, 2026 23:28
@chithreshazad

Copy link
Copy Markdown
Contributor Author

/retest-required

@michaelhtm

Copy link
Copy Markdown
Member

@chithreshazad these failures are mainly caused by your go version. Can you try updating yours to 1.27 and regenerate the controller?

…upport

Exposes KubeControllerManagerConfig.podGCControllerConfig.terminatedPodGCThreshold
(new in aws-sdk-go-v2/service/eks v1.95.1) on the Cluster resource.

- generator.yaml: un-ignore the field and add nested late_initialize
  (skip_incomplete_check) for PodGCControllerConfig and its
  TerminatedPodGCThreshold leaf. The backend injects tier defaults on read, so
  nested late-init prevents false drift on the sibling/parent fields.
- Regenerated with code-generator main, which includes the "GC" garbage-collection
  initialism (aws-controllers-k8s/pkg#51 -> pkg v0.0.27 -> code-generator#741), so
  the k8s-facing fields render as podGCControllerConfig / terminatedPodGCThreshold.
  (The AWS API wire name remains terminatedPodGcThreshold.)
- No hook change: updates flow through the existing updateComponentConfig, which
  sends the whole KubeControllerManagerConfig via the regenerated
  newCreateRequestPayload when Spec.KubeControllerManagerConfig differs; delta.go
  compares the field.
- e2e: create sets terminatedPodGCThreshold=12500 and asserts it via describe
  (AWS wire name terminatedPodGcThreshold), updates the CR to 12000, re-asserts.
  Uses tier-xl (valid only on PCP clusters, range 10000-12500).
@chithreshazad
chithreshazad force-pushed the crucible-podgc-controller-config branch from 13ae600 to 94a268a Compare September 9, 2026 18:33
@michaelhtm

Copy link
Copy Markdown
Member

/lgtm

@ack-prow ack-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 9, 2026
@ack-prow

ack-prow Bot commented Sep 9, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chithreshazad, michaelhtm

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-prow ack-prow Bot added the approved label Sep 9, 2026
@ack-prow
ack-prow Bot merged commit 2b06bbe into aws-controllers-k8s:main Sep 9, 2026
9 checks passed
ack-prow Bot pushed a commit that referenced this pull request Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release/minor Indicates this PR should trigger a minor version release on merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants