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

[CN-1259] Fix Failed to watch *v1.Node: unknown (get nodes) #1115

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

cagric0
Copy link
Contributor

@cagric0 cagric0 commented Apr 25, 2024

Here is the error seen in the operator log:
E0425 15:01:06.189842 34 reflector.go:147] pkg/mod/k8s.io/client-go@v0.28.3/tools/cache/reflector.go:229: Failed to watch *v1.Node: unknown (get nodes)

@cagric0 cagric0 added the fix This type is used to identify changes related to backward-compatible bug fixes label Apr 25, 2024
@cagric0 cagric0 added this to the 5.12.0 milestone Apr 25, 2024
@cagric0 cagric0 requested a review from a team as a code owner April 25, 2024 15:56
@cagric0 cagric0 requested review from SeriyBg and semihbkgr and removed request for a team April 25, 2024 15:56
@@ -126,6 +126,7 @@ Rules needed for giving Hazelcast node read permissions
verbs:
- get
- list
- watch
Copy link
Member

Choose a reason for hiding this comment

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

Do you know why it was removed previously, or was it never added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know actually let me check. And also I couldn't find why the operator is watching nodes but this additional permission fixes the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

get was there for a long time more than 1 year but list is added with this PR #966. I think this watch error started with the same PR.
I found this issue in the controller-runtime repo:
kubernetes-sigs/controller-runtime#1156
It seems get or list requires watch permission unless you have a non-caching client.

Copy link

✅ All tests have passed

Total Tests 🔴 Failures 🟠 Errors ⚪ Skipped
OS 119 0 0 82
EE 119 0 0 61
Failed Tests
OS
EE

@hasancelik hasancelik changed the title Fix Failed to watch *v1.Node: unknown (get nodes) [CN-1259] Fix Failed to watch *v1.Node: unknown (get nodes) Apr 26, 2024
@cagric0 cagric0 merged commit 33ae3e5 into main Apr 30, 2024
48 checks passed
@cagric0 cagric0 deleted the fix-failed-to-watch-node-error branch April 30, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix This type is used to identify changes related to backward-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants