Documentation ¶
Overview ¶
Package pod
Index ¶
- Constants
- type JobScheduleFunc
- type KubeResouceManager
- type Manager
- func (m *Manager) Close()
- func (m *Manager) CreateDevicePod(pod *corev1.Pod) error
- func (m *Manager) DeleteDevicePod(podUID types.UID) error
- func (m *Manager) HandleGetPods(w http.ResponseWriter, r *http.Request)
- func (m *Manager) HandleGetRunningPods(w http.ResponseWriter, r *http.Request)
- func (m *Manager) HandleHostLog(w http.ResponseWriter, r *http.Request)
- func (m *Manager) HandlePodAttach(w http.ResponseWriter, r *http.Request)
- func (m *Manager) HandlePodExec(w http.ResponseWriter, r *http.Request)
- func (m *Manager) HandlePodLog(w http.ResponseWriter, r *http.Request)
- func (m *Manager) HandlePodPortForward(w http.ResponseWriter, r *http.Request)
- func (m *Manager) KubePodManagerForVolumeManager() pod.Manager
- func (m *Manager) KubePodStatusProviderForVolumeManager() storage.PodStateProvider
- func (m *Manager) KubeRuntimeForVolumeManager() kubecontainer.Runtime
- func (m *Manager) SchedulePodJob(action queue.JobAction, oldPod, newPod *corev1.Pod) error
- func (m *Manager) Start() error
- func (m *Manager) StorageEnabled() bool
- func (m *Manager) SyncDevicePods() error
- func (m *Manager) UpdateMirrorPod(pod *corev1.Pod, devicePodStatus *runtimepb.PodStatusMsg, ...) error
- func (m *Manager) UpdatePodStatus(pod *corev1.Pod) (*corev1.Pod, error)
- type Options
- type PeripheralManager
Constants ¶
const ( PathParamPodName = "name" PathParamPodUID = "uid" PathParamContainer = "container" )
PathParams http path var
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobScheduleFunc ¶
type KubeResouceManager ¶
type KubeResouceManager interface { GetNode(name string) *corev1.Node GetPod(name string) *corev1.Pod GetConfigMap(name string) *corev1.ConfigMap GetSecret(name string) *corev1.Secret ListServices() []*corev1.Service GetVirtualPod(name string) *corev1.Pod UpdateVirtualPodStatus(name string, virtualpod *corev1.Pod) }
KubeResouceManager
type Manager ¶
type Manager struct { *manager.BaseManager // storage related funcs PrepareStorage func(pod *corev1.Pod, volumeInUse []corev1.UniqueVolumeName) error CleanupStorage func(pod *corev1.Pod) error GetPersistentVolumeMountPath func(podUID types.UID, pvName string) string // contains filtered or unexported fields }
Manager the pod manager, controls pod workload assignment and pod command execution
func NewManager ¶
func NewManager( parentCtx context.Context, name, hostIP string, client kubeclient.Interface, networkManager *network.Manager, connectivityManager connectivity.Manager, peripheralManager PeripheralManager, options *Options, ) *Manager
NewManager creates a new pod manager for virtual node
func (*Manager) CreateDevicePod ¶
CreateDevicePod handle both pod resource resolution and create pod in edge device nolint:gocyclo
func (*Manager) DeleteDevicePod ¶
DeleteDevicePod delete pod in edge device
func (*Manager) HandleGetPods ¶
func (m *Manager) HandleGetPods(w http.ResponseWriter, r *http.Request)
func (*Manager) HandleGetRunningPods ¶
func (m *Manager) HandleGetRunningPods(w http.ResponseWriter, r *http.Request)
func (*Manager) HandleHostLog ¶
func (m *Manager) HandleHostLog(w http.ResponseWriter, r *http.Request)
func (*Manager) HandlePodAttach ¶
func (m *Manager) HandlePodAttach(w http.ResponseWriter, r *http.Request)
HandlePodAttach proxy http based kubectl attach command to edge device
func (*Manager) HandlePodExec ¶
func (m *Manager) HandlePodExec(w http.ResponseWriter, r *http.Request)
HandlePodExec proxy http based kubectl exec command to edge device
func (*Manager) HandlePodLog ¶
func (m *Manager) HandlePodLog(w http.ResponseWriter, r *http.Request)
HandlePodLog proxy http based kubectl logs command to edge device
func (*Manager) HandlePodPortForward ¶
func (m *Manager) HandlePodPortForward(w http.ResponseWriter, r *http.Request)
HandlePodPortForward proxy http based kubectl port-forward command to edge device
func (*Manager) KubePodManagerForVolumeManager ¶
func (*Manager) KubePodStatusProviderForVolumeManager ¶
func (m *Manager) KubePodStatusProviderForVolumeManager() storage.PodStateProvider
func (*Manager) KubeRuntimeForVolumeManager ¶
func (m *Manager) KubeRuntimeForVolumeManager() kubecontainer.Runtime
func (*Manager) SchedulePodJob ¶
func (*Manager) SyncDevicePods ¶
SyncDevicePods sync all pods in device with Kubernetes cluster
type Options ¶
type Options struct { Config conf.VNPod KRM KubeResouceManager EventRecorder record.EventRecorder }
Source Files ¶
- devpod_actions.go
- devpod_http_handler.go
- devpod_http_port_forward.go
- devpod_reconcile.go
- doc.go
- logs.go
- manager.go
- resolve_dns.go
- resolve_env.go
- resolve_image_pull_secret.go
- resolve_volume_data.go
- respod_admission.go
- respod_compare.go
- respod_finalizers.go
- respod_helper.go
- respod_http_handler.go
- respod_reconcile.go
- respod_translate.go
- respod_translate_network.go
- respod_virtual.go
- respod_volume.go
- zz_dummy_kube_impl.go