mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
comment should have function name as prefix
This commit is contained in:
parent
d483872d64
commit
bebca30309
@ -95,7 +95,7 @@ type Runtime interface {
|
||||
// that are terminated, but not deleted will be evicted. Otherwise, only deleted pods will be GC'd.
|
||||
// TODO: Revisit this method and make it cleaner.
|
||||
GarbageCollect(gcPolicy GCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error
|
||||
// Syncs the running pod into the desired pod.
|
||||
// SyncPod syncs the running pod into the desired pod.
|
||||
SyncPod(pod *v1.Pod, podStatus *PodStatus, pullSecrets []v1.Secret, backOff *flowcontrol.Backoff) PodSyncResult
|
||||
// KillPod kills all the containers of a pod. Pod may be nil, running pod must not be.
|
||||
// TODO(random-liu): Return PodSyncResult in KillPod.
|
||||
@ -112,7 +112,7 @@ type Runtime interface {
|
||||
// stream the log. Set 'follow' to false and specify the number of lines (e.g.
|
||||
// "100" or "all") to tail the log.
|
||||
GetContainerLogs(ctx context.Context, pod *v1.Pod, containerID ContainerID, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) (err error)
|
||||
// Delete a container. If the container is still running, an error is returned.
|
||||
// DeleteContainer deletes a container. If the container is still running, an error is returned.
|
||||
DeleteContainer(containerID ContainerID) error
|
||||
// ImageService provides methods to image-related methods.
|
||||
ImageService
|
||||
@ -139,11 +139,11 @@ type ImageService interface {
|
||||
// GetImageRef gets the reference (digest or ID) of the image which has already been in
|
||||
// the local storage. It returns ("", nil) if the image isn't in the local storage.
|
||||
GetImageRef(image ImageSpec) (string, error)
|
||||
// Gets all images currently on the machine.
|
||||
// ListImages gets all images currently on the machine.
|
||||
ListImages() ([]Image, error)
|
||||
// Removes the specified image.
|
||||
// RemoveImage removes the specified image.
|
||||
RemoveImage(image ImageSpec) error
|
||||
// Returns Image statistics.
|
||||
// ImageStats returns Image statistics.
|
||||
ImageStats() (*ImageStats, error)
|
||||
}
|
||||
|
||||
|
@ -1156,7 +1156,7 @@ type PodKiller interface {
|
||||
// PerformPodKillingWork performs the actual pod killing work via calling CRI
|
||||
// It returns after its Close() func is called and all outstanding pod killing requests are served
|
||||
PerformPodKillingWork()
|
||||
// After Close() is called, this pod killer wouldn't accept any more pod killing requests
|
||||
// Close ensures that after it's called, then this pod killer wouldn't accept any more pod killing requests
|
||||
Close()
|
||||
// IsPodPendingTerminationByPodName checks whether any pod for the given full pod name is pending termination (thread safe)
|
||||
IsPodPendingTerminationByPodName(podFullname string) bool
|
||||
@ -1205,7 +1205,7 @@ func (pk *podKillerWithChannel) IsPodPendingTerminationByUID(uid types.UID) bool
|
||||
return false
|
||||
}
|
||||
|
||||
// IsMirrorPodPendingTerminationByPodName checks whether the given pod is in grace period of termination
|
||||
// IsPodPendingTerminationByPodName checks whether the given pod is in grace period of termination
|
||||
func (pk *podKillerWithChannel) IsPodPendingTerminationByPodName(podFullname string) bool {
|
||||
pk.podKillingLock.RLock()
|
||||
defer pk.podKillingLock.RUnlock()
|
||||
|
@ -658,7 +658,7 @@ func (m *kubeGenericRuntimeManager) killContainer(pod *v1.Pod, containerID kubec
|
||||
"containerName", containerName, "containerID", containerID.String(), "gracePeriod", gracePeriod)
|
||||
}
|
||||
|
||||
klog.V(2).InfoS("Killing container with a grace period override", "pod", klog.KObj(pod), "podUID", pod.UID,
|
||||
klog.V(2).InfoS("Killing container with a grace period", "pod", klog.KObj(pod), "podUID", pod.UID,
|
||||
"containerName", containerName, "containerID", containerID.String(), "gracePeriod", gracePeriod)
|
||||
|
||||
err := m.runtimeService.StopContainer(containerID.ID, gracePeriod)
|
||||
|
@ -152,7 +152,7 @@ type KubeGenericRuntime interface {
|
||||
|
||||
// LegacyLogProvider gives the ability to use unsupported docker log drivers (e.g. journald)
|
||||
type LegacyLogProvider interface {
|
||||
// Get the last few lines of the logs for a specific container.
|
||||
// GetContainerLogTail gets the last few lines of the logs for a specific container.
|
||||
GetContainerLogTail(uid kubetypes.UID, name, namespace string, containerID kubecontainer.ContainerID) (string, error)
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ func (p *podWorkers) managePodLoop(podUpdates <-chan UpdatePodOptions) {
|
||||
}
|
||||
}
|
||||
|
||||
// Apply the new setting to the specified pod.
|
||||
// UpdatePod apply the new setting to the specified pod.
|
||||
// If the options provide an OnCompleteFunc, the function is invoked if the update is accepted.
|
||||
// Update requests are ignored if a kill pod request is pending.
|
||||
func (p *podWorkers) UpdatePod(options *UpdatePodOptions) {
|
||||
|
Loading…
Reference in New Issue
Block a user