-
Notifications
You must be signed in to change notification settings - Fork 6
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
feature request: dynamic stacks discovery / wildcard paths #23
Comments
Yes that's a nice feature to have and I was planning to do something similar soon |
Hi there, I'm in the process of designing a solution for this issue, at least the wildcard-based part. This is what I have in mind
There are some changes to be done in the architecture, though:
Any thoughts? |
I like your approach.
Yeah this would actually be much more efficient. We can also improve threading and have more stacks updated in parallel cuz currently stacks of the same repo are locked using a mutex to prevent git inconsistencies. But if we do this we might need to checkout different branches of the same repo in different directories, maybe we can reuse shallow clone in this case to reduce space, we won't have to worry about #33 because each git directory will be used for a single branch.
This would work but I think we better keep a list of stacks object anyway. The UI for example needs an object that contains the state of all stacks, so to keep this object updated we might need the list. We might also add more features in the future that could make use of this list
This is similar to application pruning in ArgoCD. It can be useful and dangerous at the same time so maybe we can make it an optional behaviour. ArgoCD stores its applications as kubernetes objects so it doesn't need a special storage, so it might be more complicated in our case, especially if we need the state of stacks to be persistent if something happens to SwarmCD. I think we should have this in a separate issue/PR. |
Just to add my two cents, not sure if I understood everything correctly, maybe you already mentioned this: The naming for the compose files should not be fixed. For example, I have a folder |
Hi @kevinholtkamp, Not much time to work on it right now, though 😅 |
@sanzoghenzo thanks for your reply! I would love to help, but unfortunately I am not familiar with Go :( If there is any way I could help (e.g. Testing) let me know though! |
To avoid having to fiddle with SwarmCD configuration every time a new stack needs to be added, I wish to use something similar (but much simpler/simplistic) to what Argo CD provides via ApplicationSet.
My use case would be to have a single repository with multiple folders, one for each stack, and let SwarmCD detect new folders that matches a pattern, for example
stacks/**/docker-compose.yaml
or a more regex-questacks/.*/docker-compose.yaml
.Another approach could be a to mimic something like Argo CD "Application of Applications" pattern: be able to specify a
stacks_file
, instead ofcompose_file
, inside the stacks config, to point to another stacks configuration file that would then be merged (recursively).The text was updated successfully, but these errors were encountered: