Skip to content

Add blog for stale controller mitigation - #54792

Merged
k8s-ci-robot merged 1 commit into
kubernetes:mainfrom
michaelasp:staleBlog
Apr 17, 2026
Merged

k8s-ci-robot merged 1 commit into
kubernetes:mainfrom
michaelasp:staleBlog

Conversation

@michaelasp

@michaelasp michaelasp commented Mar 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

Issue

Ref: kubernetes/enhancements#5647

This blog goes over the new stale controller mitigations we have added in 1.36 and explains the feature gates and changes done.

@k8s-ci-robot k8s-ci-robot added the area/blog Issues or PRs related to the Kubernetes Blog subproject label Mar 6, 2026
@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 6, 2026
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 6, 2026
@netlify

netlify Bot commented Mar 6, 2026

Copy link
Copy Markdown

✅ Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 445a2e6
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/69ab0c45f6219a00087b125e
😎 Deploy Preview https://deploy-preview-54792--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Mar 6, 2026 •

Copy link
Copy Markdown

✅ Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 372be5d
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/69d44785bd216c000702abcc
😎 Deploy Preview https://deploy-preview-54792--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@michaelasp michaelasp changed the title Add blog for stale controller mitigation WIP: Add blog for stale controller mitigation Mar 6, 2026
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 6, 2026
@chadmcrowell

Copy link
Copy Markdown
Contributor

Hi @michaelasp 👋 v1.36 Communications team here,

@lukasmetzner as author of #54693, I'd like you to be a writing buddy for @michaelasp on this PR.

Please:

  • Review this PR, paying attention to the guidelines and review hints
  • Update your own PR based on any best practices you identify that should be applied
  • Remember to be compassionate with your fellow article author

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 26, 2026
@michaelasp michaelasp changed the title WIP: Add blog for stale controller mitigation Add blog for stale controller mitigation Mar 30, 2026
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 30, 2026
@lukasmetzner

Copy link
Copy Markdown
Contributor

Hey @michaelasp, I am your assigned writing buddy. The blog article looks good to me apart from the open thread above, where I agree on adding a basic example.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 31, 2026
An informer author can use the `ConsistencyStore` to track the latest resource version of the objects that the informer cares about.
It provides 3 main functions:

1. `consistencyStore.WroteAt(owningObj, UID, groupResource, resourceVersion)`: This function is called by the controller when it writes to the API server for an object.

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.

I find this pseudo code confusing, because the parameter names are sometimes a description like owningObject and sometypes the type like UID, I think maybe just using go code to have both a parameter name and a type would be better

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.

I just dropped in the interface we provide here, I think that should work.

@serathius

Copy link
Copy Markdown
Member

/cc @jpbetz @liggitt

@k8s-ci-robot
k8s-ci-robot requested review from jpbetz and liggitt April 1, 2026 18:30

@lmktfy lmktfy 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.

  • avoid using "we"
  • for official post-repease Comms I do recommend aligning to the style guide
  • I think the feature gate names might be wrong in one place

### client-go improvements

In client-go, we have added the `AtomicFIFO` feature on top of the existing RealFIFO queue implementation. Doing so allows for
the queue to atomically handle operations that batch events such as the List portion of the ListWatch operation. This ensures

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.

Suggested change
the queue to atomically handle operations that batch events such as the List portion of the ListWatch operation. This ensures
the queue to atomically handle operations that batch events such as the list portion of the `ListWatch()` operation. This ensures

I recommend the parents to imply it's a function you can call. Have I got that right? The actual verb is watch.

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.

It's based on the list->watch pattern that informers do that has recently been updated to streaming lists https://kubernetes.io/docs/reference/using-api/api-concepts/#streaming-lists

It doesn't really matter which you use. I updated this section a bit to make this more clear.


### Metrics

We have added the following alpha metrics to kube-controller-manager:

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.

Suggested change
We have added the following alpha metrics to kube-controller-manager:

Nit: could hyperlink to the relevant entry in the metrics reference docs.

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.

Those are auto generated right? How should I best list this? I don't see a specific way to link any better than https://kubernetes.io/docs/reference/instrumentation/metrics/#list-of-alpha-kubernetes-metrics

Added that link for now since it matches the alpha metrics line.

@michaelasp

Copy link
Copy Markdown
Contributor Author

for official post-repease Comms I do recommend aligning to the style guide

Let me look through that along with your review and update this, thanks for the pass!

@michaelasp michaelasp left a comment

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.

Thanks for the review, this should address most of your comments. Looking through the style guide to see if anything else was missed.

### client-go improvements

In client-go, we have added the `AtomicFIFO` feature on top of the existing RealFIFO queue implementation. Doing so allows for
the queue to atomically handle operations that batch events such as the List portion of the ListWatch operation. This ensures

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.

It's based on the list->watch pattern that informers do that has recently been updated to streaming lists https://kubernetes.io/docs/reference/using-api/api-concepts/#streaming-lists

It doesn't really matter which you use. I updated this section a bit to make this more clear.


### Metrics

We have added the following alpha metrics to kube-controller-manager:

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.

Those are auto generated right? How should I best list this? I don't see a specific way to link any better than https://kubernetes.io/docs/reference/instrumentation/metrics/#list-of-alpha-kubernetes-metrics

Added that link for now since it matches the alpha metrics line.

@lmktfy lmktfy 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.

Ok; this looks good to me. We can fix the filename after we merge it.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 17, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: da29803b0595879edc8e94f2d3c7f419ecd2e4ee

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lmktfy

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 17, 2026
@k8s-ci-robot
k8s-ci-robot merged commit 5c514d5 into kubernetes:main Apr 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/blog Issues or PRs related to the Kubernetes Blog subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants