pod

package
v0.10.68 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pod implements the Pod controller of the operator: for every Pod labeled kubeca.effectivesecurity/inject=true it derives the names the Pod may carry (internal/k8snames), the SPIFFE ID of its ServiceAccount when the ClusterIssuer has a trust domain, and the names of the san annotation, and creates or updates a Certificate owned by the Pod. The Certificate controller issues it into the Secret the Pod mounts; the kubelet starts the containers once the Secret exists, and the Certificate and the Secret are garbage-collected with the Pod.

The informer cache of the manager only holds labeled Pods (operator.CacheOptions), so the controller never reads other Pods.

Index

Constants

View Source
const (
	// ControllerName is the name of the controller in metrics and logs.
	ControllerName = "pod"
)

Variables

This section is empty.

Functions

func Injected

func Injected(obj client.Object) bool

Injected reports whether an object carries the inject label.

Types

type Reconciler

type Reconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
	// ClusterDomain is the suffix of the derived DNS names.
	ClusterDomain string
}

Reconciler reconciles labeled Pods into Certificates.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile creates or updates the Certificate of a labeled Pod. A Pod whose annotations are unusable gets an InvalidPod event and no retry.

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager registers the controller: it watches labeled Pods, the Certificates they own, Services (mapped to the Pods they select) and ClusterIssuers (mapped to the Pods that name them).

Jump to

Keyboard shortcuts

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