Documentation ¶
Index ¶
- 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 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.