-
Notifications
You must be signed in to change notification settings - Fork 166
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
Multiple values for kargo.akuity.io/authorized-stage:<name> annotation #2971
Comments
For more information, there has been some discussion on all of this on the discord server today. https://discord.com/channels/1138942074998235187/1138946346217394407/1308824098469580843 |
This used to be allowed, actually, but was removed for two separate reasons:
So with all this being said, putting the wildcard support back isn't a decision we should rush into or take lightly. But there is good news.
Last, but not least, returning to your original issue:
This seems odd. I often think of promotion processes as "mashing up" the multiple artifacts into a piece of Freight to arrive at some new state. Why would the recipe for the new state be different if A is the new artifact vs B vs C? I call this out not because I think you're doing anything objectively wrong, but as I've never seen something like that before, it's natural to wonder if there wasn't a simpler option that was overlooked, in which case, we'd be happy to try and give some further guidance. |
This is indeed the precise issue. With a wild card, any Application could and/or would be mapped to any Stages of any Projects without there necessarily being a relationship. As you do not want to request an unnecessary reconciliation for all of these objects, it would require even deeper inspection and special treatment of the Having an exact 1:1 mapping was the easiest solution to prevent this, as it is simple and explicit. |
Thanks @hiddeco. Although it's not the exact ask here, I do remain optimistic that we are trending toward resolving the issues that would make someone want to manage one App with multiple Stages in the first place. |
@krancour and @hiddeco, thank you both for the explanation on why wildcards are a no go. I totally get where the problem with that approach lies. What about making that annotation a list instead of a value? That would allow for the tighter and explicit coupling while also allowing for more flexibility? Is it something that could be considered? I am really looking forward to v1.1 and beyond. I think Kargo has SO much potential I am making it the center of our new deployment strategy. Part of that is figuring out how to group the various pipelines into projects so that a user doesn't have to jump around too much. With any system that is broken up into microservices, deployment can be a dance and I want thinks that go together to be presented together.
Its not that the presentation is different. What ArgoCD needs to see is all the same as the values file brings together are being updated by kargo. What needs to happen is that the changes need to be merged from develop to main in the correct repository. For any given repository we are creating the artifact when it gets merged to develop. That artifact then automatically gets deployed (via kargo) to the dev environment. At some point we have collected a set of changes into an artifact and we promote that to QA and later staging so that we can validate those changes. All those promotions are done via kargo but the code changes are still on the develop branch. Its when we move to prod that we want to create a release branch from develop to main so that we can add any documentation or metadata, review, and deploy to prod when we merge to main. So if the freight has multiple artifacts from multiple repositories, there is no way for the kargo promotion strategy to know which repository needs the PR from develop to main. My only other option would be to have a separate warehouse for each container repository where I might want that PR. Because kargo stages are one to one with ArgoCD applications, It also means I need a separate ArgoCD application for each container even if they use the same helm chart. My current solution looks like this: I believe this will work for now but its more complicated then it needs to be. If you still have questions or might find it useful let me know and we can get on a video call sometime and walk through it. |
Checklist
kargo version
, if applicable.Kargo v1.0.3
Proposed Feature
We should be able to specify multiple values in the kargo.akuity.io/authorized-stage: annotation so that multiple stages can trigger an ArgoCD update for the same Argo application.
Motivation
Some of our microservices is essentially made of of three (or more) things that need to be coordinated, a helm chart, a service container, and a microfrontend container. Today I have kargo project configured to assemble freight for these three things.
The problem with this approach is that later in my pipeline I need to create a release PR on the github repo associated with the artifact that is the source of the update. Kargo doesn't have any logic to say If this update is from subscription A use repoURL A, if from subscription B use repoURL B. So I don't have a way to create the PR in the correct repo.
I could however set the project up to have two separate warehouses with two separate pipelines. This approach actually might have a number of benefits but mostly it would allow me to create the PR in the correct repo.
The problem with the approach that there are two stages for each environment. This is ONLY a problem because they both need to tell ArgoCD to sync the same application. If I could have multiple values for kargo.akuity.io/authorized-stage: I would be able to make this work.
Suggested Implementation
I can think of a few possibilities:
If you ask me, I think the second option makes the most sense and is probably the easiest to implement.
The text was updated successfully, but these errors were encountered: