cluster

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: EPL-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	WatchNamespaceEnvVar = "WATCH_NAMESPACE"
)

Variables

This section is empty.

Functions

func CleanJob

func CleanJob(client crclient.Client, name string, namespace string) error

CleanJob cleans up a job in a given namespace. If a job didn't exist then it will throw isNotFound error

func DeletePod

func DeletePod(client crclient.Client, namespace, name string) error

DeletePod removes all pods which match the specified selector

func GetOperatorNamespace

func GetOperatorNamespace() (string, error)

GetOperatorNamespace returns the namespace the operator should be running in.

This function was ported over from Operator SDK 0.17.0 and modified.

func GetPodsBySelector

func GetPodsBySelector(client crclient.Client, namespace string, selector string) (*corev1.PodList, error)

GetPodsBySelector selects all pods by a selector in a namespace

func GetWatchNamespace

func GetWatchNamespace() (string, error)

GetWatchNamespace returns the namespace the operator should be watching for changes

This function was ported over from Operator SDK 0.17.0

func IsOpenShift

func IsOpenShift() (bool, error)

func IsWebhookConfigurationEnabled

func IsWebhookConfigurationEnabled() (bool, error)

IsWebhookConfigurationEnabled returns true if both of mutating and validating webhook configurations are enabled

func SyncJobToCluster

func SyncJobToCluster(
	client crclient.Client,
	ctx context.Context,
	specJob *batchv1.Job,
) error

func WaitForJobCompletion

func WaitForJobCompletion(client crclient.Client, name string, namespace string, timeout time.Duration) error

Wait for the job to complete. Times out if the job isn't complete after $(timeout) seconds

Types

This section is empty.

Jump to

Keyboard shortcuts

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