annotator

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkloadAnnotator

type WorkloadAnnotator interface {
	Annotate(ctx context.Context, ref podscanner.WorkloadRef) (annotated bool, err error)
}

WorkloadAnnotator annotates workloads to trigger restarts.

type WorkloadAnnotatorImpl

type WorkloadAnnotatorImpl struct {
	// contains filtered or unexported fields
}

WorkloadAnnotatorImpl adds the restartedAt annotation to workload pod templates.

func NewWorkloadAnnotator

func NewWorkloadAnnotator(c client.Client, annotationCooldown time.Duration) *WorkloadAnnotatorImpl

NewWorkloadAnnotator creates a new WorkloadAnnotatorImpl. annotationCooldown: skip re-annotating if the workload was annotated within this duration; 0 disables the check.

func (*WorkloadAnnotatorImpl) Annotate

Annotate adds fortsa.scaffidi.net/restartedAt to the workload's pod template spec.template.metadata.annotations, triggering a rolling restart. When annotationCooldown is set, skips re-annotating if the workload was annotated within that duration. Returns (true, nil) when a patch was applied, (false, nil) when skipped or unsupported kind, (false, err) on error.

Jump to

Keyboard shortcuts

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