DataCater / datacater

The developer-friendly ETL platform for transforming data in real-time. Based on Apache Kafka® and Kubernetes®.
https://datacater.io
Other
82 stars 4 forks source link

Feature: config reference mapping #157

Closed ChrisRousey closed 1 year ago

ChrisRousey commented 1 year ago

This PR implements configuration referencing for top-level resources to provide the users of Datacater with reusable and collaborative configurations

ChrisRousey commented 1 year ago

Thanks for the Feedback on streams. From the conversation this morning, we still have a few pain-points which need to be addressed in this PR.

ChrisRousey commented 1 year ago

We need a different way for matching objects and configs:

We will go forward by using a k8 style selector for configs and resources. Configs should have a selector label in the metadata node app.datacater.io/name and resources should refence these labels for matching.

ChrisRousey commented 1 year ago

We need more transparancy for Resources (streams, deployments) when they use config options, and a config is updated:

*streams are used as an example, this information also applies to other resources

ChrisRousey commented 1 year ago

We need to create the possibility to refence multiple configs for each resource:

*streams are used as an example, this information also applies to other resources

ChrisRousey commented 1 year ago

It is still up for discussion whether to Prioritize stream or config properties.

*streams are used as an example, this information also applies to other resources

ChrisRousey commented 1 year ago

@flippingbits @HknLof I have added some information from our discusison this morning. Feel free to add information where you see needed and don't hesitate if you see any problems/errors in the proposed approaches. Thanks 🙂

flippingbits commented 1 year ago
* As of now, we will add a versioning to configs. This means, when updating a config, we will not overwrite it but add a new config object with a newer version of the old config.

I feel that versioning is a huge topic and would increase the complexity/scope of this PR a lot. We might need it for other resources than configs as well.

Would it make sense to move the implementation of object versioning to another issue/PR or do we need it to make progress with this PR?

ChrisRousey commented 1 year ago

I feel that versioning is a huge topic and would increase the complexity/scope of this PR a lot. We might need it for other resources than configs as well.

Would it make sense to move the implementation of object versioning to another issue/PR or do we need it to make progress with this PR?

We could leave the config creation/updating as is for now without versioning, always overwrite and for now the information would go lost. Then open a new PR afterwards to implement the versioning. I don't feel like it would be more work to do it that way around. Sounds good to me 🙂

flippingbits commented 1 year ago

We could leave the config creation/updating as is for now without versioning, always overwrite and for now the information would go lost. Then open a new PR afterwards to implement the versioning. I don't feel like it would be more work to do it that way around. Sounds good to me 🙂

To be on the safe side 🤞 , can you please clarify for now the information would go lost?

ChrisRousey commented 1 year ago

To be on the safe side 🤞 , can you please clarify for now the information would go lost?

When working with streams/deployments inside this PR (and after merging until the versioning pr is finished) the exact information regarding which config was used for the creation of the given resource will not be saved anywhere.

flippingbits commented 1 year ago

When working with streams/deployments inside this PR (and after merging until the versioning pr is finished) the exact information regarding which config was used for the creation of the given resource will not be saved anywhere.

Thank you for the clarification! 👍 That is not optimal but it is something that we could - from my point of view- walk with until we have the versioning in place. In the meantime, we could add log statements that help with debugging config/stream integrations. What do you think @ChrisRousey @HknLof?

ChrisRousey commented 1 year ago

@HknLof @flippingbits Regarding the label matching:

Does this sound ok? I also have a question regarding the label naming.

ChrisRousey commented 1 year ago

@flippingbits @HknLof @olis1996

Thank you guys for your Feedback regarding the resource/config (selector-)label matching. A quick recap of my takeaways and todos:

Feel free to comment if i missed something or my explanation isn't understandable 🙂

sonarcloud[bot] commented 1 year ago

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 1 Code Smell

90.4% 90.4% Coverage
0.0% 0.0% Duplication