Documentation
¶
Overview ¶
package discovery implements a way to retrieve discovery information from Kubernetes to determine whether resources are namespace or cluster scoped.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIServerResourceInspector ¶
type APIServerResourceInspector struct {
// contains filtered or unexported fields
}
APIServerResourceInspector implements ResourceInspector using the Kubernetes discovery API. It relies on a Kubernetes apiserver that has discovery information for all inputted resource types.
func NewAPIServerResourceInspector ¶
func NewAPIServerResourceInspector(cfg *rest.Config) (*APIServerResourceInspector, error)
func (*APIServerResourceInspector) AddGVKToScope ¶
func (a *APIServerResourceInspector) AddGVKToScope(gvk schema.GroupVersionKind, namespaced bool)
func (*APIServerResourceInspector) IsCoreGroup ¶
func (a *APIServerResourceInspector) IsCoreGroup(group string) bool
func (*APIServerResourceInspector) IsNamespaced ¶
func (a *APIServerResourceInspector) IsNamespaced(gvk schema.GroupVersionKind) (bool, error)
type LocalResourceInspector ¶
type LocalResourceInspector struct {
// contains filtered or unexported fields
}
LocalResourceInspector implements ResourceInspector using local manifests
func NewLocalResourceInspector ¶
func NewLocalResourceInspector() (*LocalResourceInspector, error)
func (*LocalResourceInspector) AddGVKToScope ¶
func (l *LocalResourceInspector) AddGVKToScope(gvk schema.GroupVersionKind, namespaced bool)
func (*LocalResourceInspector) IsCoreGroup ¶
func (l *LocalResourceInspector) IsCoreGroup(group string) bool
func (*LocalResourceInspector) IsNamespaced ¶
func (l *LocalResourceInspector) IsNamespaced(gvk schema.GroupVersionKind) (bool, error)
type ResourceInspector ¶
type ResourceInspector interface { // IsNamespaced returns true if the given GroupVersionKind is for a // namespace-scoped object. IsNamespaced(schema.GroupVersionKind) (bool, error) // AddGVKToScope adds GVK scope mapping to discovery AddGVKToScope(schema.GroupVersionKind, bool) // IsCoreGroup returns true if group is core IsCoreGroup(string) bool }
Click to show internal directories.
Click to hide internal directories.