Documentation ¶
Index ¶
- func BackupResources(ctx context.Context, kubeClient ctrlruntimeclient.Client, ...) error
- func CheckHelmRelease(ctx context.Context, log logrus.FieldLogger, helmClient helm.Client, ...) (*helm.Release, error)
- func DeployCRD(ctx context.Context, kubeClient ctrlruntimeclient.Client, ...) error
- func DeployCRDs(ctx context.Context, kubeClient ctrlruntimeclient.Client, ...) error
- func DeployHelmChart(ctx context.Context, log logrus.FieldLogger, helmClient helm.Client, ...) error
- func DumpResources(ctx context.Context, filename string, objects []unstructured.Unstructured) error
- func EnsureNamespace(ctx context.Context, log logrus.FieldLogger, ...) error
- func HasAllReadyCRDs(ctx context.Context, kubeClient ctrlruntimeclient.Client, crdNames []string) (bool, error)
- func HasReadyCRD(ctx context.Context, kubeClient ctrlruntimeclient.Client, crdName string) (bool, error)
- func ListResources(ctx context.Context, kubeClient ctrlruntimeclient.Client, ...) ([]unstructured.Unstructured, error)
- func RemoveMutatingWebhook(ctx context.Context, logger logrus.FieldLogger, ...) error
- func RemoveValidatingWebhook(ctx context.Context, logger logrus.FieldLogger, ...) error
- func ShutdownDeployment(ctx context.Context, logger logrus.FieldLogger, ...) error
- func WaitForAllPodsToBeGone(ctx context.Context, logger logrus.FieldLogger, ...) error
- func WaitForCRDGone(ctx context.Context, kubeClient ctrlruntimeclient.Client, crdName string, ...) error
- func WaitForDeploymentRollout(ctx context.Context, client ctrlruntimeclient.Client, ...) error
- func WaitForReadyCRD(ctx context.Context, kubeClient ctrlruntimeclient.Client, crdName string, ...) error
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, versions *kubermaticversion.Versions, kind crd.ClusterKind) error
func DeployHelmChart ¶
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 HasReadyCRD ¶ added in v2.19.0
func ListResources ¶ added in v2.17.0
func ListResources(ctx context.Context, kubeClient ctrlruntimeclient.Client, gvk schema.GroupVersionKind) ([]unstructured.Unstructured, error)
func RemoveMutatingWebhook ¶ added in v2.21.0
func RemoveMutatingWebhook(ctx context.Context, logger logrus.FieldLogger, client ctrlruntimeclient.Client, webhookName string) error
func RemoveValidatingWebhook ¶ added in v2.21.0
func RemoveValidatingWebhook(ctx context.Context, logger logrus.FieldLogger, client ctrlruntimeclient.Client, webhookName string) error
func ShutdownDeployment ¶ added in v2.21.0
func ShutdownDeployment(ctx context.Context, logger logrus.FieldLogger, client ctrlruntimeclient.Client, namespace string, name string) error
ShutdownDeployment takes the name and namespace of a deployment and will scale that Deployment to 0 replicas.
func WaitForAllPodsToBeGone ¶ added in v2.21.0
func WaitForAllPodsToBeGone(ctx context.Context, logger logrus.FieldLogger, client ctrlruntimeclient.Client, namespace string, name string, timeout time.Duration) error
WaitForAllPodsToBeGone takes the name of a Deployment and will wait until all Pods for that Deployment have been shut down.
func WaitForCRDGone ¶ added in v2.17.0
func WaitForDeploymentRollout ¶ added in v2.25.0
func WaitForDeploymentRollout(ctx context.Context, client ctrlruntimeclient.Client, deployment *appsv1.Deployment, version string, timeout time.Duration) error
WaitForDeploymentRollout queries k8s until a deployment with the supplied version exists and has been rolled out, or until the timeout is reached.
func WaitForReadyCRD ¶ added in v2.17.0
Types ¶
This section is empty.