kube

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ValueCreatedByJX for resources created by the Jenkins X CLI
	ValueCreatedByJX = "jx"

	// LabelCreatedBy indicates the service that created this resource
	LabelCreatedBy = "jenkins.io/created-by"

	// LabelTeam indicates the team name an environment belongs to
	LabelTeam = "team"

	// ValueKindEnvironmentRole to indicate a Role which maps to an EnvironmentRoleBinding
	ValueKindEnvironmentRole = "EnvironmentRole"

	// LabelKind to indicate the kind of auth, such as Git or Issue
	LabelKind = "jenkins.io/kind"
)

Variables

This section is empty.

Functions

func EnvironmentMatches

func EnvironmentMatches(env *v1.Environment, filter *v1.EnvironmentFilter) bool

EnvironmentMatches returns true if the environment matches the given filter

func EnvironmentMatchesAny

func EnvironmentMatchesAny(env *v1.Environment, filters []v1.EnvironmentFilter) bool

EnvironmentMatchesAny returns true if the list of filters is empty or one of the filters matches the given environment

func NewClientAndConfig

func NewClientAndConfig() (kubernetes.Interface, *rest.Config, error)

func NewPermanentEnvironment added in v0.0.4

func NewPermanentEnvironment(name string) *v1.Environment

NewPermanentEnvironment creates a new permanent environment for testing

func NewPreviewEnvironment added in v0.0.4

func NewPreviewEnvironment(name string) *v1.Environment

NewPreviewEnvironment creates a new preview environment for testing

func SortListWatchByName

func SortListWatchByName(listWatch *cache.ListWatch)

func SortRuntimeObjectsByName

func SortRuntimeObjectsByName(objects []runtime.Object)

Types

type ByName

type ByName []runtime.Object

func (ByName) Len

func (a ByName) Len() int

func (ByName) Less

func (a ByName) Less(i, j int) bool

func (ByName) Swap

func (a ByName) Swap(i, j int)

Jump to

Keyboard shortcuts

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