gitops-cert-level-2-examples icon indicating copy to clipboard operation
gitops-cert-level-2-examples copied to clipboard

from cleanup-after-sync-: cannot use generate name with apply

Open letthefireflieslive opened this issue 3 years ago • 5 comments

Encountered in Sync hook and waves exercise, last exercise

letthefireflieslive avatar Nov 22 '22 16:11 letthefireflieslive

Hello! Could you share the file throwing the error and the exercise text? You maybe miss a part asking you to add more YAML to the file and commit it (and as it is incomplete, Argo complains)

Lp-Francois avatar Nov 24 '22 08:11 Lp-Francois

https://github.com/codefresh-contrib/gitops-cert-level-2-examples/tree/6e01c3c10a02807edf8e534135cb382695469537

Yeah maybe, because if i remember it right, i tried to create the app with the auto create namespace unchecked and i just deleted the app again and recreate... i forgot how to replicate sorry

letthefireflieslive avatar Nov 24 '22 15:11 letthefireflieslive

Pretty sure it is because you were missing the hook annotation, I remember having a similar issue

with this: https://github.com/codefresh-contrib/gitops-cert-level-2-examples/blob/main/sync-hooks-waves/03-postsync-cleanup/cleanup.yml it will give you an error, but if you uncomment it should work

Lp-Francois avatar Nov 24 '22 15:11 Lp-Francois

I have it https://github.com/codefresh-contrib/gitops-cert-level-2-examples/blob/6e01c3c10a02807edf8e534135cb382695469537/sync-hooks-waves/03-postsync-cleanup/cleanup.yml

letthefireflieslive avatar Nov 24 '22 15:11 letthefireflieslive

Hello @letthefireflieslive

Your solution seems to miss the syncwave annotation. I only see the phase annotation on your file.

Anyway, I just tried the last exercise again myself and I don't see any errors See attached screenshot

The expected solution is actually provided in the same repo :-)

https://github.com/codefresh-contrib/gitops-cert-level-2-examples/tree/main/solutions/sync-hooks-waves/06-waves-and-hooks

solution

everything-syncs

kostis-codefresh avatar Oct 16 '23 14:10 kostis-codefresh