kube cert agent pod requests 0 cpu to avoid scheduling failures

This commit is contained in:
Ryan Richard 2023-07-25 10:09:30 -07:00
parent 01393aff7e
commit 743cb2d250
2 changed files with 3 additions and 2 deletions

View File

@ -548,7 +548,8 @@ func (c *agentController) newAgentDeployment(controllerManagerPod *corev1.Pod) *
}, },
Requests: corev1.ResourceList{ Requests: corev1.ResourceList{
corev1.ResourceMemory: resource.MustParse("32Mi"), corev1.ResourceMemory: resource.MustParse("32Mi"),
corev1.ResourceCPU: resource.MustParse("20m"), // Must be explicitly 0 (not unset) to avoid problem described in https://github.com/vmware-tanzu/pinniped/issues/1507.
corev1.ResourceCPU: resource.MustParse("0"),
}, },
}, },
}, },

View File

@ -127,7 +127,7 @@ func TestAgentController(t *testing.T) {
}, },
Requests: corev1.ResourceList{ Requests: corev1.ResourceList{
corev1.ResourceMemory: resource.MustParse("32Mi"), corev1.ResourceMemory: resource.MustParse("32Mi"),
corev1.ResourceCPU: resource.MustParse("20m"), corev1.ResourceCPU: resource.MustParse("0"),
}, },
}, },
ImagePullPolicy: corev1.PullIfNotPresent, ImagePullPolicy: corev1.PullIfNotPresent,