Is there a way to have a global variable used for Application's spec.source.repoURL? #19425
-
Considering we have many Unless I missed something in the documentation, I don't think it's possible for now, right? That is, instead of having a few apps declared like this: apiVersion: argoproj.io/v1alpha1
kind: Application
...
spec:
source:
repoURL: https://github.com/myorg/project1.git
---
apiVersion: argoproj.io/v1alpha1
kind: Application
...
spec:
source:
repoURL: https://github.com/myorg/project2.git We would have the following and apiVersion: argoproj.io/v1alpha1
kind: Application
...
spec:
source:
repoURL: $MY_ORG_SERVER/project1.git
---
apiVersion: argoproj.io/v1alpha1
kind: Application
...
spec:
source:
repoURL: $MY_ORG_SERVER/project2.git The use case for this is to ease migration from one server to another (think GitHub to GitLab for instance) without having to change all Ideally, this would also apply to other places where the server is referenced like in |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
No such mechanism exists. I'd recommend managing your Application manifests via GitOps so that an update is a simple find/replace. If you can't GitOps the manifests, you could wrap the Application CRD in your own MyOrgApplication CRD and use a controller to inject whatever values you like. |
Beta Was this translation helpful? Give feedback.
-
@gaeljw a work around that I used is using the |
Beta Was this translation helpful? Give feedback.
No such mechanism exists.
I'd recommend managing your Application manifests via GitOps so that an update is a simple find/replace.
If you can't GitOps the manifests, you could wrap the Application CRD in your own MyOrgApplication CRD and use a controller to inject whatever values you like.