Skip to content

Commit a905f3c

Browse files
authored
Merge pull request #147 from nan-yu/master
Add Namespace to the sort function
2 parents b84d99d + d58b97d commit a905f3c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/patterns/declarative/sort.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ func DefaultObjectOrder(ctx context.Context) func(o *manifest.Object) int {
3636
case "apiextensions.k8s.io/CustomResourceDefinition":
3737
return -1000
3838

39+
// Namespaces need to be created before any other resources
40+
case "/Namespace":
41+
return 0
3942
// We need to create ServiceAccounts, Roles before we bind them with a RoleBinding
4043
case "/ServiceAccount", "rbac.authorization.k8s.io/ClusterRole":
4144
return 1

0 commit comments

Comments
 (0)