Skip to content

Revert "Reduce load on the Kubernetes API server and reduce the peak memory use of the cert-manager components by enabling the use of the WatchList (Streaming Lists) feature" - #7315

Merged
cert-manager-prow[bot] merged 1 commit into
cert-manager:masterfrom
wallrj:revert-7175-3748-enable-watchlist-streaming-lists
Oct 1, 2024

Conversation

@wallrj

@wallrj wallrj commented Oct 1, 2024 •

Copy link
Copy Markdown
Member

Reverts #7175

I have learned that there is a general mechanism enabling client-go feature flags, using environment variables,
so PR #7175 was not necessary.
See Overriding client-go feature gates in the "Introducing Feature Gates to Client-Go: Enhancing Flexibility and Control" blog post.

Upgrading to client-go 0.31 is sufficient for users to test the WatchListClient feature,
by adding KUBE_FEATURE_WatchListClient=true to the environment variables of the components.

ℹ️ The Helm value extraEnv is currently only available for the controller.

You will see the state of the client-go features in the logs:

$ kubectl logs -n cert-manager deploy/cert-manager | grep -i feature
{"ts":1727789230397.5154,"caller":"features/envvar.go:172","msg":"Feature gate default state","v":1,"feature":"InformerResourceVersion","enabled":false}
{"ts":1727789230397.6208,"caller":"features/envvar.go:169","msg":"Feature gate updated state","v":1,"feature":"WatchListClient","enabled":false}

vs

$ kubectl logs -n cert-manager deploy/cert-manager | grep -i feature
{"ts":1727789316044.557,"caller":"features/envvar.go:169","msg":"Feature gate updated state","v":1,"feature":"WatchListClient","enabled":true}
{"ts":1727789316044.622,"caller":"features/envvar.go:172","msg":"Feature gate default state","v":1,"feature":"InformerResourceVersion","enabled":false}

/kind cleanup

Testing

I deployed cert-manager from this branch in a Kind cluster with 100MiB Secret resources.
With KUBE_FEATURE_WatchListClient=false and then KUBE_FEATURE_WatchListClient=true.
Measured the peak memory usage of controller using the VmHWM file in /proc/*/status.

component before (MiB) after (MiB)
controller 437 229
etcd 351 357
kube-apiserver 1131 891

See https://gist.github.com/wallrj/3cb36a09d8697f2ebc2a109dd8202b36

NONE

…memory use of the cert-manager components by enabling the use of the WatchList (Streaming Lists) feature"

Signed-off-by: Richard Wall <[email protected]>
@cert-manager-prow cert-manager-prow Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none Denotes a PR that doesn't merit a release note. labels Oct 1, 2024
@cert-manager-prow

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@cert-manager-prow cert-manager-prow Bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 1, 2024
@wallrj
wallrj marked this pull request as ready for review October 1, 2024 13:54
@cert-manager-prow cert-manager-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 1, 2024
@wallrj

wallrj commented Oct 1, 2024

Copy link
Copy Markdown
Member Author

/retest

@inteon

inteon commented Oct 1, 2024

Copy link
Copy Markdown
Member

This will simplify our code, there will be only one way to configure these gates.
/lgtm
/approve

@cert-manager-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inteon

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

@cert-manager-prow cert-manager-prow Bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 1, 2024
@cert-manager-prow
cert-manager-prow Bot merged commit b56ac27 into cert-manager:master Oct 1, 2024
@wallrj
wallrj deleted the revert-7175-3748-enable-watchlist-streaming-lists branch October 1, 2024 15:53
@wallrj

wallrj commented Oct 1, 2024

Copy link
Copy Markdown
Member Author

/cherry-pick release-1.16

@cert-manager-bot

Copy link
Copy Markdown
Contributor

@wallrj: new pull request created: #7318

Details

In response to this:

/cherry-pick release-1.16

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.

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. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. 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.

3 participants