application

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LabelName is the recommended label for the name of the
	// application. For example, `mysql`.
	LabelName = "app.kubernetes.io/name"
	// LabelInstance is the recommended label for a unique name
	// identifying the instance of an application. For example, `mysql-abcxzy`.
	LabelInstance = "app.kubernetes.io/instance"
	// LabelVersion is the recommended label for the current version
	// of the application. For example, `5.7.21`.
	LabelVersion = "app.kubernetes.io/version"
	// LabelComponent is the recommended label for the component
	// within the architecture. For example, `database`.
	LabelComponent = "app.kubernetes.io/component"
	// LabelPartOf is the recommended label for the name of a higher
	// level application this one is part of. For example, `wordpress`.
	LabelPartOf = "app.kubernetes.io/part-of"
	// LabelManagedBy is the recommended label for the tool being
	// used to manage the operation of an application. For example, `helm`.
	LabelManagedBy = "app.kubernetes.io/managed-by"
	// LabelCreatedBy is the recommended label for the controller/user
	// who created this resource. For example, `controller-manager`.
	LabelCreatedBy = "app.kubernetes.io/created-by"
	// LabelHelmChart is the recommended label for the chart name and version.
	// For example, `{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}`.
	LabelHelmChart = "helm.sh/chart"
)

Variables

This section is empty.

Functions

func Index

func Index(nodes []*yaml.RNode, apps map[yaml.NameMeta]*Node) ([]*yaml.RNode, error)

Index moves the application resources from a collection of nodes and into an indexed map.

func StripVersion

func StripVersion(gv string) string

StripVersion removes the version from a group/version (APIVersion) string.

Types

type GroupKind

type GroupKind struct {
	Group string `yaml:"group"`
	Kind  string `yaml:"kind"`
}

func (*GroupKind) Matches

func (gk *GroupKind) Matches(t yaml.TypeMeta) bool

func (*GroupKind) String

func (gk *GroupKind) String() string

type LabelSelector

type LabelSelector struct {
	MatchLabels      map[string]string `yaml:"matchLabels"`
	MatchExpressions []struct {
		Key      string   `yaml:"key"`
		Operator string   `yaml:"operator"`
		Values   []string `yaml:"values"`
	} `yaml:"matchExpressions"`
}

func (*LabelSelector) String

func (ls *LabelSelector) String() string

type Node

type Node struct {
	Node *yaml.RNode
	// contains filtered or unexported fields
}

func (*Node) Filter

func (app *Node) Filter(nodes []*yaml.RNode) ([]*yaml.RNode, error)

Filter removes all the application resources from the supplied collection.

Jump to

Keyboard shortcuts

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