Documentation ¶
Index ¶
Constants ¶
View Source
const ( TotallyNotANamespace = "_non_namespaceable_" DefaultNamespace = "default" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResId ¶
type ResId struct { // Gvk of the resource. gvk.Gvk `json:",inline,omitempty" yaml:",inline,omitempty"` // Name of the resource before transformation. Name string `json:"name,omitempty" yaml:"name,omitempty"` // Namespace the resource belongs to. // An untransformed resource has no namespace. // A fully transformed resource has the namespace // from the top most overlay. Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` }
ResId is an identifier of a k8s resource object.
func FromString ¶
func NewResIdKindOnly ¶
NewResIdKindOnly creates a new ResId.
func NewResIdWithNamespace ¶
NewResIdWithNamespace creates new ResId in a given namespace.
func (ResId) EffectiveNamespace ¶
EffectiveNamespace returns a non-ambiguous, non-empty namespace for use in reporting and equality tests.
func (ResId) Equals ¶
Equals returns true if the other id matches namespace/Group/Version/Kind/name.
func (ResId) GvknEquals ¶
GvknEquals returns true if the other id matches Group/Version/Kind/name.
func (ResId) GvknString ¶
GvknString of ResId based on GVK and name
func (ResId) IsInDefaultNs ¶
IsInDefaultNs returns true if id is a namespaceable ResId and the Namespace is either not set or set to DefaultNamespace.
func (ResId) IsNsEquals ¶
IsNsEquals returns true if the id is in the same effective namespace.
Click to show internal directories.
Click to hide internal directories.