keptnkubeutils

package
v0.0.0-...-f56e5b1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNamespace

func CreateNamespace(useInClusterConfig bool, namespace string) error

CreateNamespace creates a new Kubernetes namespace with the provided name

func DoHelmUpgrade

func DoHelmUpgrade(project string, stage string) error

DoHelmUpgrade executes a helm update and upgrade

func ExecuteCommand

func ExecuteCommand(command string, args []string) (string, error)

ExecuteCommand exectues the command using the args

func ExecuteCommandInDirectory

func ExecuteCommandInDirectory(command string, args []string, directory string) (string, error)

ExecuteCommandInDirectory executes the command using the args within the specified directory

func ExistsNamespace

func ExistsNamespace(useInClusterConfig bool, namespace string) (bool, error)

ExistsNamespace checks whether a namespace with the provided name exists

func ExpandTilde

func ExpandTilde(fileName string) string

ExpandTilde expands ~ to HOME

func GetClientset

func GetClientset(useInClusterConfig bool) (*kubernetes.Clientset, error)

GetClientset returns the kubernetes Clientset

func GetFiles

func GetFiles(workingPath string, suffixes ...string) ([]string, error)

GetFiles returns a list of files in a directory filtered by the provided suffix

func GetKeptnDirectory

func GetKeptnDirectory() (string, error)

GetKeptnDirectory returns a path, which is used to store logs and possibly creds

func GetKeptnDomain

func GetKeptnDomain(useInClusterConfig bool) (string, error)

GetKeptnDomain reads the configmap keptn-domain in namespace keptn and returns the contained app_domain

func GetKubeAPI

func GetKubeAPI(useInClusterConfig bool) (v1.CoreV1Interface, error)

GetKubeAPI returns the CoreV1Interface

func RestartPodsWithSelector

func RestartPodsWithSelector(useInClusterConfig bool, namespace string, selector string) error

RestartPodsWithSelector restarts the pods which are found in the provided namespace and selector

func ScaleDeployment

func ScaleDeployment(useInClusterConfig bool, deployment string, namespace string, replicas int32) error

func UserHomeDir

func UserHomeDir() string

UserHomeDir returns the HOME directory by taking into account the operating system

func WaitForDeploymentToBeRolledOut

func WaitForDeploymentToBeRolledOut(useInClusterConfig bool, deploymentName string, namespace string) error

WaitForDeploymentToBeRolledOut waits until the deployment is Available

func WaitForDeploymentsInNamespace

func WaitForDeploymentsInNamespace(useInClusterConfig bool, namespace string) error

WaitForDeploymentsInNamespace waits until all deployments in a namespace are available

func WaitForPodsWithSelector

func WaitForPodsWithSelector(useInClusterConfig bool, namespace string, selector string,
	retries int, waitingTime time.Duration) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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