kubedog

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RootAnnoName is prefix for all kubedog annotations.
	RootAnnoName = "helmwave.dev/"

	// TrackTerminationModeAnnoName annotation allows to specify how to track resource.
	TrackTerminationModeAnnoName = RootAnnoName + "track-termination-mode"

	// FailModeAnnoName annotation specifies what to do after resource fails.
	FailModeAnnoName = RootAnnoName + "fail-mode"

	// FailuresAllowedPerReplicaAnnoName specifies how many times resource is allowed to fail.
	FailuresAllowedPerReplicaAnnoName = RootAnnoName + "failures-allowed-per-replica"

	// LogRegexAnnoName allows to set regexp for log lines.
	LogRegexAnnoName = RootAnnoName + "log-regex"

	// LogRegexForAnnoPrefix allows to set regexp for individual containers.
	LogRegexForAnnoPrefix = RootAnnoName + "log-regex-for-"

	// SkipLogsAnnoName allows to skip log streaming.
	SkipLogsAnnoName = RootAnnoName + "skip-logs"

	// SkipLogsForContainersAnnoName allows to skip log streaming for individual containers.
	SkipLogsForContainersAnnoName = RootAnnoName + "skip-logs-for-containers"

	// ShowLogsOnlyForContainersAnnoName allows to show logs only for specified containers.
	ShowLogsOnlyForContainersAnnoName = RootAnnoName + "show-logs-only-for-containers"

	// ShowLogsUntilAnnoName is unused.
	ShowLogsUntilAnnoName = RootAnnoName + "show-logs-until"

	// ShowEventsAnnoName enables streaming resource events.
	ShowEventsAnnoName = RootAnnoName + "show-service-messages"

	// ReplicasOnCreationAnnoName is unused.
	ReplicasOnCreationAnnoName = RootAnnoName + "replicas-on-creation"
)

Variables

This section is empty.

Functions

func MakeSpecs

func MakeSpecs(m []Resource, ns string) (*multitrack.MultitrackSpecs, error)

MakeSpecs creates *multitrack.MultitrackSpecs for Resource slice in provided namespace.

Types

type Config

type Config struct {
	StatusInterval time.Duration
	Timeout        time.Duration
	StartDelay     time.Duration
}

Config is config for kubedog library.

type Resource

type Resource struct {
	Spec             `yaml:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
	meta1.TypeMeta   `yaml:",inline"`
	meta1.ObjectMeta `yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
}

Resource is base structure for all k8s resources that have replicas. Used to parse out replicas count.

func Parse added in v0.12.0

func Parse(yamlFile []byte) []Resource

Parse parses YAML manifests of kubernetes resources and returns Resource slice.

func (*Resource) MakeMultiTrackSpec

func (r *Resource) MakeMultiTrackSpec(ns string) (*multitrack.MultitrackSpec, error)

MakeMultiTrackSpec creates *multitrack.MultitrackSpec for current resource.

type Spec

type Spec struct {
	Replicas *uint32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
}

Spec is spec structure with replicas. Only replicas count is used.

Jump to

Keyboard shortcuts

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