Documentation ¶
Index ¶
- Constants
- func ObjectKeyType(key client.ObjectKey, obj client.Object) objectKeyType
- type Client
- func (c Client) Create(ctx reconcile.Context, obj client.Object) error
- func (c Client) Delete(ctx reconcile.Context, obj client.Object) error
- func (c Client) DynamicApply(ctx reconcile.Context, namespacedName types.NamespacedName, manifest string) error
- func (c Client) DynamicDelete(ctx reconcile.Context, namespacedName types.NamespacedName, ...) error
- func (c Client) DynamicGet(ctx reconcile.Context, namespacedName types.NamespacedName, ...) (*unstructured.Unstructured, error)
- func (c Client) Get(ctx reconcile.Context, key client.ObjectKey, obj client.Object) error
- func (c Client) GetClient() client.Client
- func (c Client) List(ctx reconcile.Context, list client.ObjectList, opts ...client.ListOption) error
- func (c Client) Update(ctx reconcile.Context, obj client.Object) error
- func (c Client) UpdateStatus(ctx reconcile.Context, obj client.Object) error
Constants ¶
View Source
const FieldManagerName = "aeto"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Clients wraps Kubernetes clients with common behaviors.
func NewClient ¶
func NewClient(client client.Client, dynamic dynamic.Interface, discovery *discovery.DiscoveryClient) Client
NewClient returns a new Client.
func (Client) DynamicApply ¶
func (c Client) DynamicApply(ctx reconcile.Context, namespacedName types.NamespacedName, manifest string) error
DynamicApply performs a patch in a similar manner to kubectl apply.
func (Client) DynamicDelete ¶
func (c Client) DynamicDelete(ctx reconcile.Context, namespacedName types.NamespacedName, gvk schema.GroupVersionKind) error
DynamicDelete removes an object given a namespaced name and group, version, kind.
func (Client) DynamicGet ¶
func (c Client) DynamicGet(ctx reconcile.Context, namespacedName types.NamespacedName, gvk schema.GroupVersionKind) (*unstructured.Unstructured, error)
DynamicGet returns an unstructured object given a namespaced name and group, version, kind.
func (Client) Get ¶
Get retrieves an obj for the given object key from the Kubernetes Cluster. obj must be a struct pointer so that obj can be updated with the response returned by the Server.
func (Client) List ¶
func (c Client) List(ctx reconcile.Context, list client.ObjectList, opts ...client.ListOption) error
Click to show internal directories.
Click to hide internal directories.