labelling

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ComponentSys is a component that belongs to Frisbee. Such components can be excluded from Chaos events.
	ComponentSys = Component("SYS")

	// ComponentSUT is a component that belongs to the system under testing
	ComponentSUT = Component("SUT")
)
View Source
const (
	// LabelName points to the scenario
	LabelName = "scenario.frisbee.dev/name"

	// LabelPartOf points to the action this resource is part of.
	LabelPartOf = "scenario.frisbee.dev/action"

	// LabelCreatedBy points to the controller who created this resource
	LabelCreatedBy = "scenario.frisbee.dev/created-by"

	// LabelComponent describes the role of the component within the architecture.
	// It can be SUT (for system under service) or SYS (if it's a frisbee component like Grafana).
	LabelComponent = "scenario.frisbee.dev/component"

	// LabelInstance contains a unique name identifying the instance of the  resource
	LabelInstance = "scenario.frisbee.dev/instance"
)

https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/

View Source
const (
	// ResourceDiscoveryLabel is used to discover frisbee resources across different namespaces
	ResourceDiscoveryLabel = "discover.frisbee.dev/name"
)

Variables

This section is empty.

Functions

func GetAction

func GetAction(obj metav1.Object) string

GetAction returns the name of the action the object belongs to.

func GetCreatedBy

func GetCreatedBy(obj metav1.Object) string

GetCreatedBy returns the creator of the resource.

func GetInstance

func GetInstance(obj metav1.Object) map[string]string

func GetScenario added in v1.0.23

func GetScenario(obj metav1.Object) string

func HasScenario added in v1.0.23

func HasScenario(obj metav1.Object) bool

func Propagate

func Propagate(child client.Object, parent client.Object)

func SetAction

func SetAction(obj *metav1.ObjectMeta, action string)

func SetComponent

func SetComponent(obj *metav1.ObjectMeta, kind Component)

func SetCreatedBy

func SetCreatedBy(child client.Object, parent client.Object)

func SetInstance

func SetInstance(obj metav1.Object)

func SetScenario added in v1.0.23

func SetScenario(obj *metav1.ObjectMeta, scenario string)

func SpecForSystemService

func SpecForSystemService(spec *v1alpha1.ServiceSpec) bool

Types

type Component

type Component string

func GetComponent

func GetComponent(obj metav1.Object) Component

Jump to

Keyboard shortcuts

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