Documentation ¶
Overview ¶
Package resource contains resource methods
Index ¶
Constants ¶
View Source
const ( LifecycleManaged = "managed" LifecycleReferred = "referred" )
Common const definitions
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetObjectFn ¶
GetObjectFn is a type for any function that returns resource info
type LocalObjectReference ¶
type LocalObjectReference struct {
corev1.LocalObjectReference `json:",inline"`
}
LocalObjectReference with validation
type Object ¶
type Object struct { // Lifecycle can be: managed, reference Lifecycle string // Obj refers to the resource object can be: sts, service, secret, pvc, .. Obj metav1.Object // ObjList refers to the list of resource objects ObjList metav1.ListInterface }
Object is a container to capture the k8s resource info to be used by controller
func ObjFromFile ¶
func ObjFromFile(path string, values interface{}, list metav1.ListInterface) (*Object, error)
ObjFromFile populates Object from file
func ObjFromString ¶
func ObjFromString(spec string, values interface{}, list metav1.ListInterface) (*Object, error)
ObjFromString populates Object from string spec
type ObjectBag ¶
type ObjectBag struct {
// contains filtered or unexported fields
}
ObjectBag abstracts dealing with group of objects For now it is a simple list
type Observable ¶
type Observable struct { // ObjList refers to the list of resource objects ObjList metav1.ListInterface // Obj refers to the resource object can be: sts, service, secret, pvc, .. Obj metav1.Object // Labels list of labels Labels map[string]string // Typemeta - needed for go test fake client Type metav1.TypeMeta // Namespace - only observe resources in this namespace Namespace string }
Observable captures the k8s resource info and selector to fetch child resources
func ObservablesFromObjects ¶
func ObservablesFromObjects(scheme *runtime.Scheme, bag *ObjectBag, labels map[string]string) []Observable
ObservablesFromObjects returns ObservablesFromObjects
Click to show internal directories.
Click to hide internal directories.