Documentation
¶
Index ¶
- func DeleteObject(ctx context.Context, c client.Client, obj client.Object) error
- func DeleteObjects(ctx context.Context, c client.Client, objs []client.Object) error
- func DeleteYaml(ctx context.Context, c client.Client, yaml []byte) error
- func ReconcileObject(ctx context.Context, c client.Client, obj client.Object) error
- func ReconcileObjects(ctx context.Context, c client.Client, objs []client.Object) error
- func ReconcileYaml(ctx context.Context, c client.Client, yaml []byte) error
- func UpdateObject(ctx context.Context, c client.Client, obj client.Object) error
- type ObjectApplier
- type ObjectGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteObject ¶ added in v0.24.0
DeleteObject deletes a single Kubernetes object. It's idempotent - if the object doesn't exist, no error is returned.
func DeleteObjects ¶ added in v0.24.0
DeleteObjects deletes multiple Kubernetes objects.
func DeleteYaml ¶ added in v0.24.0
DeleteYaml deletes Kubernetes objects from YAML content.
func ReconcileObject ¶
func ReconcileObjects ¶
Types ¶
type ObjectApplier ¶ added in v0.12.0
type ObjectApplier struct {
// contains filtered or unexported fields
}
ObjectApplier helps reconcile kubernetes object using server side apply.
func NewObjectApplier ¶ added in v0.12.0
func NewObjectApplier(client client.Client) *ObjectApplier
NewObjectApplier builds a ObjectApplier.
func (*ObjectApplier) Apply ¶ added in v0.12.0
func (a *ObjectApplier) Apply(ctx context.Context, generateObjects ObjectGenerator) (controller.Result, error)
Apply uses server side apply to reconcile kubernetes objects returned by a generator Useful in reconcilers because it simplifies the reconciliation when generating API objects from another package, like a provider This is mostly a helper for generate objects + serverside apply.
type ObjectGenerator ¶ added in v0.12.0
type ObjectGenerator func() ([]kubernetes.Object, error)
Click to show internal directories.
Click to hide internal directories.