util

package
v2.20.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupResources added in v2.17.0

func BackupResources(ctx context.Context, kubeClient ctrlruntimeclient.Client, gvk schema.GroupVersionKind, filename string) error

BackupResources takes a GroupVersionKind and dumps all resources of that type (across all namespaces) as YAML into the given filename (the file will be truncated first).

func CheckHelmRelease

func CheckHelmRelease(ctx context.Context, log logrus.FieldLogger, helmClient helm.Client, namespace string, releaseName string) (*helm.Release, error)

CheckHelmRelease tries to find an existing Helm release in the cluster and returns it. If the release is still in a pending state, the function will wait a bit for it to settle down. If the release status is failed for whatever reason, the release is purged to allow clean re-installs.

func DeployCRD added in v2.19.0

func DeployCRD(ctx context.Context, kubeClient ctrlruntimeclient.Client, crd ctrlruntimeclient.Object) error

func DeployCRDs

func DeployCRDs(ctx context.Context, kubeClient ctrlruntimeclient.Client, log logrus.FieldLogger, directory string) error

func DeployHelmChart

func DeployHelmChart(ctx context.Context, log logrus.FieldLogger, helmClient helm.Client, chart *helm.Chart, namespace string, releaseName string, values *yamled.Document, atomic bool, force bool, release *helm.Release) error

func DumpResources added in v2.17.0

func DumpResources(ctx context.Context, filename string, objects []unstructured.Unstructured) error

func EnsureNamespace

func EnsureNamespace(ctx context.Context, log logrus.FieldLogger, kubeClient ctrlruntimeclient.Client, namespace string) error

func HasAllReadyCRDs added in v2.19.0

func HasAllReadyCRDs(ctx context.Context, kubeClient ctrlruntimeclient.Client, crdNames []string) (bool, error)

func HasReadyCRD added in v2.19.0

func HasReadyCRD(ctx context.Context, kubeClient ctrlruntimeclient.Client, crdName string) (bool, error)

func ListResources added in v2.17.0

func WaitForCRDGone added in v2.17.0

func WaitForCRDGone(ctx context.Context, kubeClient ctrlruntimeclient.Client, crdName string, timeout time.Duration) error

func WaitForReadyCRD added in v2.17.0

func WaitForReadyCRD(ctx context.Context, kubeClient ctrlruntimeclient.Client, crdName string, timeout time.Duration) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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