Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
29c3b527
Commit
29c3b527
authored
Oct 10, 2017
by
Taylor Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(tiller): Adds CRD ordering
This adds CRD ordering into the explicit kind sorter list Closes #2925
parent
d4ccef7b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
kind_sorter.go
pkg/tiller/kind_sorter.go
+2
-0
kind_sorter_test.go
pkg/tiller/kind_sorter_test.go
+10
-6
No files found.
pkg/tiller/kind_sorter.go
View file @
29c3b527
...
@@ -36,6 +36,7 @@ var InstallOrder SortOrder = []string{
...
@@ -36,6 +36,7 @@ var InstallOrder SortOrder = []string{
"PersistentVolume"
,
"PersistentVolume"
,
"PersistentVolumeClaim"
,
"PersistentVolumeClaim"
,
"ServiceAccount"
,
"ServiceAccount"
,
"CustomResourceDefinition"
,
"ClusterRole"
,
"ClusterRole"
,
"ClusterRoleBinding"
,
"ClusterRoleBinding"
,
"Role"
,
"Role"
,
...
@@ -72,6 +73,7 @@ var UninstallOrder SortOrder = []string{
...
@@ -72,6 +73,7 @@ var UninstallOrder SortOrder = []string{
"Role"
,
"Role"
,
"ClusterRoleBinding"
,
"ClusterRoleBinding"
,
"ClusterRole"
,
"ClusterRole"
,
"CustomResourceDefinition"
,
"ServiceAccount"
,
"ServiceAccount"
,
"PersistentVolumeClaim"
,
"PersistentVolumeClaim"
,
"PersistentVolume"
,
"PersistentVolume"
,
...
...
pkg/tiller/kind_sorter_test.go
View file @
29c3b527
...
@@ -41,6 +41,10 @@ func TestKindSorter(t *testing.T) {
...
@@ -41,6 +41,10 @@ func TestKindSorter(t *testing.T) {
Name
:
"u"
,
Name
:
"u"
,
Head
:
&
util
.
SimpleHead
{
Kind
:
"CronJob"
},
Head
:
&
util
.
SimpleHead
{
Kind
:
"CronJob"
},
},
},
{
Name
:
"2"
,
Head
:
&
util
.
SimpleHead
{
Kind
:
"CustomResourceDefinition"
},
},
{
{
Name
:
"n"
,
Name
:
"n"
,
Head
:
&
util
.
SimpleHead
{
Kind
:
"DaemonSet"
},
Head
:
&
util
.
SimpleHead
{
Kind
:
"DaemonSet"
},
...
@@ -49,10 +53,6 @@ func TestKindSorter(t *testing.T) {
...
@@ -49,10 +53,6 @@ func TestKindSorter(t *testing.T) {
Name
:
"r"
,
Name
:
"r"
,
Head
:
&
util
.
SimpleHead
{
Kind
:
"Deployment"
},
Head
:
&
util
.
SimpleHead
{
Kind
:
"Deployment"
},
},
},
{
Name
:
"1"
,
Head
:
&
util
.
SimpleHead
{
Kind
:
"StorageClass"
},
},
{
{
Name
:
"!"
,
Name
:
"!"
,
Head
:
&
util
.
SimpleHead
{
Kind
:
"HonkyTonkSet"
},
Head
:
&
util
.
SimpleHead
{
Kind
:
"HonkyTonkSet"
},
...
@@ -121,6 +121,10 @@ func TestKindSorter(t *testing.T) {
...
@@ -121,6 +121,10 @@ func TestKindSorter(t *testing.T) {
Name
:
"s"
,
Name
:
"s"
,
Head
:
&
util
.
SimpleHead
{
Kind
:
"StatefulSet"
},
Head
:
&
util
.
SimpleHead
{
Kind
:
"StatefulSet"
},
},
},
{
Name
:
"1"
,
Head
:
&
util
.
SimpleHead
{
Kind
:
"StorageClass"
},
},
{
{
Name
:
"w"
,
Name
:
"w"
,
Head
:
&
util
.
SimpleHead
{
Kind
:
"APIService"
},
Head
:
&
util
.
SimpleHead
{
Kind
:
"APIService"
},
...
@@ -132,8 +136,8 @@ func TestKindSorter(t *testing.T) {
...
@@ -132,8 +136,8 @@ func TestKindSorter(t *testing.T) {
order
SortOrder
order
SortOrder
expected
string
expected
string
}{
}{
{
"install"
,
InstallOrder
,
"abcde1fghijklmnopqrstuvw!"
},
{
"install"
,
InstallOrder
,
"abcde1fgh
2
ijklmnopqrstuvw!"
},
{
"uninstall"
,
UninstallOrder
,
"wvmutsrqponlkjihgf1edcba!"
},
{
"uninstall"
,
UninstallOrder
,
"wvmutsrqponlkji
2
hgf1edcba!"
},
}
{
}
{
var
buf
bytes
.
Buffer
var
buf
bytes
.
Buffer
t
.
Run
(
test
.
description
,
func
(
t
*
testing
.
T
)
{
t
.
Run
(
test
.
description
,
func
(
t
*
testing
.
T
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment