-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Provide Example For Local Rendering of argocd-example-apps #11722
Comments
To render manifests, the CLI needs to know things about the application (e.g. build parameters). To retrieve that information, it needs to connect to the server. |
Hi! No problem for me to be logged on the server to be able to render the manifests or diff list. Running Running Using the pull request revision Can you think of any way to make a diff if your application list is modified by your local modifications? |
The answer to my questions above could be here: #10895 |
@crenshaw-dev we are in a similar to @samba2 's situation and let me provide a use case: An The rationale is simple: to keep feedback loops as short as possible to be able to quickly fix the code in question. In absence of "dry-run" mode in argo cli the workaround is to parse |
@nrvnrvn This is precisely what we want to achieve. We have meanwhile a huge code base containing of internal and external argoapps which are backed by either customize or helm. Currently our PR just shows the changes made to e.g. helm values values or changes in the template coding. However - it does not show the rendered end result (the manifests) which Argo would try to apply eventually. What we like to to: locally render out the manifests of the current branch and compare the result with rendering on main. The diff will be attached to the PR so that the reviewer actually sees what changing this little boolean flag in the values file actually causes. Like @nrvnrvn our current approach would be to parse the argo files and then run customize or helm resp. |
Same here, and as ChatGPT proposed too (!), it should be possible as with helm to call something like |
We have the a similar use case as @nrvnrvn. We maintain our argo manifests in varying repos for prod, dev, uat. The helm charts are maintained in yet another repo. When developers make changes to the helm chart we want to validate/lint all the various overrides used for each environment (as expressed in the argo manifests) to ensure there will be no problems. Rationale again is to keep feedback loop as short as possible and minimize churn of the repos if issues do arise and have to be fixed. A workaround for us right now is to fetch the argo manifests, parse the various overrides referenced in it, and then run the equivalent helm install dry-run or helm template command with those overrides to get the rendered resources which we pass to Would be nice to have a single argo cd call where we override the version of the helm chart and potentially the chart url to get the render from an existing argo manifest. |
As an 80% temporary solution until this gets implemented, I think For Helm, one would need to read in the I'm thinking something along the lines of this Python implementation: import yaml
class AppSet:
def __init__(self, appset_yaml):
with open(appset_yaml, "r") as file:
self.yaml = yaml.safe_load(file)
def get_git_generators(self):
result = []
i = 0
for e in self.yaml["spec"]["generators"]:
for k, v in e.items():
if k == "git":
entry = {}
entry["files"] = v["files"]
entry["revision"] = v["revision"]
entry["repoURL"] = v["repoURL"]
try:
sources = v["template"]["spec"]["sources"]
for source in sources:
if "helm" in source.keys():
entry["valueFiles"] = source["helm"]["valueFiles"]
elif "ref" in source.keys():
entry["reference"] = {}
entry["reference"]["ref"] = source["ref"]
entry["reference"]["repoURL"] = source["repoURL"]
result.append(entry)
except Exception as e:
print(f"⏩Skipping no matching keys git generator number {i}")
pass
i += 1
return result |
Came here after initially looking here and being surprised there weren't more / better options. I've been able to do this relatively easily when I've used Flux + Kustomize in the past. IMO, it's really critical to be able to render / validate configs in CI, for all the reasons mentioned above. I will see if I can play with the workaround above, and / or kludge something together with jq and shell, but would love to see this functionality (and documentation) exist. |
We have a rather large ArgoCd installation with frequent changes in our Helm charts.
To debug + and study the potential manifests, I am looking for an option to locally render not only Helm charts but a full Argo app. As simple start, I used the
argocd-example-apps
.Here is the command I tried:
cd argocd-example-apps/ argocd app manifests helm-guestbook --local apps FATA[0000] Argo CD server address unspecified
I was hoping to get a long list of K8s manifests which Argo would (if running remote) apply to K8s.
Two questions ?
Thank you!
The text was updated successfully, but these errors were encountered: