Skip to content

Commit

Permalink
QPS changes (#58)
Browse files Browse the repository at this point in the history
Increase default kube-api-qps to 20 and also
bump kube-api-burst to 40
  • Loading branch information
puneetguptanitj authored Sep 7, 2018
1 parent 76edce5 commit be6d2d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 5 additions & 3 deletions constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ var CNIPluginsFilename = fmt.Sprintf("cni-plugins-amd64-%s.tgz", CNIVersion)

const (
// TODO(dlipovetsky) Move fields to configuration
KubeletFailSwapOn = false
KubeletMaxPods = 500
KubeletFailSwapOn = false
KubeletMaxPods = 500
KubeletKubeAPIQPS = 20
KubeletKubeAPIBurst = 40

NodeadmKubeletSystemdDropinFilename = "20-nodeadm.conf"
NodeadmKubeletSystemdDropinTemplate = `[Service]
Environment="KUBELET_DNS_ARGS=--cluster-dns={{ .ClusterDNS }} --cluster-domain={{ .ClusterDomain }}"
Environment="KUBELET_EXTRA_ARGS=--max-pods={{ .MaxPods }} --fail-swap-on={{ .FailSwapOn }} --hostname-override={{ .HostnameOverride }}"
Environment="KUBELET_EXTRA_ARGS=--max-pods={{ .MaxPods }} --fail-swap-on={{ .FailSwapOn }} --hostname-override={{ .HostnameOverride }} --kube-api-qps={{ .KubeAPIQPS }} --kube-api-burst={{ .KubeAPIBurst }}"
`
)

Expand Down
4 changes: 4 additions & 0 deletions utils/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,16 @@ func placeAndModifyNodeadmKubeletSystemdDropin(netConfig apis.Networking) {
ClusterDNS string
ClusterDomain string
HostnameOverride string
KubeAPIQPS int
KubeAPIBurst int
}{
FailSwapOn: constants.KubeletFailSwapOn,
MaxPods: constants.KubeletMaxPods,
ClusterDNS: dnsIP.String(),
ClusterDomain: netConfig.DNSDomain,
HostnameOverride: hostnameOverride,
KubeAPIQPS: constants.KubeletKubeAPIQPS,
KubeAPIBurst: constants.KubeletKubeAPIBurst,
}

writeTemplateIntoFile(constants.NodeadmKubeletSystemdDropinTemplate, "nodeadm-kubelet-systemd-dropin", confFile, data)
Expand Down

0 comments on commit be6d2d7

Please sign in to comment.