k8sutil

package
v1.28.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: Apache-2.0 Imports: 29 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteKotsadm

func DeleteKotsadm(clientset *kubernetes.Clientset, namespace string, isKurl bool) error

func FindKotsadm

func FindKotsadm(clientset *kubernetes.Clientset, namespace string) (string, error)

func GetClientset

func GetClientset(kubernetesConfigFlags *genericclioptions.ConfigFlags) (*kubernetes.Clientset, error)

func GetCurrentRules

func GetCurrentRules(deployOptions kotsadmtypes.DeployOptions, clientset *kubernetes.Clientset) ([]rbacv1.PolicyRule, error)

func IsOpenShift

func IsOpenShift(clientset kubernetes.Interface) bool

IsOpenShift returns true if the cluster is positively identified as being an openshift cluster

func IsPortAvailable

func IsPortAvailable(port int) bool

func PortForward

func PortForward(kubernetesConfigFlags *genericclioptions.ConfigFlags, localPort int, remotePort int, namespace string, podName string, pollForAdditionalPorts bool, stopCh <-chan struct{}, log *logger.Logger) (int, <-chan error, error)

PortForward starts a local port forward to a pod in the cluster if localport is set, it will attempt to use that port locally. always check the port number returned though, because a port conflict could cause a different port to be used

func ReadKustomizationFromFile

func ReadKustomizationFromFile(file string) (*kustomizetypes.Kustomization, error)

func ServiceForward

func ServiceForward(clientset *kubernetes.Clientset, cfg *rest.Config, localPort int, remotePort int, namespace string, serviceName string) (chan struct{}, error)

func WaitForKotsadm

func WaitForKotsadm(clientset *kubernetes.Clientset, namespace string, timeoutWaitingForWeb time.Duration) (string, error)

func WriteKustomizationToFile

func WriteKustomizationToFile(kustomization kustomizetypes.Kustomization, file string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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