-
Notifications
You must be signed in to change notification settings - Fork 215
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
improve: dependent configuration improvements - context independent #2389
Conversation
41e50b1
to
5b6a3dd
Compare
...o/javaoperatorsdk/operator/processing/dependent/kubernetes/KubernetesDependentConverter.java
Outdated
Show resolved
Hide resolved
a04f49c
to
8bd6a2e
Compare
8bd6a2e
to
272449b
Compare
02a1158
to
3e275b7
Compare
8d88356
to
20a12e2
Compare
Signed-off-by: Attila Mészáros <csviri@gmail.com>
20a12e2
to
f7497ff
Compare
Signed-off-by: Attila Mészáros <csviri@gmail.com>
ead1f2e
to
bd18204
Compare
Signed-off-by: Chris Laprun <claprun@redhat.com>
if (kubernetesDependentResourceConfig != null | ||
&& kubernetesDependentResourceConfig.informerConfig() != null) { | ||
|
||
var configBuilder = informerConfigurationBuilder(context); | ||
kubernetesDependentResourceConfig.informerConfig().updateInformerConfigBuilder(configBuilder); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this is not good this way since overrides the name even if it is null in the informer config
@@ -111,11 +111,12 @@ static Set<String> ensureValidNamespaces(Collection<String> namespaces) { | |||
* | |||
* @return a Set of namespace names the associated controller will watch | |||
*/ | |||
default Set<String> getEffectiveNamespaces(ConfigurationService configurationService) { | |||
default Set<String> getEffectiveNamespaces(ControllerConfiguration<?> controllerConfiguration) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really isn't ideal: an interface should not reference one of its children in its API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but this is just an utility method effectively. I think the problem is more about that ControllerConfiguraiton
extends ResourceConfiguration
, since Controller is not really a resource resource. It should rather reference a resource configuration (the primary resource), but not sure if we want to change that at this point.
Maybe in a different PR we can take a look on this.
return name; | ||
} | ||
|
||
public boolean inheritsNamespacesFromController() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this new method? What's the difference with followControllerNamespaceChanges
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The follow follows changes if controller namespaces changes dynamically in runtime, the inherit is about the initial value, if the name is confusing we can change it.
Signed-off-by: Chris Laprun <claprun@redhat.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
…2389) Signed-off-by: Attila Mészáros <csviri@gmail.com> Signed-off-by: Chris Laprun <claprun@redhat.com> Co-authored-by: Chris Laprun <claprun@redhat.com>
…2389) Signed-off-by: Attila Mészáros <csviri@gmail.com> Signed-off-by: Chris Laprun <claprun@redhat.com> Co-authored-by: Chris Laprun <claprun@redhat.com>
…2389) Signed-off-by: Attila Mészáros <csviri@gmail.com> Signed-off-by: Chris Laprun <claprun@redhat.com> Co-authored-by: Chris Laprun <claprun@redhat.com>
…2389) Signed-off-by: Attila Mészáros <csviri@gmail.com> Signed-off-by: Chris Laprun <claprun@redhat.com> Co-authored-by: Chris Laprun <claprun@redhat.com>
…2389) Signed-off-by: Attila Mészáros <csviri@gmail.com> Signed-off-by: Chris Laprun <claprun@redhat.com> Co-authored-by: Chris Laprun <claprun@redhat.com>
…2389) Signed-off-by: Attila Mészáros <csviri@gmail.com> Signed-off-by: Chris Laprun <claprun@redhat.com> Co-authored-by: Chris Laprun <claprun@redhat.com>
…2389) Signed-off-by: Attila Mészáros <csviri@gmail.com> Signed-off-by: Chris Laprun <claprun@redhat.com> Co-authored-by: Chris Laprun <claprun@redhat.com>
…2389) Signed-off-by: Attila Mészáros <csviri@gmail.com> Signed-off-by: Chris Laprun <claprun@redhat.com> Co-authored-by: Chris Laprun <claprun@redhat.com>
No description provided.