Closed kriko closed 8 months ago
This is by design as namespaces are independent and are not meant to share code by default.
Changed the label to enhancement as this is a feature request. Thanks for the issue!
This is by design as namespaces are independent and are not meant to share code by default.
Changed the label to enhancement as this is a feature request. Thanks for the issue!
If namespaces, including child namespaces should be independent, then git.Sync should not deploy to child namespaces either. Thus the current functionality might be a bit confusing.
However the current behaviour for child namespaces is preferred, because then it would be easy to set up GitOps flows to the root namespace (the parent of the children), have that flow syncing that root namespace and all children (and grandchildren) namespaces - so no additional flows would be necessary.
definitely more convenient and intuitive that way, I agree
This looks like a scary feature so maybe we should add some boolean property for it as one could want not to manage children namespaces but I understand the point.
The deploy to children namespaces was done for convenience purpose when promoting one environment to the other and it looked non-destructive and unharmful as users who want could deploy children namespaces but ones who don't want would not do anything to children namespaces.
@anna-geller this definitely needs to be discussed or taken with warnings as I believe it could ruin a lot of users
@brian-mulier-p , having an additional boolean property would be okay and maybe necessary to make it explicitly clear how git.Sync behaves.
However, the current behaviour is inconsistent - git.Sync for the direct namespace will overwrite, delete, create flows; but for child namespaces, it only creates or overwrites. This behaviour can lead to orphan flows.
The general idea is not to have too many syncing flows, but one per parent namespace which would handle the sync for all child namespaces as well.
The issue will be addressed in the new task PushFlows 🎉 You can follow the progress and updates here https://github.com/kestra-io/plugin-git/issues/56
Expected Behavior
Running io.kestra.plugin.git.Sync in a parent namespace should sync all flows from Git to Kestra, overwriting any changes in Kestra, adding new flows and removing any flows in Kestra that are not present in the Git repository.
This seems to work for the namespace where git.Sync is run, however it does not apply directly to child (sub) namespaces.
Actual Behaviour
Kestra namespace structure: ns: test ns: test.child ns: test.child.grandchild
When running git.Sync from ns "test" then:
Steps To Reproduce
No response
Environment Information
Example flow
No response