Skip to content

Conversation

@lahinson
Copy link
Contributor

@lahinson lahinson commented Jan 13, 2026

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 13, 2026
@ocpdocs-previewbot
Copy link

ocpdocs-previewbot commented Jan 13, 2026

🤖 Fri Jan 23 16:41:52 - Prow CI generated the docs preview:

https://104752--ocpdocs-pr.netlify.app/openshift-enterprise/latest/etcd/etcd-performance.html

@lahinson lahinson force-pushed the osdocs-17843-etcd-ttl branch 2 times, most recently from 34245df to 5b65691 Compare January 15, 2026 21:35

.Procedure

. Edit the `KubeAPIServer` custom resource by entering the following command:
Copy link

@oarribas oarribas Jan 16, 2026

Choose a reason for hiding this comment

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

@lahinson , I think a note about valid values should be added (and maybe also an explanation about the property eventTTLMinutes, as currently it is only shown in the example without additional information).

From [1], the values should be between 5 and 180 (minutes).

[1] https://github.com/openshift/api/pull/2520/changes#diff-6466e6ec9d299ee55a89f9ae0f455bc960d7295ead963490f5497447c2f1feb3R30913-R30914

Choose a reason for hiding this comment

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

In addition to the above, as this is a TP feature and a Feature Gate was created for it [2], does that Feature Gate needs to be enabled? In that case, that should be added to the procedure.

cc @tjungblu

[2] https://issues.redhat.com/browse/CNTRLPLANE-1614

Copy link
Contributor

Choose a reason for hiding this comment

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

most of those are mentioned in our enablement doc here: https://docs.google.com/document/d/1ERRTmlcj5W_zNiP_0sCfM2D5RHwDAh3B5InCqnI1RHY/edit?tab=t.0#heading=h.ei2fzjm8eblm

when you enable TP on your cluster, you get it automatically enabled. When you do CustomNoUpgrade then you need to supply that feature flag.

@lahinson
Copy link
Contributor Author

Hi @oarribas and @tjungblu 👋

I appreciate your willingness to jump in and review this PR, but it's not quite ready yet. That's why it's missing some information. I'll let you know when it's ready for review 😄

@lahinson lahinson force-pushed the osdocs-17843-etcd-ttl branch from 5b65691 to 88778ea Compare January 16, 2026 16:13
@openshift-ci openshift-ci bot 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 Jan 16, 2026
@lahinson lahinson added this to the Planned for 4.21 GA milestone Jan 16, 2026
$ oc patch kubeapiserver/<kubeapiserver_custom_resource_name> -p='{"spec": {"eventTTLMinutes": 5 }}' --type=merge
----
+
* The `KubeAPIServer` custom resource name is typically `cluster`.
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason this is not directly in the command? is there another resources besides cluster there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If cluster is typically the term used for the kubeapiserver CR name, I'm okay with including it in the command. I thought maybe the name of the kubeapiserver CR might vary depending on the user.

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry, that was too rhetorical. AFAIK there is only the cluster resource, so you can just run oc patch kubeapiserver/cluster

+
[source,terminal]
----
$ etcdctl lease list | xargs -I {} etcdctl lease timetolive --keys {} | grep "/kubernetes.io/events"
Copy link
Contributor

@tjungblu tjungblu Jan 19, 2026

Choose a reason for hiding this comment

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

any reason not to directly use that command instead of the non-event grep version above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a preferred alternative? I used what I saw in the enablement doc.

Copy link
Contributor

Choose a reason for hiding this comment

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

no I think it is a good explanation, I just wanted to save you a few more paragraphs that are not directly related to the event TTL itself.

Comment on lines 118 to 120
In the example, the TTL value is 5 minutes (`300s`), but the output shows `315s` because a lease buffer reuse of 5% is added.
+
[NOTE]
====
If a lease can be reused, etcd reuses it.
====
Copy link
Contributor

Choose a reason for hiding this comment

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

glad that you mention it, I think this will cause a lot of confusion, so we maybe want to explain a bit more how it works?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have more information somewhere about how it works? I looked at https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/pkg/storage/etcd3/lease_manager.go#L88-L120, but unfortunately, I can't link from the official docs to that site.

Copy link
Contributor

Choose a reason for hiding this comment

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

unfortunately not, I've sent you my suggestion on slack :)

@lahinson lahinson force-pushed the osdocs-17843-etcd-ttl branch 2 times, most recently from 06e7b5e to fe5f6c7 Compare January 20, 2026 19:32
@tjungblu
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 23, 2026
@lahinson lahinson force-pushed the osdocs-17843-etcd-ttl branch from fe5f6c7 to a32cb8b Compare January 23, 2026 16:32
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 23, 2026
@openshift-ci
Copy link

openshift-ci bot commented Jan 23, 2026

New changes are detected. LGTM label has been removed.

@openshift-ci
Copy link

openshift-ci bot commented Jan 23, 2026

@lahinson: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch/enterprise-4.21 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.

5 participants