mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Maintain resources in order loaded.
This commit is contained in:
@@ -17,7 +17,6 @@ limitations under the License.
|
||||
package resid
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"sigs.k8s.io/kustomize/pkg/gvk"
|
||||
@@ -54,8 +53,10 @@ func (i ItemId) String() string {
|
||||
[]string{i.Gvk.String(), ns, nm}, separator)
|
||||
}
|
||||
|
||||
func (i ItemId) Equals(b fmt.Stringer) bool {
|
||||
return i.String() == b.String()
|
||||
func (i ItemId) Equals(o ItemId) bool {
|
||||
return i.Name == o.Name &&
|
||||
i.Namespace == o.Namespace &&
|
||||
i.Gvk.Equals(o.Gvk)
|
||||
}
|
||||
|
||||
func NewItemId(g gvk.Gvk, ns, nm string) ItemId {
|
||||
|
||||
@@ -113,6 +113,7 @@ func (n ResId) GvknEquals(id ResId) bool {
|
||||
// NsGvknEquals returns true if the other id matches
|
||||
// namespace/Group/Version/Kind/name.
|
||||
func (n ResId) NsGvknEquals(id ResId) bool {
|
||||
// TODO: same a n.ItemId.Equals(id.ItemId)
|
||||
return n.ItemId.Namespace == id.ItemId.Namespace && n.GvknEquals(id)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user