diff --git a/pkg/tiller/kind_sorter.go b/pkg/tiller/kind_sorter.go index 5c7193dee..90678cce5 100644 --- a/pkg/tiller/kind_sorter.go +++ b/pkg/tiller/kind_sorter.go @@ -28,6 +28,7 @@ type SortOrder []string // Those occurring earlier in the list get installed before those occurring later in the list. var InstallOrder SortOrder = []string{ "Namespace", + "NetworkPolicy", "ResourceQuota", "LimitRange", "PodSecurityPolicy", @@ -96,6 +97,7 @@ var UninstallOrder SortOrder = []string{ "PodSecurityPolicy", "LimitRange", "ResourceQuota", + "NetworkPolicy", "Namespace", } diff --git a/pkg/tiller/kind_sorter_test.go b/pkg/tiller/kind_sorter_test.go index 3b37256ed..f4106f62e 100644 --- a/pkg/tiller/kind_sorter_test.go +++ b/pkg/tiller/kind_sorter_test.go @@ -157,6 +157,10 @@ func TestKindSorter(t *testing.T) { Name: "x", Head: &util.SimpleHead{Kind: "HorizontalPodAutoscaler"}, }, + { + Name: "B", + Head: &util.SimpleHead{Kind: "NetworkPolicy"}, + }, } for _, test := range []struct { @@ -164,8 +168,8 @@ func TestKindSorter(t *testing.T) { order SortOrder expected string }{ - {"install", InstallOrder, "abc3zde1fgh2iIjJkKlLmnopqrxstuvw!"}, - {"uninstall", UninstallOrder, "wvmutsxrqponLlKkJjIi2hgf1edz3cba!"}, + {"install", InstallOrder, "aBbc3zde1fgh2iIjJkKlLmnopqrxstuvw!"}, + {"uninstall", UninstallOrder, "wvmutsxrqponLlKkJjIi2hgf1edz3cbBa!"}, } { var buf bytes.Buffer t.Run(test.description, func(t *testing.T) {