mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	comment should have function name as prefix
This commit is contained in:
		@@ -95,7 +95,7 @@ type Runtime interface {
 | 
				
			|||||||
	// that are terminated, but not deleted will be evicted.  Otherwise, only deleted pods will be GC'd.
 | 
						// 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.
 | 
						// TODO: Revisit this method and make it cleaner.
 | 
				
			||||||
	GarbageCollect(gcPolicy GCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error
 | 
						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
 | 
						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.
 | 
						// KillPod kills all the containers of a pod. Pod may be nil, running pod must not be.
 | 
				
			||||||
	// TODO(random-liu): Return PodSyncResult in KillPod.
 | 
						// 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.
 | 
						// stream the log. Set 'follow' to false and specify the number of lines (e.g.
 | 
				
			||||||
	// "100" or "all") to tail the log.
 | 
						// "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)
 | 
						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
 | 
						DeleteContainer(containerID ContainerID) error
 | 
				
			||||||
	// ImageService provides methods to image-related methods.
 | 
						// ImageService provides methods to image-related methods.
 | 
				
			||||||
	ImageService
 | 
						ImageService
 | 
				
			||||||
@@ -139,11 +139,11 @@ type ImageService interface {
 | 
				
			|||||||
	// GetImageRef gets the reference (digest or ID) of the image which has already been in
 | 
						// 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.
 | 
						// the local storage. It returns ("", nil) if the image isn't in the local storage.
 | 
				
			||||||
	GetImageRef(image ImageSpec) (string, error)
 | 
						GetImageRef(image ImageSpec) (string, error)
 | 
				
			||||||
	// Gets all images currently on the machine.
 | 
						// ListImages gets all images currently on the machine.
 | 
				
			||||||
	ListImages() ([]Image, error)
 | 
						ListImages() ([]Image, error)
 | 
				
			||||||
	// Removes the specified image.
 | 
						// RemoveImage removes the specified image.
 | 
				
			||||||
	RemoveImage(image ImageSpec) error
 | 
						RemoveImage(image ImageSpec) error
 | 
				
			||||||
	// Returns Image statistics.
 | 
						// ImageStats returns Image statistics.
 | 
				
			||||||
	ImageStats() (*ImageStats, error)
 | 
						ImageStats() (*ImageStats, error)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1156,7 +1156,7 @@ type PodKiller interface {
 | 
				
			|||||||
	// PerformPodKillingWork performs the actual pod killing work via calling CRI
 | 
						// 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
 | 
						// It returns after its Close() func is called and all outstanding pod killing requests are served
 | 
				
			||||||
	PerformPodKillingWork()
 | 
						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()
 | 
						Close()
 | 
				
			||||||
	// IsPodPendingTerminationByPodName checks whether any pod for the given full pod name is pending termination (thread safe)
 | 
						// IsPodPendingTerminationByPodName checks whether any pod for the given full pod name is pending termination (thread safe)
 | 
				
			||||||
	IsPodPendingTerminationByPodName(podFullname string) bool
 | 
						IsPodPendingTerminationByPodName(podFullname string) bool
 | 
				
			||||||
@@ -1205,7 +1205,7 @@ func (pk *podKillerWithChannel) IsPodPendingTerminationByUID(uid types.UID) bool
 | 
				
			|||||||
	return false
 | 
						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 {
 | 
					func (pk *podKillerWithChannel) IsPodPendingTerminationByPodName(podFullname string) bool {
 | 
				
			||||||
	pk.podKillingLock.RLock()
 | 
						pk.podKillingLock.RLock()
 | 
				
			||||||
	defer pk.podKillingLock.RUnlock()
 | 
						defer pk.podKillingLock.RUnlock()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -658,7 +658,7 @@ func (m *kubeGenericRuntimeManager) killContainer(pod *v1.Pod, containerID kubec
 | 
				
			|||||||
			"containerName", containerName, "containerID", containerID.String(), "gracePeriod", gracePeriod)
 | 
								"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)
 | 
							"containerName", containerName, "containerID", containerID.String(), "gracePeriod", gracePeriod)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err := m.runtimeService.StopContainer(containerID.ID, 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)
 | 
					// LegacyLogProvider gives the ability to use unsupported docker log drivers (e.g. journald)
 | 
				
			||||||
type LegacyLogProvider interface {
 | 
					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)
 | 
						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.
 | 
					// 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.
 | 
					// Update requests are ignored if a kill pod request is pending.
 | 
				
			||||||
func (p *podWorkers) UpdatePod(options *UpdatePodOptions) {
 | 
					func (p *podWorkers) UpdatePod(options *UpdatePodOptions) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user