Skip to content

Commit

Permalink
fix(kustomize): no concurrent processing if Kustomize patches are used (
Browse files Browse the repository at this point in the history
#15654)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
  • Loading branch information
crenshaw-dev authored Sep 25, 2023
1 parent 129cf53 commit cbd8806
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/apis/application/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ func (k *ApplicationSourceKustomize) AllowsConcurrentProcessing() bool {
len(k.CommonAnnotations) == 0 &&
k.NamePrefix == "" &&
k.Namespace == "" &&
k.NameSuffix == ""
k.NameSuffix == "" &&
len(k.Patches) == 0
}

// IsZero returns true when the Kustomize options are considered empty
Expand Down
10 changes: 10 additions & 0 deletions pkg/apis/application/v1alpha1/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3002,6 +3002,16 @@ func TestSourceAllowsConcurrentProcessing_KustomizeParams(t *testing.T) {

assert.False(t, src.AllowsConcurrentProcessing())
})

t.Run("Has Patches", func(t *testing.T) {
src := ApplicationSource{Path: ".", Kustomize: &ApplicationSourceKustomize{
Patches: KustomizePatches{{
Path: "test",
}},
}}

assert.False(t, src.AllowsConcurrentProcessing())
})
}

func TestUnSetCascadedDeletion(t *testing.T) {
Expand Down

0 comments on commit cbd8806

Please sign in to comment.