Two same dependent resources in different namespaces #1969
AleksanderBrzozowski
started this conversation in
General
Replies: 1 comment 1 reply
-
This seems to me just a reconcilePrecondition for a standard dependent, no need for a bulk dependent.
Did you check this one in the docs: https://javaoperatorsdk.io/docs/dependent-resources#multiple-dependent-resources-of-same-type that part thould cover this use case as far I can see. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I wanted to ask what is the correct way to implement two dependent resources in different namespaces.
We want to create one dependent resource in primary namespace and a second dependent resource in
istio-system
namespace.Furthermore, we use
BulkDependentResource
interface to be able to create 0 or 1 resources based on the config in primary resource.here are code snippets:
And here is the second dependent resource, it is very similar, but it doesn't specify
namespaces
insideKubernetesDependent
annotation, and thegetSecondaryResources
method is slightly different:The question is if these filter methods are necessary here, or if there is another way to do this:
The problem is that these both resources use two event sources - EnvoyFilter for
istio-system
namespace and EnvoyFilter for primary resource namespace. As a result, this method:context.getSecondaryResources(EnvoyFilter::class.java)
returns resources from both namespaces.Beta Was this translation helpful? Give feedback.
All reactions