Skip to content

Commit

Permalink
improve idslice
Browse files Browse the repository at this point in the history
  • Loading branch information
Liujingfang1 committed Sep 5, 2018
1 parent 7811d9f commit 4a297fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions pkg/commands/testdata/testcase-variable-ref/expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,10 @@ metadata:
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/path: _status/vars
prometheus.io/port: "8080"
prometheus.io/scrape: "true"
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
labels:
app: cockroachdb
name: dev-base-cockroachdb
name: dev-base-cockroachdb-public
spec:
clusterIP: None
ports:
- name: grpc
port: 26257
Expand All @@ -101,10 +95,16 @@ spec:
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/path: _status/vars
prometheus.io/port: "8080"
prometheus.io/scrape: "true"
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
labels:
app: cockroachdb
name: dev-base-cockroachdb-public
name: dev-base-cockroachdb
spec:
clusterIP: None
ports:
- name: grpc
port: 26257
Expand Down
2 changes: 1 addition & 1 deletion pkg/resmap/idslice.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (a IdSlice) Less(i, j int) bool {
if a[i].Gvk().String() != a[j].Gvk().String() {
return gvkLess(a[i].Gvk(), a[j].Gvk())
}
return a[i].Name() < a[j].Name()
return a[i].String() < a[j].String()
}

var order = []string{"Namespace", "CustomResourceDefinition", "ServiceAccount",
Expand Down

0 comments on commit 4a297fa

Please sign in to comment.