Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return an emulated etcd version in the status endpoint #316

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

sambhav
Copy link
Contributor

@sambhav sambhav commented Aug 21, 2024

Fixes #315

See /~https://github.com/kubernetes/kubernetes/blob/beb696c2c9467dbc44cbaf35c5a4a3daf0321db3/staging/src/k8s.io/apiserver/pkg/storage/feature/feature_support_checker.go#L157

Which expects that the etcd status endpoint return a version. This returns a default version allowing users to override it if necessary.

@sambhav sambhav requested a review from a team as a code owner August 21, 2024 12:01
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
Copy link
Member

@brandond brandond left a comment

Choose a reason for hiding this comment

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

LGTM, with a few nits

An additional question: if we fix the version reporting, Kubernetes will try to use watch progress notifications. However, Kubernetes also requires you to set the --experimental-watch-progress-notify-interval=5s (instead of the default of 10m) when using watch progress notifications. This is also true when using kine; it has the same default value for the --watch-progress-notify-interval flag as upstream etcd.

Would you mind modifying the markdown files in the examples folder to call this out, and show the flag being set?

pkg/server/server.go Outdated Show resolved Hide resolved
pkg/server/server.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
@sambhav
Copy link
Contributor Author

sambhav commented Aug 21, 2024

@brandond would you be open to changing the default value to 5s?

@brandond
Copy link
Member

Yeah, I can't see how it would hurt anything. K3s already sets it to 5 seconds, for both etcd and kine, so that things work right. I'm kinda curious why etcd didn't change the default as well, given that kubernetes will behave oddly if you don't.

…upport

Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
@sambhav
Copy link
Contributor Author

sambhav commented Aug 21, 2024

@brandond all comments should be addressed. Could you also release a new version with these changes once the PR is merged?

@sambhav sambhav requested a review from brandond August 21, 2024 19:58
@sambhav
Copy link
Contributor Author

sambhav commented Aug 21, 2024

Note, I also added the following comment kubernetes/kubernetes#122805 (comment)

@brandond brandond merged commit 227f4d3 into k3s-io:master Aug 21, 2024
3 checks passed
@sambhav sambhav deleted the status branch August 21, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Kubernetes 1.31
2 participants