Documentation ¶
Index ¶
- func BoolPtr(b bool) *bool
- func DeleteNestedField(obj map[string]interface{}, fields ...string)
- func GetNestedArray(obj map[string]interface{}, fields ...string) []interface{}
- func GetNestedField(obj map[string]interface{}, fields ...string) interface{}
- func GetNestedFieldInto(out interface{}, obj map[string]interface{}, fields ...string) error
- func GetNestedInt64(obj map[string]interface{}, fields ...string) int64
- func GetNestedInt64Pointer(obj map[string]interface{}, fields ...string) *int64
- func GetNestedMap(obj map[string]interface{}, fields ...string) map[string]string
- func GetNestedObject(obj map[string]interface{}, fields ...string) map[string]interface{}
- func GetNestedSlice(obj map[string]interface{}, fields ...string) []string
- func GetNestedString(obj map[string]interface{}, fields ...string) string
- func RecheckDeletionTimestamp(getObject func() (metav1.Object, error)) func() error
- func SetNestedField(obj map[string]interface{}, value interface{}, fields ...string)
- func SetNestedMap(obj map[string]interface{}, value map[string]string, fields ...string)
- func SetNestedSlice(obj map[string]interface{}, value []string, fields ...string)
- func WaitForCacheSync(controllerName string, stopCh <-chan struct{}, ...) bool
- type BaseControllerRefManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteNestedField ¶
func GetNestedArray ¶
func GetNestedField ¶
func GetNestedFieldInto ¶
func GetNestedInt64 ¶
func GetNestedInt64Pointer ¶
func GetNestedMap ¶
func GetNestedObject ¶
func GetNestedSlice ¶
func GetNestedString ¶
func RecheckDeletionTimestamp ¶
RecheckDeletionTimestamp returns a CanAdopt() function to recheck deletion.
The CanAdopt() function calls getObject() to fetch the latest value, and denies adoption attempts if that object has a non-nil DeletionTimestamp.
func SetNestedField ¶
func SetNestedMap ¶
func SetNestedSlice ¶
func WaitForCacheSync ¶
func WaitForCacheSync(controllerName string, stopCh <-chan struct{}, cacheSyncs ...cache.InformerSynced) bool
WaitForCacheSync is a wrapper around cache.WaitForCacheSync that generates log messages indicating that the controller identified by controllerName is waiting for syncs, followed by either a successful or failed sync.
Types ¶
type BaseControllerRefManager ¶
type BaseControllerRefManager struct { Controller metav1.Object Selector labels.Selector CanAdoptFunc func() error // contains filtered or unexported fields }
func (*BaseControllerRefManager) CanAdopt ¶
func (m *BaseControllerRefManager) CanAdopt() error
func (*BaseControllerRefManager) ClaimObject ¶
func (m *BaseControllerRefManager) ClaimObject(obj metav1.Object, match func(metav1.Object) bool, adopt, release func(metav1.Object) error) (bool, error)
ClaimObject tries to take ownership of an object for this controller.
It will reconcile the following:
- Adopt orphans if the match function returns true.
- Release owned objects if the match function returns false.
A non-nil error is returned if some form of reconciliation was attempted and failed. Usually, controllers should try again later in case reconciliation is still needed.
If the error is nil, either the reconciliation succeeded, or no reconciliation was necessary. The returned boolean indicates whether you now own the object.
No reconciliation will be attempted if the controller is being deleted.