feat: Allow users to template and render Application's resources fully locally#14365
feat: Allow users to template and render Application's resources fully locally#14365Sergey-Kizimov wants to merge 5 commits intoargoproj:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14365 +/- ##
==========================================
- Coverage 49.90% 49.83% -0.07%
==========================================
Files 262 262
Lines 45129 45192 +63
==========================================
Hits 22523 22523
- Misses 20391 20454 +63
Partials 2215 2215 ☔ View full report in Codecov by Sentry. |
3e7c83d to
b401302
Compare
| } | ||
| if appName != "" && appName != app.Name { | ||
| app.Name = appName | ||
| filteredApps := make([]*argoappv1.Application, 0) |
There was a problem hiding this comment.
Now we can filter by application name from 1 file with multiple applications
b1b4e8a to
5f68918
Compare
Signed-off-by: Sergey-Kizimov <sergey.kizimov@hiya.com>
Signed-off-by: Sergey-Kizimov <sergey.kizimov@hiya.com>
Signed-off-by: Sergey-Kizimov <sergey.kizimov@hiya.com>
Signed-off-by: Sergey-Kizimov <sergey.kizimov@hiya.com>
Signed-off-by: Sergey-Kizimov <sergey.kizimov@hiya.com>
5f68918 to
2dfff9a
Compare
|
Is there any plan to merge this? |
|
Can we merge this? |
| appName = args[0] | ||
| } | ||
|
|
||
| if appName == app.Name { |
There was a problem hiding this comment.
Why do we need a separate filterByAppName?
There was a problem hiding this comment.
I think in case the file given as --local-app-manifest contains multiple YAML documents.
|
Again the question is: Is there any plan to merge this? I would be very happy about the addition of this feature. |
|
Since this is a command that should run 100% locally, it is a very good candidate to use with the new cli-plugin feature Many parameters in the config map can affect the application generation. The constraint to not have access to these config will need to be resolved by either providing them as arguments, or as a configFile. I will close this PR, but let the issue open. |
|
@agaudreault Correct me if I'm wrong, but my understanding was that we intended to use ArgoCD's internal flow for rendering manifests. If we use a plugin, we would need to replicate that flow, which essentially means re-implementing core ArgoCD functionality. Is that correct? |
|
@pkalemba you can write a go application that will reuse the argo libraries |
This PR is an attempt to make the
argocd app manifestscommand run completely local, a pre-rendered file with app objects is required for correct operation.I hope, this PR should close #11129
example command run:
argocd app manifests my-app-name --local-app-manifest /repo/my-app/application/my-app.yaml --local /repo/my-app/manifests --local-repo-root /repo/my-appChecklist:
Please see Contribution FAQs if you have questions about your pull-request.