Documentation ¶
Index ¶
- func AddFinalizer(target metav1.Object, name string) bool
- func Annotate(target metav1.Object, name, value string) bool
- func CopyLabelsAndAnnotations(target, src metav1.Object)
- func CreateOrUpdate(ctx context.Context, cl client.Client, obj client.Object, ...) error
- func DeleteIgnoreNotFound(ctx context.Context, cl client.Client, obj client.Object, ...) (bool, error)
- func Exists(obj client.Object) bool
- func GetIgnoreNotFound(ctx context.Context, cl client.Client, key client.ObjectKey, obj client.Object) (bool, error)
- func Label(target metav1.Object, name, value string) bool
- func Own(target client.Object, owner lifecycle.TypedObject) error
- func OwnUncontrolled(target client.Object, owner lifecycle.TypedObject) error
- func Patch(ctx context.Context, cl client.Client, upd, orig client.Object, ...) error
- func RemoveFinalizer(target metav1.Object, name string) bool
- func SuffixObjectKey(key client.ObjectKey, suffix string) client.ObjectKey
- func SuffixObjectKeyName(key client.ObjectKey, suffix string) client.ObjectKey
- type ClusterScopedAPIObject
- func (ao *ClusterScopedAPIObject) AddFinalizer(ctx context.Context, name string) bool
- func (ao *ClusterScopedAPIObject) Delete(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)
- func (ao *ClusterScopedAPIObject) Finalizing() bool
- func (ao *ClusterScopedAPIObject) LabelAnnotateFrom(ctx context.Context, from metav1.Object)
- func (ao *ClusterScopedAPIObject) Load(ctx context.Context, cl client.Client) (bool, error)
- func (ao *ClusterScopedAPIObject) Own(ctx context.Context, other lifecycle.Ownable) error
- func (ao *ClusterScopedAPIObject) Owned(ctx context.Context, owner lifecycle.TypedObject) error
- func (ao *ClusterScopedAPIObject) Persist(ctx context.Context, cl client.Client) error
- func (ao *ClusterScopedAPIObject) RemoveFinalizer(ctx context.Context, name string) bool
- type CreateOrUpdateOption
- type CreateOrUpdateOptions
- type NamespaceScopedAPIObject
- func (ao *NamespaceScopedAPIObject) AddFinalizer(ctx context.Context, name string) bool
- func (ao *NamespaceScopedAPIObject) Delete(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)
- func (ao *NamespaceScopedAPIObject) Finalizing() bool
- func (ao *NamespaceScopedAPIObject) LabelAnnotateFrom(ctx context.Context, from metav1.Object)
- func (ao *NamespaceScopedAPIObject) Load(ctx context.Context, cl client.Client) (bool, error)
- func (ao *NamespaceScopedAPIObject) Own(ctx context.Context, other lifecycle.Ownable) error
- func (ao *NamespaceScopedAPIObject) Owned(ctx context.Context, owner lifecycle.TypedObject) error
- func (ao *NamespaceScopedAPIObject) Persist(ctx context.Context, cl client.Client) error
- func (ao *NamespaceScopedAPIObject) RemoveFinalizer(ctx context.Context, name string) bool
- type OwnerInOtherNamespaceError
- type OwnerNotPersistedError
- type PatchOption
- type PatchOptions
- type Patcher
- type WithObjectKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdate ¶
func DeleteIgnoreNotFound ¶
func GetIgnoreNotFound ¶
func OwnUncontrolled ¶ added in v0.2.0
func OwnUncontrolled(target client.Object, owner lifecycle.TypedObject) error
func SuffixObjectKey ¶ added in v0.6.4
Types ¶
type ClusterScopedAPIObject ¶ added in v0.4.0
type ClusterScopedAPIObject struct {
// contains filtered or unexported fields
}
ClusterScopedAPIObject allows an arbitrary Kubernetes object to be represented using the lifecycle constructs or embedded into a specific type.
func ForClusterScopedAPIObject ¶ added in v0.4.0
func ForClusterScopedAPIObject(name *string, obj lifecycle.TypedObject) *ClusterScopedAPIObject
ForClusterScopedAPIObject creates a lifecycle-compatible representation of a Kubernetes object that will automatically reflect changes back to the given arguments.
func (*ClusterScopedAPIObject) AddFinalizer ¶ added in v0.4.0
func (ao *ClusterScopedAPIObject) AddFinalizer(ctx context.Context, name string) bool
func (*ClusterScopedAPIObject) Delete ¶ added in v0.4.0
func (ao *ClusterScopedAPIObject) Delete(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)
func (*ClusterScopedAPIObject) Finalizing ¶ added in v0.4.0
func (ao *ClusterScopedAPIObject) Finalizing() bool
func (*ClusterScopedAPIObject) LabelAnnotateFrom ¶ added in v0.4.0
func (ao *ClusterScopedAPIObject) LabelAnnotateFrom(ctx context.Context, from metav1.Object)
func (*ClusterScopedAPIObject) Owned ¶ added in v0.4.0
func (ao *ClusterScopedAPIObject) Owned(ctx context.Context, owner lifecycle.TypedObject) error
func (*ClusterScopedAPIObject) RemoveFinalizer ¶ added in v0.4.0
func (ao *ClusterScopedAPIObject) RemoveFinalizer(ctx context.Context, name string) bool
type CreateOrUpdateOption ¶
type CreateOrUpdateOption interface {
ApplyToCreateOrUpdateOptions(target *CreateOrUpdateOptions)
}
type CreateOrUpdateOptions ¶
func (*CreateOrUpdateOptions) ApplyOptions ¶
func (o *CreateOrUpdateOptions) ApplyOptions(opts []CreateOrUpdateOption)
type NamespaceScopedAPIObject ¶ added in v0.4.0
type NamespaceScopedAPIObject struct {
// contains filtered or unexported fields
}
NamespaceScopedAPIObject allows an arbitrary Kubernetes object to be represented using the lifecycle constructs or embedded into a specific type.
func ForNamespaceScopedAPIObject ¶ added in v0.4.0
func ForNamespaceScopedAPIObject(key *client.ObjectKey, obj lifecycle.TypedObject) *NamespaceScopedAPIObject
ForNamespaceScopedAPIObject creates a lifecycle-compatible representation of a Kubernetes object that will automatically reflect changes back to the given arguments.
func (*NamespaceScopedAPIObject) AddFinalizer ¶ added in v0.4.0
func (ao *NamespaceScopedAPIObject) AddFinalizer(ctx context.Context, name string) bool
func (*NamespaceScopedAPIObject) Delete ¶ added in v0.4.0
func (ao *NamespaceScopedAPIObject) Delete(ctx context.Context, cl client.Client, opts ...lifecycle.DeleteOption) (bool, error)
func (*NamespaceScopedAPIObject) Finalizing ¶ added in v0.4.0
func (ao *NamespaceScopedAPIObject) Finalizing() bool
func (*NamespaceScopedAPIObject) LabelAnnotateFrom ¶ added in v0.4.0
func (ao *NamespaceScopedAPIObject) LabelAnnotateFrom(ctx context.Context, from metav1.Object)
func (*NamespaceScopedAPIObject) Owned ¶ added in v0.4.0
func (ao *NamespaceScopedAPIObject) Owned(ctx context.Context, owner lifecycle.TypedObject) error
func (*NamespaceScopedAPIObject) RemoveFinalizer ¶ added in v0.4.0
func (ao *NamespaceScopedAPIObject) RemoveFinalizer(ctx context.Context, name string) bool
type OwnerInOtherNamespaceError ¶
type OwnerInOtherNamespaceError struct { Owner lifecycle.TypedObject Target client.Object }
func (*OwnerInOtherNamespaceError) Error ¶
func (e *OwnerInOtherNamespaceError) Error() string
type OwnerNotPersistedError ¶ added in v0.4.0
type OwnerNotPersistedError struct { Owner lifecycle.TypedObject Target client.Object }
func (*OwnerNotPersistedError) Error ¶ added in v0.4.0
func (e *OwnerNotPersistedError) Error() string
type PatchOption ¶
type PatchOption interface {
ApplyToPatchOptions(target *PatchOptions)
}
type PatchOptions ¶
func (*PatchOptions) ApplyOptions ¶
func (o *PatchOptions) ApplyOptions(opts []PatchOption)
type Patcher ¶
type Patcher struct {
// contains filtered or unexported fields
}
func NewPatcher ¶
func NewPatcher(upd, orig client.Object, opts ...PatchOption) *Patcher
type WithObjectKey ¶
func (WithObjectKey) ApplyToCreateOrUpdateOptions ¶
func (wok WithObjectKey) ApplyToCreateOrUpdateOptions(opts *CreateOrUpdateOptions)
func (WithObjectKey) ApplyToPatchOptions ¶
func (wok WithObjectKey) ApplyToPatchOptions(opts *PatchOptions)
Click to show internal directories.
Click to hide internal directories.