Documentation ¶
Index ¶
- func PointerTo[T any](v T) *T
- func SetupDynamicClient(kubeconfig *string) (dynamic.Interface, error)
- func SetupLogging(o io.Writer) *logrus.Logger
- func UpdateStatusField(obj *unstructured.Unstructured, field string, value interface{}) error
- type FixtureLoader
- func (f *FixtureLoader) CopyStatus(src, dst *unstructured.Unstructured) error
- func (f *FixtureLoader) CreateResourceDynamically(ctx context.Context, r *ResourceInfo, obj unstructured.Unstructured) error
- func (f *FixtureLoader) GetResourceDynamically(ctx context.Context, r *ResourceInfo) (*unstructured.Unstructured, error)
- func (f *FixtureLoader) StatusFieldLoad(ctx context.Context, ri *ResourceInfo, obj unstructured.Unstructured, ...) error
- func (f *FixtureLoader) StatusLoad(ctx context.Context, ri *ResourceInfo, obj unstructured.Unstructured) error
- func (f *FixtureLoader) UpdateResourceStatusDynamically(ctx context.Context, r *ResourceInfo, obj unstructured.Unstructured) error
- type ResourceInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupDynamicClient ¶
SetupDynamicClient sets up a dynamic client
func SetupLogging ¶
SetupLogging sets up the logging for the router daemon
func UpdateStatusField ¶
func UpdateStatusField(obj *unstructured.Unstructured, field string, value interface{}) error
UpdateStatusField updates a field in the status of an object.
Types ¶
type FixtureLoader ¶
FixtureLoader loads fixtures
func SetupFixtureLoader ¶
func SetupFixtureLoader(dynamic dynamic.Interface, log *logrus.Logger) *FixtureLoader
SetupFixtureLoader sets up a FixtureLoader
func (*FixtureLoader) CopyStatus ¶
func (f *FixtureLoader) CopyStatus(src, dst *unstructured.Unstructured) error
CopyStatus copies the status from one object to another.
func (*FixtureLoader) CreateResourceDynamically ¶
func (f *FixtureLoader) CreateResourceDynamically(ctx context.Context, r *ResourceInfo, obj unstructured.Unstructured) error
CreateResourceDynamically creates a resource in the cluster
func (*FixtureLoader) GetResourceDynamically ¶
func (f *FixtureLoader) GetResourceDynamically(ctx context.Context, r *ResourceInfo) (*unstructured.Unstructured, error)
GetResourceDynamically returns a resource from the cluster
func (*FixtureLoader) StatusFieldLoad ¶
func (f *FixtureLoader) StatusFieldLoad(ctx context.Context, ri *ResourceInfo, obj unstructured.Unstructured, field string) error
StatusFieldLoad gets the resouce from the cluster, copies the status from the given object to the object from the cluster and updates the resource in the cluster
func (*FixtureLoader) StatusLoad ¶
func (f *FixtureLoader) StatusLoad(ctx context.Context, ri *ResourceInfo, obj unstructured.Unstructured) error
StatusLoad gets the resouce from the cluster, copies the status from the given object to the object from the cluster and updates the resource in the cluster
func (*FixtureLoader) UpdateResourceStatusDynamically ¶
func (f *FixtureLoader) UpdateResourceStatusDynamically(ctx context.Context, r *ResourceInfo, obj unstructured.Unstructured) error
UpdateResourceStatusDynamically updates a resource in the cluster. Note: it doesn't retry on conflict errors.
type ResourceInfo ¶
type ResourceInfo struct { GVR schema.GroupVersionResource NamespacedName types.NamespacedName }
ResourceInfo holds the information about a resource
func GetResourceInfo ¶
func GetResourceInfo(obj unstructured.Unstructured) *ResourceInfo
GetResourceInfo returns a ResourceInfo object for the given object