Skip to content

fix: do not change namespaces if they were manually set #1734

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

Merged
merged 3 commits into from
Feb 27, 2023
Merged

Conversation

metacosm
Copy link
Collaborator

No description provided.

@metacosm metacosm self-assigned this Jan 25, 2023
@metacosm metacosm requested a review from csviri January 25, 2023 10:47
Copy link
Collaborator

@csviri csviri left a comment

Choose a reason for hiding this comment

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

I'm not getting this, KubernetesDependentResourceConfig should no be namespace changeable, why is that? namespace changeable should only apply for informers

@metacosm
Copy link
Collaborator Author

This was needed at some point: https://github.com/java-operator-sdk/java-operator-sdk/pull/1554/files#diff-6fca1d1644dadba71e06623b843eff387374279a921562c0ea6532d98b53d820R181-R193
A similar problem occurs in the Quarkus extension actually: namespaces can be set on the controller configuration at different times during the build process (i.e. before this even gets to the point where users can do anything) and, if the namespaces haven't been set explicitly on the @KubernetesDependent annotation, it might be needed to propagate namespace changes that occur during the runtime phase of the configuration process to the dependent config because they might have recorded a now obsolete version of the namespaces during an earlier phase. We could probably remove the NamespaceChangeable interface from KubernetesDependentResourceConfig now, though. Still need to be able to change the namespaces in certain situations, though.

@csviri
Copy link
Collaborator

csviri commented Jan 25, 2023

Ok, somehow I have I feeling its a bit too complex with these configs.
But I guess this is just setting not really changing in the runtime sense. So would remove that, since it's quite confusing there.

@csviri
Copy link
Collaborator

csviri commented Jan 25, 2023

Might be a different PR though, so will accept this one, and it's up to you.

@metacosm metacosm force-pushed the expose-ns branch 2 times, most recently from 0069a01 to 552050a Compare February 23, 2023 13:22
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

38.6% 38.6% Coverage
0.0% 0.0% Duplication

@csviri csviri self-requested a review February 27, 2023 13:23
@metacosm metacosm merged commit 22ea662 into next Feb 27, 2023
@metacosm metacosm deleted the expose-ns branch February 27, 2023 14:16
csviri pushed a commit that referenced this pull request Feb 28, 2023
Also remove unneeded implementation of NamespaceChangeable
csviri pushed a commit that referenced this pull request Mar 3, 2023
Also remove unneeded implementation of NamespaceChangeable
csviri pushed a commit that referenced this pull request Mar 10, 2023
Also remove unneeded implementation of NamespaceChangeable
csviri pushed a commit that referenced this pull request Mar 14, 2023
Also remove unneeded implementation of NamespaceChangeable
csviri pushed a commit that referenced this pull request Mar 15, 2023
Also remove unneeded implementation of NamespaceChangeable
metacosm added a commit that referenced this pull request Mar 22, 2023
Also remove unneeded implementation of NamespaceChangeable
metacosm added a commit that referenced this pull request Mar 27, 2023
Also remove unneeded implementation of NamespaceChangeable
csviri pushed a commit that referenced this pull request Mar 27, 2023
Also remove unneeded implementation of NamespaceChangeable
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