resource

package
v0.0.0-...-92a9ebf Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 14 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeResourceManager

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

KubeResourceManager acts as a passthrough to a cache (lister) for pods assigned to the current node. It is also a passthrough to a cache (lister) for Kubernetes secrets and config maps.

func (*KubeResourceManager) GetConfigMap

func (rm *KubeResourceManager) GetConfigMap(name string) (*v1.ConfigMap, error)

func (*KubeResourceManager) GetNode

func (rm *KubeResourceManager) GetNode(name string) (*v1.Node, error)

func (*KubeResourceManager) GetPod

func (rm *KubeResourceManager) GetPod(name string) (*v1.Pod, error)

func (*KubeResourceManager) GetSecret

func (rm *KubeResourceManager) GetSecret(name string) (*v1.Secret, error)

type VolumeHelper

type VolumeHelper interface {
	GetPodVolumesDir(podUID types.UID) string
}

type VolumeInfo

type VolumeInfo struct {
	HostPath       string
	ReadOnly       bool
	Managed        bool
	SELinuxRelabel bool
}

type VolumeManager

type VolumeManager struct {
	ResourceManager *KubeResourceManager
	// contains filtered or unexported fields
}

VolumeManager Volume has an explicit lifetime - the same as the Pod that encloses it. Consequently, a volume outlives any Containers that run within the Pod, and data is preserved across Container restarts. Of course, when a Pod ceases to exist, the volume will cease to exist, too.

func NewVolumeManager

func NewVolumeManager(rm *KubeResourceManager, volumeHelper VolumeHelper) *VolumeManager

func (*VolumeManager) GetMountedVolumesForPod

func (vm *VolumeManager) GetMountedVolumesForPod(podUID types.UID) VolumeMap

func (*VolumeManager) MountVolumesForPod

func (vm *VolumeManager) MountVolumesForPod(pod *v1.Pod) error

func (*VolumeManager) UnmountVolumesForPod

func (vm *VolumeManager) UnmountVolumesForPod(podUID types.UID)

type VolumeMap

type VolumeMap map[string]VolumeInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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