k8sutil

package
v1.16.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 31 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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(kubernetesConfigFlags *genericclioptions.ConfigFlags, localPort int, remotePort int, namespace string, serviceName string) (chan struct{}, error)

func UpdateRole added in v1.12.0

func UpdateRole(existingRole, desiredRole *v1.Role)

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