package config
import "k8s.io/kubernetes/pkg/kubelet/config"
Package config implements the pod configuration readers.
Package config implements the pod configuration readers.
Index ¶
- Constants
- Variables
- func NewSourceApiserver(logger klog.Logger, c clientset.Interface, nodeName types.NodeName, nodeHasSynced func() bool, updates chan<- sourceUpdate)
- func NewSourceFile(logger klog.Logger, path string, nodeName types.NodeName, period time.Duration, updates chan<- sourceUpdate)
- func NewSourceURL(logger klog.Logger, url string, header http.Header, nodeName types.NodeName, period time.Duration, updates chan<- sourceUpdate)
- type PodConfig
- func NewPodConfig(recorder record.EventRecorderLogger, startupSLIObserver podStartupSLIObserver) *PodConfig
- func (c *PodConfig) Channel(ctx context.Context, source string) chan<- sourceUpdate
- func (c *PodConfig) SeenAllSources(seenSources sets.Set[string]) bool
- func (c *PodConfig) Updates() <-chan kubetypes.PodUpdate
- type SourcesReady
- type SourcesReadyFn
Constants ¶
WaitForAPIServerSyncPeriod is the period between checks for the node list/watch initial sync
Variables ¶
var ErrStaticPodTriedToUseClusterTrustBundle = errors.New("static pods may not use ClusterTrustBundle projected volume sources")
A static pod tried to use a ClusterTrustBundle projected volume source.
A static pod tried to use a resource claim.
Functions ¶
func NewSourceApiserver ¶
func NewSourceApiserver(logger klog.Logger, c clientset.Interface, nodeName types.NodeName, nodeHasSynced func() bool, updates chan<- sourceUpdate)
NewSourceApiserver creates a config source that watches and pulls from the apiserver.
func NewSourceFile ¶
func NewSourceFile(logger klog.Logger, path string, nodeName types.NodeName, period time.Duration, updates chan<- sourceUpdate)
NewSourceFile watches a config file for changes.
func NewSourceURL ¶
func NewSourceURL(logger klog.Logger, url string, header http.Header, nodeName types.NodeName, period time.Duration, updates chan<- sourceUpdate)
NewSourceURL specifies the URL where to read the Pod configuration from, then watches it for changes.
Types ¶
type PodConfig ¶
type PodConfig struct {
// contains filtered or unexported fields
}
PodConfig is a configuration mux that merges many sources of pod configuration into a single consistent structure, and then delivers incremental change notifications to listeners in order.
func NewPodConfig ¶
func NewPodConfig(recorder record.EventRecorderLogger, startupSLIObserver podStartupSLIObserver) *PodConfig
NewPodConfig creates an object that can merge many configuration sources into a stream of normalized updates to a pod configuration.
func (*PodConfig) Channel ¶
Channel creates or returns a config source channel. The channel only accepts PodUpdates
func (*PodConfig) SeenAllSources ¶
SeenAllSources returns true if seenSources contains all sources in the config, and also this config has received a SET message from each source.
func (*PodConfig) Updates ¶
Updates returns a channel of updates to the configuration, properly denormalized.
type SourcesReady ¶
type SourcesReady interface {
// AddSource adds the specified source to the set of sources managed.
AddSource(source string)
// AllReady returns true if the currently configured sources have all been seen.
AllReady() bool
}
SourcesReady tracks the set of configured sources seen by the kubelet.
func NewSourcesReady ¶
func NewSourcesReady(sourcesReadyFn SourcesReadyFn) SourcesReady
NewSourcesReady returns a SourcesReady with the specified function.
type SourcesReadyFn ¶
SourcesReadyFn is function that returns true if the specified sources have been seen.
Source Files ¶
apiserver.go common.go config.go doc.go file.go file_linux.go http.go mux.go sources.go
- Version
- v1.36.0 (latest)
- Published
- Apr 22, 2026
- Platform
- linux/amd64
- Imports
- 43 packages
- Last checked
- 40 minutes ago –
Tools for package owners.