Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ca654513f |
@@ -224,10 +224,15 @@ func (p *ImagePromoter) patchApplication(ctx context.Context, entry promotionEnt
|
|||||||
case "kustomize":
|
case "kustomize":
|
||||||
images := getKustomizeImages(app, entry.SourceIndex)
|
images := getKustomizeImages(app, entry.SourceIndex)
|
||||||
newImages := updateImageEntry(images, image, digest)
|
newImages := updateImageEntry(images, image, digest)
|
||||||
path := fmt.Sprintf("/spec/sources/%d/kustomize/images", entry.SourceIndex)
|
// Patch the full kustomize block (not just /kustomize/images) so the
|
||||||
patch = []map[string]any{
|
// op succeeds even when the kustomize key is absent from the source.
|
||||||
{"op": "add", "path": path, "value": newImages},
|
// These apps only use kustomize overrides for image pinning, so
|
||||||
}
|
// replacing the whole block is safe.
|
||||||
|
patch = []map[string]any{{
|
||||||
|
"op": "add",
|
||||||
|
"path": fmt.Sprintf("/spec/sources/%d/kustomize", entry.SourceIndex),
|
||||||
|
"value": map[string]any{"images": newImages},
|
||||||
|
}}
|
||||||
|
|
||||||
case "helm":
|
case "helm":
|
||||||
// Helm runners use spec.source (singular). Patch helm parameters
|
// Helm runners use spec.source (singular). Patch helm parameters
|
||||||
|
|||||||
Reference in New Issue
Block a user