resource

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateResource

CreateResource creates a K8s resource using a dynamic Client, allowing us to create CRD types

func DeleteSourceClaim

func DeleteSourceClaim(ctx context.Context, client dynamic.Interface, ref *v1.ObjectReference) error

DeleteSourceClaim removes references to the Composite before deleting

func GetResource

Get Resource gets a resource. Returns false

func MappingFor

func MappingFor(rmapper meta.RESTMapper, resourceOrKindArg string) (*meta.RESTMapping, error)

MappingFor returns the RESTMapping for the given resource or kind argument. Copied over from cli-runtime pkg/resource Builder, https://github.com/kubernetes/cli-runtime/blob/9a91d944dd43186c52e0162e12b151b0e460354a/pkg/resource/builder.go#L768

func NewDynamicClient

func NewDynamicClient(config *rest.Config) (dynamic.Interface, error)

func NewRestMapper

func NewRestMapper(kubeconfig *rest.Config) (meta.RESTMapper, error)

func ResourceExists

func ResourceExists(ctx context.Context, client dynamic.Interface, ref *v1.ObjectReference) (bool, error)

Check if Resource Exists

func UpdateCompositeWithNewClaim

func UpdateCompositeWithNewClaim(ctx context.Context, client dynamic.Interface, xrRef *v1.ObjectReference, xrcu *claim.Unstructured) error

UpdateCompositeWithNewClaim updates the Composite to refer to the new Claim

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL