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 (
// 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"),
},
},
},

View File

@ -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])
}