k8sutils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetVerrazzanoVersionOfAdminClusterFunc = getVerrazzanoVersionOfAdminCluster

Used for unit testing

Functions

func BuildWorkloadClusterRESTKubeConfig

func BuildWorkloadClusterRESTKubeConfig(kubeconfig string) (*rest.Config, error)

BuildWorkloadClusterRESTKubeConfig writes the kubeconfig to a temporary file and then returns the rest.config

func GetCoreV1Client

func GetCoreV1Client() (v12.CoreV1Interface, error)

func GetKubeConfig

func GetKubeConfig() (*rest.Config, error)

GetKubeConfig Returns kubeconfig from KUBECONFIG env var if set Else from default location ~/.kube/config

func GetKubeConfigLocation

func GetKubeConfigLocation() (string, error)

GetKubeConfigLocation Helper function to obtain the default kubeConfig location

func GetKubernetesClientsetWithConfig

func GetKubernetesClientsetWithConfig(config *rest.Config) (*kubernetes.Clientset, error)

GetKubernetesClientsetWithConfig returns the Kubernetes clientset for the given configuration

func GetRESTConfigGivenString

func GetRESTConfigGivenString(kubeconfig string) (*rest.Config, error)

func IsPodReady

func IsPodReady(ctx context.Context, pod *v1.Pod) bool

IsPodReady checks if POD is in ready state

func ResetGetVerrazzanoVersionOfAdminClusterFunc

func ResetGetVerrazzanoVersionOfAdminClusterFunc()

Types

This section is empty.

Jump to

Keyboard shortcuts

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