mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
Consolidate IsClusterKind and IsNamespaceableKind method to avoid duplication
This commit is contained in:
@@ -62,7 +62,7 @@ const metaNamespace = "metadata/namespace"
|
||||
// object itself doesn't live in a namespace).
|
||||
func doIt(id resid.ResId, fs *config.FieldSpec) bool {
|
||||
return fs.Path != metaNamespace ||
|
||||
(fs.Path == metaNamespace && !id.IsClusterKind())
|
||||
(fs.Path == metaNamespace && id.IsNamespaceableKind())
|
||||
}
|
||||
|
||||
func (p *NamespaceTransformerPlugin) changeNamespace(
|
||||
|
||||
@@ -63,7 +63,7 @@ const metaNamespace = "metadata/namespace"
|
||||
// object itself doesn't live in a namespace).
|
||||
func doIt(id resid.ResId, fs *config.FieldSpec) bool {
|
||||
return fs.Path != metaNamespace ||
|
||||
(fs.Path == metaNamespace && !id.IsClusterKind())
|
||||
(fs.Path == metaNamespace && id.IsNamespaceableKind())
|
||||
}
|
||||
|
||||
func (p *plugin) changeNamespace(
|
||||
|
||||
Reference in New Issue
Block a user