Give kube-cert-agent more resources

Signed-off-by: Monis Khan <mok@vmware.com>
This commit is contained in:
Monis Khan 2022-03-29 11:19:33 -04:00
parent 40d27f011b
commit e60c71b435
No known key found for this signature in database
GPG Key ID: 52C90ADA01B269B8
2 changed files with 12 additions and 12 deletions

View File

@ -145,12 +145,12 @@ type agentController struct {
var ( var (
// controllerManagerLabels are the Kubernetes labels we expect on the kube-controller-manager Pod. // 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", "component": "kube-controller-manager",
}) })
// agentLabels are the Kubernetes labels we always expect on the kube-controller-manager Pod. // 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, agentPodLabelKey: agentPodLabelValue,
}) })
) )
@ -543,12 +543,12 @@ func (c *agentController) newAgentDeployment(controllerManagerPod *corev1.Pod) *
}, },
Resources: corev1.ResourceRequirements{ Resources: corev1.ResourceRequirements{
Limits: corev1.ResourceList{ Limits: corev1.ResourceList{
corev1.ResourceMemory: resource.MustParse("16Mi"), corev1.ResourceMemory: resource.MustParse("32Mi"),
corev1.ResourceCPU: resource.MustParse("10m"), corev1.ResourceCPU: resource.MustParse("20m"),
}, },
Requests: corev1.ResourceList{ Requests: corev1.ResourceList{
corev1.ResourceMemory: resource.MustParse("16Mi"), corev1.ResourceMemory: resource.MustParse("32Mi"),
corev1.ResourceCPU: resource.MustParse("10m"), corev1.ResourceCPU: resource.MustParse("20m"),
}, },
}, },
}, },

View File

@ -120,12 +120,12 @@ func TestAgentController(t *testing.T) {
}}, }},
Resources: corev1.ResourceRequirements{ Resources: corev1.ResourceRequirements{
Limits: corev1.ResourceList{ Limits: corev1.ResourceList{
corev1.ResourceMemory: resource.MustParse("16Mi"), corev1.ResourceMemory: resource.MustParse("32Mi"),
corev1.ResourceCPU: resource.MustParse("10m"), corev1.ResourceCPU: resource.MustParse("20m"),
}, },
Requests: corev1.ResourceList{ Requests: corev1.ResourceList{
corev1.ResourceMemory: resource.MustParse("16Mi"), corev1.ResourceMemory: resource.MustParse("32Mi"),
corev1.ResourceCPU: resource.MustParse("10m"), corev1.ResourceCPU: resource.MustParse("20m"),
}, },
}, },
ImagePullPolicy: corev1.PullIfNotPresent, ImagePullPolicy: corev1.PullIfNotPresent,
@ -1028,7 +1028,7 @@ func TestAgentController(t *testing.T) {
} }
kubeInformers := informers.NewSharedInformerFactory(kubeClientset, 0) 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) ctrl := gomock.NewController(t)
defer ctrl.Finish() defer ctrl.Finish()
@ -1106,7 +1106,7 @@ func TestAgentController(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
if tt.wantAgentDeployment == nil { if tt.wantAgentDeployment == nil {
assert.Empty(t, deployments.Items, "did not expect an agent deployment") 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") { if assert.Len(t, deployments.Items, 1, "expected a single agent deployment") {
assert.Equal(t, tt.wantAgentDeployment, &deployments.Items[0]) assert.Equal(t, tt.wantAgentDeployment, &deployments.Items[0])
} }