util

package
v0.0.0-...-379f027 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AmRunningInCluster

func AmRunningInCluster() bool

AmRunningInCluster returns true if this binary is running in kubernetes cluster

func AmRunningInTest

func AmRunningInTest() bool

AmRunningInTest returns true if this binary is running under ginkgo

func CheckJenkinsReady

func CheckJenkinsReady(service *corev1.Service, masterPort int32) error

check if jenkins is ready

func GetNodePort

func GetNodePort(servicePorts []corev1.ServicePort, portName string) int32

GetNodePort retrieves node port number of a specified kubernetes service

func GetServiceEndpoint

func GetServiceEndpoint(service *corev1.Service, path string, internalPort int32) (string, error)

gets the correct endpoint for a given service based on whether code is running in cluster or not

func MergeData

func MergeData(ms ...map[string]string) map[string]string

MergeSecretData merges secret Data map

func NewPredicate

func NewPredicate(namespaces string) predicate.Predicate

newPredicate creates a namespace-based predicate for the Watch functions or returns a default one if no namespace was specified

func SafeRestartJenkins

func SafeRestartJenkins(service *corev1.Service, adminSecret *corev1.Secret, masterPort int32) error

SafeRestartJenkins does a safe jenkins restart

Types

type NamespacedResourceVersionChangedPredicate

type NamespacedResourceVersionChangedPredicate struct {
	// contains filtered or unexported fields
}

func (NamespacedResourceVersionChangedPredicate) Create

func (NamespacedResourceVersionChangedPredicate) Delete

func (NamespacedResourceVersionChangedPredicate) Generic

func (NamespacedResourceVersionChangedPredicate) Update

Jump to

Keyboard shortcuts

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