resource
template merge
& strategic
patch error about using both -f
and -p
#13279
-
Hello, argo-workflows/workflow/executor/resource.go Line 137 in 06da23e the However, just a few lines down: argo-workflows/workflow/executor/resource.go Line 144 in 06da23e the -p is still added along with the -f flag later on, inevitably causing the "patch" action to be broken.
For instance, when you try to use patch action with resource something like this example: https://github.com/argoproj/argo-workflows/blob/main/examples/k8s-patch.yaml - (my use-case is with ConfigMap) the engine parses it into a
which will give an error:
Is this the intended behavior and am I simply misunderstanding something here? It seems that the only option to prevent this issue is to use the Thanks and clarification is appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
It looks like someone else made a PR to attempt to change this, but they realized it was incorrect: #11249 (comment):
|
Beta Was this translation helpful? Give feedback.
Fixed in #13317.
This discussion also effectively ends up as a duplicate of the now fixed #11248
More details:
--patch-file
universally doesn't quite work and has the same problem as-p
.When a full manifest is given, effectively both
-f
and--patch-file
are needed, pointing to the same manifest.-f
gets thekind
andname
from the manifest (the "header") and--patch-file
uses the manifest as a patch file.So I instead used the strategy I outlined above to infer a "full" manifest with a header by inspecting if it has a
kind
.