Add Ability to set cpu request for api server

This commit is contained in:
Ryan Bonham 2019-03-29 13:56:21 -05:00
parent 2bf0103995
commit a75dcdda35
2 changed files with 3 additions and 1 deletions

View File

@ -416,7 +416,7 @@ func (b *KubeAPIServerBuilder) buildPod() (*v1.Pod, error) {
},
Resources: v1.ResourceRequirements{
Requests: v1.ResourceList{
v1.ResourceCPU: resource.MustParse("150m"),
v1.ResourceCPU: resource.MustParse(b.Cluster.Spec.KubeAPIServer.CPURequest),
},
},
}

View File

@ -411,6 +411,8 @@ type KubeAPIServerConfig struct {
// The specified file can contain multiple keys, and the flag can be specified multiple times with different files.
// If unspecified, --tls-private-key-file is used.
ServiceAccountKeyFile []string `json:"serviceAccountKeyFile,omitempty" flag:"service-account-key-file"`
// CPURequest, cpu request compute resource for kube proxy e.g. "20m"
CPURequest string `json:"cpuRequest,omitempty"`
}
// KubeControllerManagerConfig is the configuration for the controller