Documentation ¶
Index ¶
- Constants
- func AddEphemeralContainer(ctx *synccontext.SyncContext, physicalClusterClient kubernetes.Interface, ...) error
- func ConfigNamesFromContainer(namespace string, container *corev1.Container) []string
- func ConfigNamesFromEphemeralContainer(namespace string, container *corev1.EphemeralContainer) []string
- func ConfigNamesFromPod(pod *corev1.Pod) []string
- func New(ctx *synccontext.RegisterContext) (syncer.Object, error)
- func SecretNamesFromContainer(namespace string, container *corev1.Container) []string
- func SecretNamesFromEphemeralContainer(namespace string, container *corev1.EphemeralContainer) []string
- func SecretNamesFromPod(pod *corev1.Pod) []string
- func SecretNamesFromVolumes(pod *corev1.Pod) []string
- func UpdateConditions(ctx *synccontext.SyncContext, physicalPod *corev1.Pod, virtualPod *corev1.Pod) (bool, error)
- type ContainerPhysicalMountPathRegister
- type FakeMetricsRecorder
- type PodAttributes
- func (a *PodAttributes) GetKind() schema.GroupVersionKind
- func (a *PodAttributes) GetObject() (runtime.Object, error)
- func (a *PodAttributes) GetOldObject() (runtime.Object, error)
- func (a *PodAttributes) GetOperation() admissionv1.Operation
- func (a *PodAttributes) GetResource() schema.GroupVersionResource
- func (a *PodAttributes) GetSubresource() string
- func (a *PodAttributes) GetUserName() string
Constants ¶
View Source
const ( VirtualPathTemplate = "/tmp/vcluster/%s/%s" PodLoggingHostpathPath = "/var/log/pods" LogHostpathPath = "/var/log" KubeletPodPath = "/var/lib/kubelet/pods" PhysicalVolumeNameSuffix = "vcluster-physical" PhysicalLogVolumeMountPath = "/var/vcluster/physical/log" PhysicalPodLogVolumeMountPath = "/var/vcluster/physical/log/pods" PhysicalKubeletVolumeMountPath = "/var/vcluster/physical/kubelet/pods" )
Variables ¶
This section is empty.
Functions ¶
func AddEphemeralContainer ¶ added in v0.11.0
func AddEphemeralContainer(ctx *synccontext.SyncContext, physicalClusterClient kubernetes.Interface, physicalPod *corev1.Pod, virtualPod *corev1.Pod) error
AddEphemeralContainer runs an EphemeralContainer in the target Pod for use as a debug container
func ConfigNamesFromEphemeralContainer ¶
func ConfigNamesFromEphemeralContainer(namespace string, container *corev1.EphemeralContainer) []string
func ConfigNamesFromPod ¶
func New ¶ added in v0.6.0
func New(ctx *synccontext.RegisterContext) (syncer.Object, error)
func SecretNamesFromEphemeralContainer ¶
func SecretNamesFromEphemeralContainer(namespace string, container *corev1.EphemeralContainer) []string
func SecretNamesFromPod ¶
func SecretNamesFromVolumes ¶ added in v0.4.0
func UpdateConditions ¶ added in v0.11.0
func UpdateConditions(ctx *synccontext.SyncContext, physicalPod *corev1.Pod, virtualPod *corev1.Pod) (bool, error)
UpdateConditions adds/updates new/old conditions in the physical Pod
Types ¶
type ContainerPhysicalMountPathRegister ¶ added in v0.13.0
type ContainerPhysicalMountPathRegister struct { KubeletMountPath map[string]bool PodLogMountPath map[string]bool LogMountPath map[string]bool }
ContainerPhysicalMountPathRegister is a register that keeps track of the containers that already have a physical mount added to them before, so that we don't append the same mount path more than once to the same container. This is to tackle edge cases like in kubevirt where we had VolumeMounts
- mountPath: /pods name: kubelet-pods-shortened
- mountPath: /var/lib/kubelet/pods mountPropagation: Bidirectional name: kubelet-pods
and Volumes
- hostPath: path: /var/lib/kubelet/pods type: "" name: kubelet-pods-shortened
- hostPath: path: /var/lib/kubelet/pods type: "" name: kubelet-pods
causing the physical physical path to be mounted twice, one for each above virtual volumeMounts ---
- name: kubelet-pods-shortened-vcluster-physical mountPath: "/var/vcluster/physical/kubelet/pods"
- name: kubelet-pods-vcluster-physical mountPath: "/var/vcluster/physical/kubelet/pods" mountPropagation: Bidirectional
type FakeMetricsRecorder ¶ added in v0.7.0
type FakeMetricsRecorder struct{}
func (*FakeMetricsRecorder) RecordError ¶ added in v0.7.0
func (n *FakeMetricsRecorder) RecordError(_ bool, _ api.Attributes)
func (*FakeMetricsRecorder) RecordEvaluation ¶ added in v0.7.0
func (n *FakeMetricsRecorder) RecordEvaluation(_ metrics.Decision, _ api.LevelVersion, _ metrics.Mode, _ api.Attributes)
func (*FakeMetricsRecorder) RecordExemption ¶ added in v0.7.0
func (n *FakeMetricsRecorder) RecordExemption(api.Attributes)
type PodAttributes ¶ added in v0.7.0
func (*PodAttributes) GetKind ¶ added in v0.7.0
func (a *PodAttributes) GetKind() schema.GroupVersionKind
func (*PodAttributes) GetObject ¶ added in v0.7.0
func (a *PodAttributes) GetObject() (runtime.Object, error)
func (*PodAttributes) GetOldObject ¶ added in v0.7.0
func (a *PodAttributes) GetOldObject() (runtime.Object, error)
func (*PodAttributes) GetOperation ¶ added in v0.7.0
func (a *PodAttributes) GetOperation() admissionv1.Operation
func (*PodAttributes) GetResource ¶ added in v0.7.0
func (a *PodAttributes) GetResource() schema.GroupVersionResource
func (*PodAttributes) GetSubresource ¶ added in v0.7.0
func (a *PodAttributes) GetSubresource() string
func (*PodAttributes) GetUserName ¶ added in v0.7.0
func (a *PodAttributes) GetUserName() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.