workload

package
v2.21.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DomainPrefix           = "telepresence.getambassador.io/"
	InjectAnnotation       = DomainPrefix + "inject-" + agentconfig.ContainerName
	ServiceNameAnnotation  = DomainPrefix + "inject-service-name"
	ManualInjectAnnotation = DomainPrefix + "manually-injected"
	AnnRestartedAt         = DomainPrefix + "restartedAt"
)
View Source
const (
	EventTypeAdd = iota
	EventTypeUpdate
	EventTypeDelete
)

Variables

This section is empty.

Functions

func FromAny

func FromAny(obj any) (k8sapi.Workload, bool)

func StartDeployments

func StartDeployments(ctx context.Context, ns string) cache.SharedIndexInformer

func StartReplicaSets

func StartReplicaSets(ctx context.Context, ns string) cache.SharedIndexInformer

func StartRollouts

func StartRollouts(ctx context.Context, ns string) cache.SharedIndexInformer

func StartStatefulSets

func StartStatefulSets(ctx context.Context, ns string) cache.SharedIndexInformer

Types

type Event

type Event struct {
	Type     EventType
	Workload k8sapi.Workload
}

type EventType

type EventType int

func (EventType) String

func (e EventType) String() string

type Kind

type Kind string
const (
	DeploymentKind  Kind = "Deployment"
	StatefulSetKind Kind = "StatefulSet"
	ReplicaSetKind  Kind = "ReplicaSet"
	RolloutKind     Kind = "Rollout"
)

func (*Kind) IsValid

func (w *Kind) IsValid() bool

type State

type State int
const (
	StateUnknown State = iota
	StateProgressing
	StateAvailable
	StateFailure
)

func GetWorkloadState

func GetWorkloadState(wl k8sapi.Workload) State

func StateFromRPC

func StateFromRPC(s manager.WorkloadInfo_State) State

func (State) String

func (ws State) String() string

type Watcher

type Watcher interface {
	Subscribe(ctx context.Context) <-chan []Event
}

func NewWatcher

func NewWatcher(ctx context.Context, ns string, enabledWorkloadKinds []Kind) (Watcher, error)

Jump to

Keyboard shortcuts

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