k8s

package
v0.92.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetWatchNamespace added in v0.65.6

func GetWatchNamespace() (string, error)

getWatchNamespace returns the Namespace the operator should be watching for changes

func NewDynamicRESTMapper

func NewDynamicRESTMapper(cfg *rest.Config) (meta.RESTMapper, error)

NewDynamicRESTMapper returns a RESTMapper that dynamically discovers resource types at runtime. This is in contrast to controller-manager's default RESTMapper, which only checks resource types at startup, and so can't handle the case of first creating a CRD and then creating an instance of that CRD.

func RelationLabels added in v0.65.4

func RelationLabels() []string

RelationLabels returns the list of the relationship labels

func RemovedLabels added in v0.65.4

func RemovedLabels() []string

RemovedLabels returns the list of the labels we remove for backward compatibility

func StringToLabel added in v0.41.0

func StringToLabel(s string) string

Make given string label-compatible

func ToUnstructured

func ToUnstructured(obj interface{}) (*unstructured.Unstructured, error)

ToUnstructured convers an arbitrary object (which MUST obey the k8s object conventions) to an Unstructured

func UnstructuredFromYaml added in v0.41.0

func UnstructuredFromYaml(obj string) *unstructured.Unstructured

UnstructuredFromYaml creates an unstructured object from a raw yaml string

Types

type DynamicRESTMapper

type DynamicRESTMapper struct {
	// contains filtered or unexported fields
}

func (*DynamicRESTMapper) KindFor

func (*DynamicRESTMapper) KindsFor

func (*DynamicRESTMapper) RESTMapping

func (drm *DynamicRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error)

func (*DynamicRESTMapper) RESTMappings

func (drm *DynamicRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error)

func (*DynamicRESTMapper) ResourceFor

func (*DynamicRESTMapper) ResourceSingularizer

func (drm *DynamicRESTMapper) ResourceSingularizer(resource string) (singular string, err error)

func (*DynamicRESTMapper) ResourcesFor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL