kubernetes

package
v1.2.46 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateServiceAccount added in v0.0.33

func CreateServiceAccount(name string, namespace string) (string, error)

CreateServiceAccount creates a new service account in the given namespace and returns the service account name

func EnsureClusterRoleBinding added in v0.0.33

func EnsureClusterRoleBinding(clusterRoleName string, namespace string) (string, error)

EnsureClusterRoleBinding ensures for the given cluster role name that there is a binding to a service account in the given namespace

func FindIngressHosts

func FindIngressHosts(name string, namespace string) ([]string, error)

FindIngressHosts searches an ingress resource by name and retrieves its hosts

func GetAPIExtensionsClient

func GetAPIExtensionsClient() (apiextensionsclientset.Interface, error)

GetAPIExtensionsClient returns the k8s api extensions client

func GetClientConfig

func GetClientConfig() (*restclient.Config, error)

GetClientConfig return the k8s configuration

func GetClientset

func GetClientset() (kubernetes.Interface, error)

GetClientset creates a new k8s client

func GetJenkinsClient

func GetJenkinsClient() (versioned.Interface, error)

GetJenkinsClient returns the Jenkins CRDs client

func IsRetryableAPIError

func IsRetryableAPIError(err error) bool

IsRetryableAPIError indicates if the given error is retryable

func IsSSOInitialized

func IsSSOInitialized(sso *v1.SSO) (bool, error)

IsSSOInitialized checks if the SSO is initialized by retrieving the current state from k8s

func RegisterSSOCRD

func RegisterSSOCRD(apiClient apiextensionsclientset.Interface) error

RegisterSSOCRD ensures that the CRD is registered for SSO

func WaitForDeploymentToStabilize

func WaitForDeploymentToStabilize(c kubernetes.Interface, namespace, name string, timeout time.Duration) error

WaitForDeploymentToStabilize waits till the Deployment has a matching generation/replica count between spec and status.

func WaitForJobComplete

func WaitForJobComplete(c kubernetes.Interface, namespace, name string, interval, timeout time.Duration) error

WaitForJobComplete wait for a job to complete

func WaitForPodComplete

func WaitForPodComplete(pods corev1.PodInterface, podName string, timeout time.Duration) error

WaitForPodComplete wait for given POD to complete

func WaitForPodReady

func WaitForPodReady(pods corev1.PodInterface, podName string) error

WaitForPodReady waits for given POD to become ready

func WaitForPodsWithLabelRunning

func WaitForPodsWithLabelRunning(c kubernetes.Interface, namespace string, label labels.Selector, timeout time.Duration) error

WaitForPodsWithLabelRunning waits for all matching pods to become Running and at least one matching pod exists.

func WaitForService

func WaitForService(c kubernetes.Interface, namespace, name string, exist bool, interval, timeout time.Duration) error

WaitForService waits until the service appears (exist == true), or disappears (exist == false)

func WaitForServiceEndpointsNum

func WaitForServiceEndpointsNum(c kubernetes.Interface, namespace, serviceName string, expectNum int, interval, timeout time.Duration) error

WaitForServiceEndpointsNum waits until the amount of endpoints that implement service to expectNum.

Types

This section is empty.

Jump to

Keyboard shortcuts

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