Specify multiple stage in kargo.akuity.io/authorized-stage: #4348
Replies: 3 comments 6 replies
-
I'm not quite following your setup, but it probably doesn't matter too much... This has been discussed many times before, however, the request has usually been to support globs or regex. Those we cannot do on security grounds. This annotation is the only way we have for an Application to express "consent" to be modified by Kargo. The annotation would have to have been placed there by someone with proper permissions to create/update the Application, so its existence is that user's consent to delegate that permission to a particular Kargo Stage. The problem with globs or patterns is that it would allow for anyone who is able to create new Stages to create one with a name specifically engineered to allow unauthorized mutation of the Application by that Stage. This has been discussed as recently as lastnight. The request for "multiple Stages," however, assuming they're simply comma-delimited or something, with no support for globs or patterns seems safe. We could at least entertain that, however, a potentially superior solution has just occurred to me... In the vast, vast majority of cases, the I'm cautiously proposing now that it would be safe enough to allow forced syncing but no other mutations without any annotation/consent required. I can think of very limited harm that could arise from (anyone, essentially) requesting an Application to do nothing more than (re)-progress toward its existing understanding of desired state. cc @hiddeco and @jessesuen in case they see vulnerabilities here that I do not. If we were able to do this, it would solve a lot of problems for a lot of people. |
Beta Was this translation helpful? Give feedback.
-
Hi @krancour, Thanks for your reply!
I use Kargo solely to detect new image deployments, update the image tag, and trigger an ArgoCD app refresh.
However, in cases like WordPress apps that all use the same image, I want to avoid duplicating warehouses and configs for each app. So instead:
Because this is a shared stage, I can’t dynamically set the stage via annotations using ApplicationSet like I can for app-specific stages.
Anyway, This approach is common in many Kubernetes tools and configuration systems where multiple values are provided explicitly, and it seems like a natural extension for Kargo. For example, apps like cert-manager or NGINX ingress-controller often use annotations with comma-separated lists to configure multiple values safely and explicitly. |
Beta Was this translation helpful? Give feedback.
-
Closing this and continuing the conversation in #4570. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Kargo Community,
I'm new to Kargo and currently setting up a pipeline to manage image promotions for all my applications.
I have many apps deployed using ArgoCD, and I use an ApplicationSet with the Git directory generator to create one Application per app.
Some of these apps are very similar — for example, they use the same base image (e.g., httpd) but serve different content by mounting different volumes. To support this, I've configured Kargo to update both the tag and digest and to restart all applications that use the same image.
Because I use a monorepo, some applications share the same image and others do not:
Here’s where I’m running into trouble:
To allow Kargo to sync an ArgoCD app, I need to add the annotation
kargo.akuity.io/authorized-stage: <project-name>:<stage-name>
. Since I’m generating my apps via ApplicationSet, I wanted to dynamically set the annotation using something like:{{app.path[1]}}
corresponds to the namespace.{{app.path[2]}}
is the app name.This works well for apps with their own Stage. However, for apps that share a common image, they all rely on a single Stage with a generic name (e.g., httpd-stage). Because I use a single ApplicationSet for all apps, I’d prefer to support multiple authorized stages in a single annotation. For example:
My question is:
Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions