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

improve: dependent configuration improvements - context independent #2389

Merged
merged 6 commits into from
Jun 19, 2024

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented May 20, 2024

No description provided.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 20, 2024
@csviri csviri changed the title Independent config improve: dependent configuration improvements - context independent May 20, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 21, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 22, 2024
@csviri csviri marked this pull request as ready for review May 23, 2024 13:33
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 23, 2024
@csviri csviri requested a review from metacosm May 27, 2024 13:29
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 17, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 17, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 18, 2024
Signed-off-by: Attila Mészáros <csviri@gmail.com>
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 18, 2024
Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
if (kubernetesDependentResourceConfig != null
&& kubernetesDependentResourceConfig.informerConfig() != null) {

var configBuilder = informerConfigurationBuilder(context);
kubernetesDependentResourceConfig.informerConfig().updateInformerConfigBuilder(configBuilder);
Copy link
Collaborator Author

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) {
Copy link
Collaborator

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.

Copy link
Collaborator Author

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() {
Copy link
Collaborator

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?

Copy link
Collaborator Author

@csviri csviri Jun 19, 2024

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>
@csviri csviri merged commit 43fc4b1 into next Jun 19, 2024
20 checks passed
@csviri csviri deleted the independent-config branch June 19, 2024 20:03
metacosm added a commit that referenced this pull request Jul 8, 2024
…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>
metacosm added a commit that referenced this pull request Jul 9, 2024
…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>
metacosm added a commit that referenced this pull request Jul 12, 2024
…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>
csviri added a commit that referenced this pull request Aug 8, 2024
…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>
csviri added a commit that referenced this pull request Aug 15, 2024
…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>
metacosm added a commit that referenced this pull request Aug 29, 2024
…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>
csviri added a commit that referenced this pull request Sep 20, 2024
…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>
metacosm added a commit that referenced this pull request Oct 10, 2024
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants