kubernetes / enhancements

Enhancements tracking repo for Kubernetes
Apache License 2.0
3.43k stars 1.48k forks source link

client-go: Add metrics into informer #4346

Closed chenk008 closed 2 weeks ago

chenk008 commented 11 months ago

Enhancement Description

Please keep this description up to date. This will help the Enhancement Team to track the evolution of the enhancement efficiently.

chenk008 commented 11 months ago

/sig api-machinery

chenk008 commented 11 months ago

related issue: https://github.com/kubernetes/client-go/issues/1027 https://github.com/kubernetes-sigs/controller-runtime/issues/817 https://github.com/kubernetes/kubernetes/issues/121662 https://github.com/kubernetes/kubernetes/issues/117123

lzlaa commented 10 months ago

It's useful to find out whether there are unhandled events received by reflector.

fedebongio commented 9 months ago

/assign @logicalhan

jpbetz commented 9 months ago

/label lead-opted-in /milestone v1.30

salehsedghpour commented 9 months ago

Hello @logicalhan 👋, Enhancements team here.

Just checking in as we approach enhancements freeze on 02:00 UTC Friday 9th February 2024.

This enhancement is targeting for stage alpha for v1.30 (correct me, if otherwise)

Here's where this enhancement currently stands:

For this KEP, we would just want to update the following but it's not required for alpha stage and it will serve for future stages:

The status of this enhancement is marked as at risk for enhancement freeze. Please keep the issue description up-to-date with appropriate stages as well, I couldn't find any related PR regarding this KEP in k/enhancements. Thank you!

chenk008 commented 9 months ago

I have reverted https://github.com/kubernetes/kubernetes/pull/74636 in my test cluster (1.28), and created 4 secrets/configmap/pods. Each pod use one secret and configmap.

for i in $(seq 1 4);
do 
kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
  name: my-secret$i
spec:
  volumes:
  - name: secret-volume
    secret:
      secretName: my-secret$i
  - name: configmap-volume
    configMap:
      name: my-config$i
  containers:
    - name: dotfile-test-container
      image: nginx
      volumeMounts:
      - name: secret-volume
        readOnly: true
        mountPath: "/etc/secret-volume"
      - name: configmap-volume
        readOnly: true
        mountPath: "/etc/configmap-volume"
EOF

done

This is kubelet memory usage percentage graph. The memory does not continuously grow. image

This is reflector metrics image

chenk008 commented 9 months ago

According to https://github.com/kubernetes/kubernetes/issues/73587, the memory leak is caused by quantile.newStream, every quantile.Stream contains an array with 500 quantile.Sample.

@logicalhan We can reduce summary age/ageBuckets to mitigate memory leak in reflector.

salehsedghpour commented 8 months ago

Hello @logicalhan 👋, Enhancements team here.

Just checking in as we approach enhancements freeze on 02:00 UTC Friday 9th February 2024. (In few hours) And I found the open PR #4349.

This enhancement is targeting for stage alpha for v1.30 (correct me, if otherwise)

Here's where this enhancement currently stands:

For this KEP, we would just want to update the following but it's not required for alpha stage and it will serve for future stages:

The status of this enhancement is marked as at risk for enhancement freeze. Please keep the issue description up-to-date with appropriate stages as well, I couldn't find any related PR regarding this KEP in k/enhancements. Thank you!

salehsedghpour commented 8 months ago

Hello 👋, v1.30 Enhancements team here.

Unfortunately, this enhancement did not meet requirements for enhancements freeze.

If you still wish to progress this enhancement in v1.30, please file an exception request. Thanks!

salehsedghpour commented 8 months ago

/milestone clear

drewhagen commented 8 months ago

Hello @chenk008 @logicalhan 👋, 1.30 Docs Lead here.

Does this enhancement work planned for 1.30 require any new docs or modification to existing docs? If so, please follows the steps here to open a PR against dev-1.30 branch in the k/website repo. This PR can be just a placeholder at this time and must be created before Thursday February 22nd 2024 18:00 PDT.

Also, take a look at Documenting for a release to get yourself familiarize with the docs requirement for the release. Thank you!

Checksumz commented 8 months ago

Hi @chenk008 ,

👋 from the v1.30 Communications Team! We'd love for you to opt in to write a feature blog about your enhancement!

We encourage blogs for features including, but not limited to: breaking changes, features and changes important to our users, and features that have been in progress for a long time and are graduating.

To opt in, you need to open a Feature Blog placeholder PR against the website repository. The placeholder PR deadline is 27th February, 2024. Here's the 1.30 Release Calendar

salehsedghpour commented 8 months ago

Hey again @logicalhan and @chenk008 👋 Enhancements team here,

Just checking in as we approach code freeze at 02:00 UTC Wednesday 6th March 2024 .

Here's where this enhancement currently stands:

For this enhancement, it looks like the following PRs are open and need to be merged before code freeze (and we need to update the Issue description to include all the related PRs of this KEP):

With this, it is now marked as at risk for code freeze for the v1.30 Code Freeze!

Also, please let me know if there are other PRs in k/k we should be tracking for this KEP. As always, we are here to help if any questions come up. Thanks!

salehsedghpour commented 8 months ago

Hello @logicalhan and @chenk008 👋 Enhancements team here,

Unfortunately, the implementation (code related) PR(s) associated with this enhancement is not in the merge-ready state by code-freeze and hence this enhancement is now removed from the v1.30 milestone.

If you still wish to progress this enhancement in v1.30, please file an exception request. Thanks!

/milestone clear

sreeram-venkitesh commented 5 months ago

Hi @logicalhan, @chenk008 👋, 1.31 Enhancements Lead here.

If you wish to progress this enhancement in v1.31, please have the SIG lead opt-in your enhancement by adding the lead-opted-in label and set the milestone to v1.31 before the Production Readiness Review Freeze.

/remove-label lead-opted-in

chenk008 commented 5 months ago

@logicalhan Please confirm if this can be opted in?

k8s-triage-robot commented 2 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 2 weeks ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 2 weeks ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes/enhancements/issues/4346#issuecomment-2418975856): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.