types

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SvcLatencyNs          = "kube-burner-service-latency"
	SvcLatencyCheckerName = "svc-checker"
)

Variables

View Source
var SvcLatencyCheckerPod = &corev1.Pod{
	ObjectMeta: metav1.ObjectMeta{
		Name:      SvcLatencyCheckerName,
		Namespace: SvcLatencyNs,
	},
	Spec: corev1.PodSpec{
		TerminationGracePeriodSeconds: ptr.To[int64](0),
		Containers: []corev1.Container{
			{
				Image:           "quay.io/cloud-bulldozer/fedora-nc:latest",
				Command:         []string{"sleep", "inf"},
				Name:            SvcLatencyCheckerName,
				ImagePullPolicy: corev1.PullAlways,
				SecurityContext: &corev1.SecurityContext{
					AllowPrivilegeEscalation: ptr.To[bool](false),
					Capabilities:             &corev1.Capabilities{Drop: []corev1.Capability{"ALL"}},
					RunAsNonRoot:             ptr.To[bool](true),
					SeccompProfile:           &corev1.SeccompProfile{Type: corev1.SeccompProfileTypeRuntimeDefault},
					RunAsUser:                ptr.To[int64](1000),
				},
			},
		},
	},
}

Functions

This section is empty.

Types

type LatencyThreshold

type LatencyThreshold struct {
	// ConditionType
	ConditionType string `yaml:"conditionType"`
	// Metric type
	Metric string `yaml:"metric"`
	// Threshold accepted
	Threshold time.Duration `yaml:"threshold"`
}

LatencyThreshold holds the thresholds configuration

type Measurement

type Measurement struct {
	// Name is the name the measurement
	Name string `yaml:"name"`
	// LatencyThresholds config
	LatencyThresholds []LatencyThreshold `yaml:"thresholds"`
	// PPRofTargets targets config
	PProfTargets []PProftarget `yaml:"pprofTargets"`
	// PPRofInterval pprof collect interval
	PProfInterval time.Duration `yaml:"pprofInterval"`
	// PProfDirectory output directory
	PProfDirectory string `yaml:"pprofDirectory"`
	// Service latency metrics to index
	ServiceLatencyMetrics latencyMetric `yaml:"svcLatencyMetrics"`
	// Service latency endpoint timeout
	ServiceTimeout time.Duration `yaml:"svcTimeout"`
}

Measurement holds the measurement configuration

func (*Measurement) UnmarshalMeasurement

func (m *Measurement) UnmarshalMeasurement(unmarshal func(interface{}) error) error

UnmarshalYAML implements Unmarshaller to customize object defaults

type PProftarget

type PProftarget struct {
	// Name pprof target name
	Name string `yaml:"name"`
	// Namespace pod namespace
	Namespace string `yaml:"namespace"`
	// LabelSelector get pprof from pods with these labels
	LabelSelector map[string]string `yaml:"labelSelector"`
	// BearerToken bearer token
	BearerToken string `yaml:"bearerToken"`
	// URL target URL
	URL string `yaml:"url"`
	// CertFile Client certificate file
	CertFile string `yaml:"certFile"`
	// KeyFile Private key file
	KeyFile string `yaml:"keyFile"`
	// Cert Client certificate content
	Cert string `yaml:"cert"`
	// Key Private key content
	Key string `yaml:"key"`
}

PProftarget pprof targets to collect

Jump to

Keyboard shortcuts

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