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

fix multinamespace cache issue #132

Merged
merged 3 commits into from
Feb 10, 2024
Merged

fix multinamespace cache issue #132

merged 3 commits into from
Feb 10, 2024

Conversation

AdheipSingh
Copy link
Contributor

@AdheipSingh AdheipSingh commented Feb 9, 2024

Fixes #XXXX.

@itamar-marom can you help in reviewing this one.

Description

adheipsingh@Adheips-Air ~ % k logs -f cluster-druid-operator-6c7b966548-rj58x  -n druid-operator-system -c manager
2024-02-09T15:24:02Z	ERROR	setup	unable to start manager	{"error": "must specify more than one namespace to use multi-namespace cache"}
main.main
	/workspace/main.go:93
runtime.main
	/usr/local/go/src/runtime/proc.go:250
  • This issue arises when we have both Namespace and NewCache enabled for a single namespace to watch.
  • This PR add a check in watchNamespaceCache() to built cache only if multiple namespace are found, so runtime can default to watch namespace for single and NO namespace specified to watch.

This PR has:

  • been tested on a real K8S cluster to ensure creation of a brand new Druid cluster works.
  • been tested for backward compatibility on a real K*S cluster by applying the changes introduced here on an existing Druid cluster. If there are any backward incompatible changes then they have been noted in the PR description.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

Key changed/added files in this PR
  • MyFoo
  • OurBar
  • TheirBaz

@AdheipSingh AdheipSingh self-assigned this Feb 9, 2024
@AdheipSingh AdheipSingh merged commit e14887d into master Feb 10, 2024
1 check failed
@AdheipSingh AdheipSingh deleted the cache branch February 10, 2024 07:44
@AdheipSingh AdheipSingh changed the title fix multinamespace cache isue fix multinamespace cache issue Feb 12, 2024
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.

2 participants