// getRootDir returns the full path to the directory under which kubelet can // store data. These functions are useful to pass interfaces to other modules // that may need to know where to write data without getting a whole kubelet // instance. func (kl *Kubelet) getRootDir() string { … } // getPodLogsDir returns the full path to the directory that kubelet can use // to store pod's log files. This defaults to /var/log/pods if not specified // otherwise in the config file. func (kl *Kubelet) getPodLogsDir() string { … } // getPodsDir returns the full path to the directory under which pod // directories are created. func (kl *Kubelet) getPodsDir() string { … } // getPluginsDir returns the full path to the directory under which plugin // directories are created. Plugins can use these directories for data that // they need to persist. Plugins should create subdirectories under this named // after their own names. func (kl *Kubelet) getPluginsDir() string { … } // getPluginsRegistrationDir returns the full path to the directory under which // plugins socket should be placed to be registered. // More information is available about plugin registration in the pluginwatcher // module func (kl *Kubelet) getPluginsRegistrationDir() string { … } // getPluginDir returns a data directory name for a given plugin name. // Plugins can use these directories to store data that they need to persist. // For per-pod plugin data, see getPodPluginDir. func (kl *Kubelet) getPluginDir(pluginName string) string { … } // getCheckpointsDir returns a data directory name for checkpoints. // Checkpoints can be stored in this directory for further use. func (kl *Kubelet) getCheckpointsDir() string { … } // getVolumeDevicePluginsDir returns the full path to the directory under which plugin // directories are created. Plugins can use these directories for data that // they need to persist. Plugins should create subdirectories under this named // after their own names. func (kl *Kubelet) getVolumeDevicePluginsDir() string { … } // getVolumeDevicePluginDir returns a data directory name for a given plugin name. // Plugins can use these directories to store data that they need to persist. // For per-pod plugin data, see getVolumeDevicePluginsDir. func (kl *Kubelet) getVolumeDevicePluginDir(pluginName string) string { … } // GetPodDir returns the full path to the per-pod data directory for the // specified pod. This directory may not exist if the pod does not exist. func (kl *Kubelet) GetPodDir(podUID types.UID) string { … } // ListPodsFromDisk gets a list of pods that have data directories. func (kl *Kubelet) ListPodsFromDisk() ([]types.UID, error) { … } // HandlerSupportsUserNamespaces checks whether the specified handler supports // user namespaces. func (kl *Kubelet) HandlerSupportsUserNamespaces(rtHandler string) (bool, error) { … } // GetKubeletMappings gets the additional IDs allocated for the Kubelet. func (kl *Kubelet) GetKubeletMappings() (uint32, uint32, error) { … } func (kl *Kubelet) GetMaxPods() int { … } // getPodDir returns the full path to the per-pod directory for the pod with // the given UID. func (kl *Kubelet) getPodDir(podUID types.UID) string { … } // getPodVolumesSubpathsDir returns the full path to the per-pod subpaths directory under // which subpath volumes are created for the specified pod. This directory may not // exist if the pod does not exist or subpaths are not specified. func (kl *Kubelet) getPodVolumeSubpathsDir(podUID types.UID) string { … } // getPodVolumesDir returns the full path to the per-pod data directory under // which volumes are created for the specified pod. This directory may not // exist if the pod does not exist. func (kl *Kubelet) getPodVolumesDir(podUID types.UID) string { … } // getPodVolumeDir returns the full path to the directory which represents the // named volume under the named plugin for specified pod. This directory may not // exist if the pod does not exist. func (kl *Kubelet) getPodVolumeDir(podUID types.UID, pluginName string, volumeName string) string { … } // getPodVolumeDevicesDir returns the full path to the per-pod data directory under // which volumes are created for the specified pod. This directory may not // exist if the pod does not exist. func (kl *Kubelet) getPodVolumeDevicesDir(podUID types.UID) string { … } // getPodVolumeDeviceDir returns the full path to the directory which represents the // named plugin for specified pod. This directory may not exist if the pod does not exist. func (kl *Kubelet) getPodVolumeDeviceDir(podUID types.UID, pluginName string) string { … } // getPodPluginsDir returns the full path to the per-pod data directory under // which plugins may store data for the specified pod. This directory may not // exist if the pod does not exist. func (kl *Kubelet) getPodPluginsDir(podUID types.UID) string { … } // getPodPluginDir returns a data directory name for a given plugin name for a // given pod UID. Plugins can use these directories to store data that they // need to persist. For non-per-pod plugin data, see getPluginDir. func (kl *Kubelet) getPodPluginDir(podUID types.UID, pluginName string) string { … } // getPodContainerDir returns the full path to the per-pod data directory under // which container data is held for the specified pod. This directory may not // exist if the pod or container does not exist. func (kl *Kubelet) getPodContainerDir(podUID types.UID, ctrName string) string { … } // getPodResourcesSocket returns the full path to the directory containing the pod resources socket func (kl *Kubelet) getPodResourcesDir() string { … } // GetPods returns all pods bound to the kubelet and their spec, and the mirror // pods. func (kl *Kubelet) GetPods() []*v1.Pod { … } // GetRunningPods returns all pods running on kubelet from looking at the // container runtime cache. This function converts kubecontainer.Pod to // v1.Pod, so only the fields that exist in both kubecontainer.Pod and // v1.Pod are considered meaningful. func (kl *Kubelet) GetRunningPods(ctx context.Context) ([]*v1.Pod, error) { … } // GetPodByFullName gets the pod with the given 'full' name, which // incorporates the namespace as well as whether the pod was found. func (kl *Kubelet) GetPodByFullName(podFullName string) (*v1.Pod, bool) { … } // GetPodByName provides the first pod that matches namespace and name, as well // as whether the pod was found. func (kl *Kubelet) GetPodByName(namespace, name string) (*v1.Pod, bool) { … } // GetPodByCgroupfs provides the pod that maps to the specified cgroup, as well // as whether the pod was found. func (kl *Kubelet) GetPodByCgroupfs(cgroupfs string) (*v1.Pod, bool) { … } // GetHostname Returns the hostname as the kubelet sees it. func (kl *Kubelet) GetHostname() string { … } // getRuntime returns the current Runtime implementation in use by the kubelet. func (kl *Kubelet) getRuntime() kubecontainer.Runtime { … } // GetNode returns the node info for the configured node name of this Kubelet. func (kl *Kubelet) GetNode() (*v1.Node, error) { … } // getNodeAnyWay() must return a *v1.Node which is required by RunGeneralPredicates(). // The *v1.Node is obtained as follows: // Return kubelet's nodeInfo for this node, except on error or if in standalone mode, // in which case return a manufactured nodeInfo representing a node with no pods, // zero capacity, and the default labels. func (kl *Kubelet) getNodeAnyWay() (*v1.Node, error) { … } // GetNodeConfig returns the container manager node config. func (kl *Kubelet) GetNodeConfig() cm.NodeConfig { … } // GetPodCgroupRoot returns the listeral cgroupfs value for the cgroup containing all pods func (kl *Kubelet) GetPodCgroupRoot() string { … } // GetHostIPs returns host IPs or nil in case of error. func (kl *Kubelet) GetHostIPs() ([]net.IP, error) { … } // getHostIPsAnyWay attempts to return the host IPs from kubelet's nodeInfo, or // the initialNode. func (kl *Kubelet) getHostIPsAnyWay() ([]net.IP, error) { … } // GetExtraSupplementalGroupsForPod returns a list of the extra // supplemental groups for the Pod. These extra supplemental groups come // from annotations on persistent volumes that the pod depends on. func (kl *Kubelet) GetExtraSupplementalGroupsForPod(pod *v1.Pod) []int64 { … } // getPodVolumePathListFromDisk returns a list of the volume paths by reading the // volume directories for the given pod from the disk. func (kl *Kubelet) getPodVolumePathListFromDisk(podUID types.UID) ([]string, error) { … } func (kl *Kubelet) getMountedVolumePathListFromDisk(podUID types.UID) ([]string, error) { … } // getPodVolumeSubpathListFromDisk returns a list of the volume-subpath paths by reading the // subpath directories for the given pod from the disk. func (kl *Kubelet) getPodVolumeSubpathListFromDisk(podUID types.UID) ([]string, error) { … } // GetRequestedContainersInfo returns container info. func (kl *Kubelet) GetRequestedContainersInfo(containerName string, options cadvisorv2.RequestOptions) (map[string]*cadvisorapiv1.ContainerInfo, error) { … } // GetVersionInfo returns information about the version of cAdvisor in use. func (kl *Kubelet) GetVersionInfo() (*cadvisorapiv1.VersionInfo, error) { … } // GetCachedMachineInfo assumes that the machine info can't change without a reboot func (kl *Kubelet) GetCachedMachineInfo() (*cadvisorapiv1.MachineInfo, error) { … } func (kl *Kubelet) setCachedMachineInfo(info *cadvisorapiv1.MachineInfo) { … }