providercaps

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 3 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 providercaps holds the provider-conditional pod-template mutation framework. Both per-feature (feature.ProviderAwareFeature) and global (global.NodeAgentProviderSpec) consumers declare their mutations as a ProviderCapabilityMap and apply them via ApplyProviderCapabilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyProviderCapabilities added in v1.29.0

func ApplyProviderCapabilities(mgr PodTemplateManager, provider string, caps ProviderCapabilityMap)

ApplyProviderCapabilities applies all provider-conditional mutations. The baseline ("") entry is applied first. The provider-specific entry is then applied: removals run before additions so a provider can replace a baseline item by removing it and re-adding a modified version.

Types

type ContainerMountRef

type ContainerMountRef struct {
	VolumeName string
	Containers []apicommon.AgentContainerName
}

ContainerMountRef identifies a volume mount by volume name and the containers it should be stripped from. Empty Containers means strip from all containers.

type EnvVarSet

type EnvVarSet struct {
	EnvVar         corev1.EnvVar
	Containers     []apicommon.AgentContainerName
	InitContainers []apicommon.AgentContainerName
}

EnvVarSet groups an env var with its target containers. Empty Containers means the env var is added to all agent containers. InitContainers lists init containers that should also receive the env var (init containers are not iterated by the all-containers AddEnvVar path).

type PodTemplateManager

type PodTemplateManager interface {
	PodTemplateSpec() *corev1.PodTemplateSpec
	EnvVar() merger.EnvVarManager
	Volume() merger.VolumeManager
	VolumeMount() merger.VolumeMountManager
}

PodTemplateManager is the minimal interface ApplyProviderCapabilities needs from a pod-template manager. feature.PodTemplateManagers satisfies it structurally, so callers pass their existing manager unchanged.

type ProviderCapabilities

type ProviderCapabilities struct {
	Volumes []VolumeAndMount
	EnvVars []EnvVarSet
	// RemoveVolumes strips named volumes (vol + all mounts) before provider additions run.
	RemoveVolumes []string
	// RemoveMounts strips specific container-volume mount pairs before provider additions run.
	RemoveMounts []ContainerMountRef
	// RemoveEnvVars strips env vars by name before provider additions run.
	RemoveEnvVars []string
}

ProviderCapabilities holds the volumes, env vars, and removals for a specific provider entry in a ProviderCapabilityMap.

type ProviderCapabilityMap added in v1.29.0

type ProviderCapabilityMap = map[string]ProviderCapabilities

ProviderCapabilityMap maps a provider string to its capabilities. The empty string key "" is the baseline applied to all providers first. Provider-specific entries are then applied on top: removals first, additions second.

type VolumeAndMount

type VolumeAndMount struct {
	Volume     corev1.Volume
	Mount      corev1.VolumeMount
	Containers []apicommon.AgentContainerName
}

VolumeAndMount groups a pod-level volume with a container volume mount. Volume is added to the pod spec; Mount is added to each listed container.

Jump to

Keyboard shortcuts

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