Skip to content

Commit 1ad8f21

Browse files
authored
Support patching for kustomize (#1835)
1 parent ba89cbf commit 1ad8f21

23 files changed

Lines changed: 3888 additions & 41 deletions

source/Calamari.Tests/ArgoCD/Commands/Conventions/UpdateArgoCDAppImagesInstallConventionTest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ public void KustomizeSource_HasKustomizationFile_Update()
340340
var kustomizeFile = "kustomization.yaml";
341341
originRepo.AddFilesToBranch(argoCDBranchName, [(kustomizeFile,
342342
"""
343+
apiVersion: kustomize.config.k8s.io/v1beta1
344+
kind: Kustomization
343345
images:
344346
- name: "docker.io/nginx"
345347
newTag: "1.25"
@@ -352,6 +354,8 @@ public void KustomizeSource_HasKustomizationFile_Update()
352354

353355
// Assert
354356
var updatedYamlContent = """
357+
apiVersion: kustomize.config.k8s.io/v1beta1
358+
kind: Kustomization
355359
images:
356360
- name: "docker.io/nginx"
357361
newTag: "1.27.1"
@@ -973,6 +977,8 @@ public void KustomizeSource_ImageAlreadyAtTargetTag_TracksSourceWithNullCommitSh
973977

974978
originRepo.AddFilesToBranch(argoCDBranchName, [("kustomization.yaml",
975979
"""
980+
apiVersion: kustomize.config.k8s.io/v1beta1
981+
kind: Kustomization
976982
images:
977983
- name: "docker.io/nginx"
978984
newTag: "1.27.1"

0 commit comments

Comments
 (0)