util

package
v0.0.0-...-0db023b Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultIngressDeploymentName = "ingress-nginx-controller"
	DefaultIngressServiceName    = "ingress-nginx-controller"
)

The default deployment and service names for ingress-nginx

View Source
const IssuePrefix = "https://github.com/kubernetes/ingress-nginx/issues/"

IssuePrefix is the github url that we can append an issue number to to link to it

Variables

This section is empty.

Functions

func AddDeploymentFlag

func AddDeploymentFlag(cmd *cobra.Command) *string

AddDeploymentFlag adds a --deployment flag to a cobra command

func AddPodFlag

func AddPodFlag(cmd *cobra.Command) *string

AddPodFlag adds a --pod flag to a cobra command

func AddSelectorFlag

func AddSelectorFlag(cmd *cobra.Command) *string

AddSelectorFlag adds a --selector flag to a cobra command

func GetNamespace

func GetNamespace(flags *genericclioptions.ConfigFlags) string

GetNamespace takes a set of kubectl flag values and returns the namespace we should be operating in

func InVersionRangeInclusive

func InVersionRangeInclusive(start, v, stop string) bool

InVersionRangeInclusive checks that the middle version is between the other two versions

func ParseVersionString

func ParseVersionString(v string) (int, int, int, error)

ParseVersionString returns the major, minor, and patch numbers of a version string

func PodInDeployment

func PodInDeployment(pod apiv1.Pod, deployment string) bool

PodInDeployment returns whether a pod is part of a deployment with the given name a pod is considered to be in {deployment} if it is owned by a replicaset with a name of format {deployment}-otherchars

func PrintError

func PrintError(e error)

PrintError receives an error value and prints it if it exists

Types

This section is empty.

Jump to

Keyboard shortcuts

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