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

InformerEventSource should have both SecondaryToPrimary and PrimaryToSecondary mappers #18

Closed
katheris opened this issue Jan 20, 2023 · 2 comments

Comments

@katheris
Copy link
Contributor

According to the Java operator SDK docs, if the mapping between a primary and secondary resource is not 1-1 then when the event source is created it needs to have both a SecondaryToPrimary and PrimaryToSecondary mapper.

Since more than one different KafkaAccess CR could reference the same Kafka CR, for all of the resources that are related to the Kafka CR (e.g. the Kafka CR, KafkaUser CR, Secrets etc), when we define the event sources we need both types of mapper. Currently for most we only provider a SecondaryToPrimary mapper.

We should add PrimaryToSecondary mappers for the kafkaEventSource and strimziSecretEventSource.

References:

katheris added a commit to katheris/kafka-access-operator that referenced this issue Aug 2, 2023
Contributes to strimzi#18

Signed-off-by: Katherine Stanley <[email protected]>
@katheris
Copy link
Contributor Author

katheris commented Aug 7, 2023

Update: This is only required if the function context.getSecondaryResource is called, otherwise it is not required. This means with the current operator this is only required for the Kafka Access secret event source. However if we upgrade to the latest JOSDK version the secret can be handled as a dependent resource and we will likely not need it at all.

@katheris
Copy link
Contributor Author

katheris commented Sep 1, 2023

As part of #30 we added a PrimaryToSecondary mapper for Kafka. Since for all other resources we are using the event source directly I do not think we need to create any other PrimaryToSecondary mappers at the moment.

Closing this issue and we can open a new one if this changes.

@katheris katheris closed this as completed Sep 1, 2023
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

No branches or pull requests

1 participant