From e60c71b4352342cc6011dc7d21707d9c1a648aa2 Mon Sep 17 00:00:00 2001 From: Monis Khan Date: Tue, 29 Mar 2022 11:19:33 -0400 Subject: [PATCH] Give kube-cert-agent more resources Signed-off-by: Monis Khan --- internal/controller/kubecertagent/kubecertagent.go | 12 ++++++------ .../controller/kubecertagent/kubecertagent_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/controller/kubecertagent/kubecertagent.go b/internal/controller/kubecertagent/kubecertagent.go index 8408005b..230cf0ba 100644 --- a/internal/controller/kubecertagent/kubecertagent.go +++ b/internal/controller/kubecertagent/kubecertagent.go @@ -145,12 +145,12 @@ type agentController struct { var ( // controllerManagerLabels are the Kubernetes labels we expect on the kube-controller-manager Pod. - controllerManagerLabels = labels.SelectorFromSet(map[string]string{ //nolint: gochecknoglobals + controllerManagerLabels = labels.SelectorFromSet(map[string]string{ // nolint: gochecknoglobals "component": "kube-controller-manager", }) // agentLabels are the Kubernetes labels we always expect on the kube-controller-manager Pod. - agentLabels = labels.SelectorFromSet(map[string]string{ //nolint: gochecknoglobals + agentLabels = labels.SelectorFromSet(map[string]string{ // nolint: gochecknoglobals agentPodLabelKey: agentPodLabelValue, }) ) @@ -543,12 +543,12 @@ func (c *agentController) newAgentDeployment(controllerManagerPod *corev1.Pod) * }, Resources: corev1.ResourceRequirements{ Limits: corev1.ResourceList{ - corev1.ResourceMemory: resource.MustParse("16Mi"), - corev1.ResourceCPU: resource.MustParse("10m"), + corev1.ResourceMemory: resource.MustParse("32Mi"), + corev1.ResourceCPU: resource.MustParse("20m"), }, Requests: corev1.ResourceList{ - corev1.ResourceMemory: resource.MustParse("16Mi"), - corev1.ResourceCPU: resource.MustParse("10m"), + corev1.ResourceMemory: resource.MustParse("32Mi"), + corev1.ResourceCPU: resource.MustParse("20m"), }, }, }, diff --git a/internal/controller/kubecertagent/kubecertagent_test.go b/internal/controller/kubecertagent/kubecertagent_test.go index ee382458..38736213 100644 --- a/internal/controller/kubecertagent/kubecertagent_test.go +++ b/internal/controller/kubecertagent/kubecertagent_test.go @@ -120,12 +120,12 @@ func TestAgentController(t *testing.T) { }}, Resources: corev1.ResourceRequirements{ Limits: corev1.ResourceList{ - corev1.ResourceMemory: resource.MustParse("16Mi"), - corev1.ResourceCPU: resource.MustParse("10m"), + corev1.ResourceMemory: resource.MustParse("32Mi"), + corev1.ResourceCPU: resource.MustParse("20m"), }, Requests: corev1.ResourceList{ - corev1.ResourceMemory: resource.MustParse("16Mi"), - corev1.ResourceCPU: resource.MustParse("10m"), + corev1.ResourceMemory: resource.MustParse("32Mi"), + corev1.ResourceCPU: resource.MustParse("20m"), }, }, ImagePullPolicy: corev1.PullIfNotPresent, @@ -1028,7 +1028,7 @@ func TestAgentController(t *testing.T) { } kubeInformers := informers.NewSharedInformerFactory(kubeClientset, 0) - log := testlogger.NewLegacy(t) //nolint: staticcheck // old test with lots of log statements + log := testlogger.NewLegacy(t) // nolint: staticcheck // old test with lots of log statements ctrl := gomock.NewController(t) defer ctrl.Finish() @@ -1106,7 +1106,7 @@ func TestAgentController(t *testing.T) { require.NoError(t, err) if tt.wantAgentDeployment == nil { assert.Empty(t, deployments.Items, "did not expect an agent deployment") - } else { //nolint: gocritic + } else { // nolint: gocritic if assert.Len(t, deployments.Items, 1, "expected a single agent deployment") { assert.Equal(t, tt.wantAgentDeployment, &deployments.Items[0]) }