Question related to Kargo PromotionTask
We are using Kargo v1.10.3 and in our PromotionTask we need to update annotation values in kustomization.yaml. Our annotations use dots in the key names like below:
yaml
commonAnnotations:
deployment.testing.com/author: shreyank
build.testing.com/id: abc123
build.testing.com/branch: main
We are using the yaml-update step but it fails with:
error mutating bytes: error finding key ............ key path not found
We tried all the following key path formats:
yaml
# Attempt 1
- uses: yaml-update
config:
path: kustomization.yaml
key: commonAnnotations.deployment\.testing\.com/author
value: shreyank
# Attempt 2
- uses: yaml-update
config:
path: kustomization.yaml
key: 'commonAnnotations["deployment.testing.com/author"]'
value: shreyank
# Attempt 3
- uses: yaml-update
config:
path: kustomization.yaml
key: 'commonAnnotations."deployment.testing.com/author"'
value: shreyank
All attempts fail with the same key path not found error.
Question: Is there a supported way to use yaml-update with dot-containing annotation keys without changing the existing key format in the file? Or is this a known limitation?
u/Alternative-Tear-333 — 4 days ago