mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #78110 from praseodym/fix-golint-pkg/kubelet/qos
Fix golint failures of pkg/kubelet/qos
This commit is contained in:
		@@ -131,7 +131,6 @@ pkg/kubelet/lifecycle
 | 
				
			|||||||
pkg/kubelet/pluginmanager/pluginwatcher
 | 
					pkg/kubelet/pluginmanager/pluginwatcher
 | 
				
			||||||
pkg/kubelet/pod/testing
 | 
					pkg/kubelet/pod/testing
 | 
				
			||||||
pkg/kubelet/preemption
 | 
					pkg/kubelet/preemption
 | 
				
			||||||
pkg/kubelet/qos
 | 
					 | 
				
			||||||
pkg/kubelet/remote
 | 
					pkg/kubelet/remote
 | 
				
			||||||
pkg/kubelet/stats
 | 
					pkg/kubelet/stats
 | 
				
			||||||
pkg/kubelet/status
 | 
					pkg/kubelet/status
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 | 
				
			|||||||
limitations under the License.
 | 
					limitations under the License.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// package qos contains helper functions for quality of service.
 | 
					// Package qos contains helper functions for quality of service.
 | 
				
			||||||
// For each resource (memory, CPU) Kubelet supports three classes of containers.
 | 
					// For each resource (memory, CPU) Kubelet supports three classes of containers.
 | 
				
			||||||
// Memory guaranteed containers will receive the highest priority and will get all the resources
 | 
					// Memory guaranteed containers will receive the highest priority and will get all the resources
 | 
				
			||||||
// they need.
 | 
					// they need.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,14 +28,17 @@ const (
 | 
				
			|||||||
	// without a process.
 | 
						// without a process.
 | 
				
			||||||
	// TODO: Handle infra container oom score adj in a runtime agnostic way.
 | 
						// TODO: Handle infra container oom score adj in a runtime agnostic way.
 | 
				
			||||||
	PodInfraOOMAdj int = -998
 | 
						PodInfraOOMAdj int = -998
 | 
				
			||||||
 | 
						// KubeletOOMScoreAdj is the OOM score adjustment for Kubelet
 | 
				
			||||||
	KubeletOOMScoreAdj int = -999
 | 
						KubeletOOMScoreAdj int = -999
 | 
				
			||||||
 | 
						// DockerOOMScoreAdj is the OOM score adjustment for Docker
 | 
				
			||||||
	DockerOOMScoreAdj int = -999
 | 
						DockerOOMScoreAdj int = -999
 | 
				
			||||||
 | 
						// KubeProxyOOMScoreAdj is the OOM score adjustment for kube-proxy
 | 
				
			||||||
	KubeProxyOOMScoreAdj  int = -999
 | 
						KubeProxyOOMScoreAdj  int = -999
 | 
				
			||||||
	guaranteedOOMScoreAdj int = -998
 | 
						guaranteedOOMScoreAdj int = -998
 | 
				
			||||||
	besteffortOOMScoreAdj int = 1000
 | 
						besteffortOOMScoreAdj int = 1000
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// GetContainerOOMAdjust returns the amount by which the OOM score of all processes in the
 | 
					// GetContainerOOMScoreAdjust returns the amount by which the OOM score of all processes in the
 | 
				
			||||||
// container should be adjusted.
 | 
					// container should be adjusted.
 | 
				
			||||||
// The OOM score of a process is the percentage of memory it consumes
 | 
					// The OOM score of a process is the percentage of memory it consumes
 | 
				
			||||||
// multiplied by 10 (barring exceptional cases) + a configurable quantity which is between -1000
 | 
					// multiplied by 10 (barring exceptional cases) + a configurable quantity which is between -1000
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user