feat: centralize the common config templates used by the plugins#3815
feat: centralize the common config templates used by the plugins#3815camilamacedo86 wants to merge 2 commits intooperator-framework:masterfrom camilamacedo86:commmon-base-config
Conversation
|
/hold until getting OK in the proposal operator-framework/enhancements#44 |
|
I'm pretty sure we made an explicit decision to duplicate and keep these separate, just like the upstream kubebuilder project made a decision to duplicate and keep separate templates between versions of the Go plugin. If we attempt to share, we cause problems for ourselves later. We plan to split helm and ansible into separate repos. So we'd have to:
My vote would be to close this and make it the official position of the SDK project that templates will be duplicated between plugin types for the above reasons. |
|
Hi @joelanford, Thank you for your input. Following some comments.
IMO the Kubebuilder motivations to have v2/v3 do not apply to this scenario at all. Kubebuilder motivation for we have
And then, note that v2 can be completed different of v3 which is not our case here. Now, let's think in SDK: This code is copy and past from Kubebuilder and we need to keep Kubebuilder/Helm/Ansible aligned and we have the requirements to keep all working equals which means that this code will be ought to be equals kubebuilder implementation and because of this it is pure copy/paste from KB. If we attempt to share, we cause problems for ourselves later. We plan to split helm and ansible into separate repos. So we'd have to:
No. IMO so far we ought to use these files from Kubebuilder as LIB. See that, we can remove the files centralized here and use them directly from kb if we make them public there until at least we have the plugin phase 2 in place. However, in the future, if we would like to address other needs we might need another new repo to centralize templates/plugins that cannot be the operator-lib at all since it would have another purpose as described in https://github.com/operator-framework/enhancements/pull/44/files. Have you the chance to give a look at this EP? |
KB has expressly stated on many occasions that the raw template contents will not be made public. This was actually one or our early asks. Due to the position of the Kubebuilder community on this topic, we went down the path of plugins that could encapsulate their logic. One thing I brought up 6ish months ago with the KB community is the idea of having separate plugins that manage separate parts of the project tree. So I could imagine a But I think we're pretty far off from that and there would need to be lots of discussion around it. All of which would likely be either alongside or after the phase 2 plugins work. |
|
Hi @joelanford, Since shows that it is a topic which will bring a lot of discussions, I will close this PR. Just have it is good enough to illustrate the scenario in the EP. Thank you for your input. |
Description of the change:
Motivation for the change:
Also, note that in the future we could have:
a) a base config plugin which would be used for Ansible/Helm/Hibridys and any new language type (plugin phase 2)
OR
b) this implementation centralized in an SDK Operator lib. See; operator-framework/enhancements#44
OR
c) Indeed, we can remove the full directory of the common config base and use them directly from kb if we make them public there until at least we have the plugin phase 2 in place.