diff --git a/pkg/commands/testdata/testcase-variable-ref/expected.yaml b/pkg/commands/testdata/testcase-variable-ref/expected.yaml index 43845e41df..cb60233e63 100644 --- a/pkg/commands/testdata/testcase-variable-ref/expected.yaml +++ b/pkg/commands/testdata/testcase-variable-ref/expected.yaml @@ -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 @@ -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 diff --git a/pkg/resmap/idslice.go b/pkg/resmap/idslice.go index 3b46526084..38ed4d5189 100644 --- a/pkg/resmap/idslice.go +++ b/pkg/resmap/idslice.go @@ -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",