MCPcopy
hub / github.com/kubernetes/kops / WithSysctls

Method WithSysctls

pkg/model/resources/nodeup.go:536–546  ·  view source on GitHub ↗

By setting some sysctls early, we avoid broken configurations that prevent nodeup download. See https://github.com/kubernetes/kops/issues/10206 for details.

()

Source from the content-addressed store, hash-verified

534// By setting some sysctls early, we avoid broken configurations that prevent nodeup download.
535// See https://github.com/kubernetes/kops/issues/10206 for details.
536func (s *NodeUpScript) WithSysctls() {
537 var b bytes.Buffer
538
539 // Based on https://github.com/kubernetes/kops/issues/10206#issuecomment-766852332
540 b.WriteString("sysctl -w net.core.rmem_max=16777216 || true\n")
541 b.WriteString("sysctl -w net.core.wmem_max=16777216 || true\n")
542 b.WriteString("sysctl -w net.ipv4.tcp_rmem='4096 87380 16777216' || true\n")
543 b.WriteString("sysctl -w net.ipv4.tcp_wmem='4096 87380 16777216' || true\n")
544
545 s.SetSysctls = b.String()
546}

Callers 3

GetBootstrapDataMethod · 0.95
kubeEnvMethod · 0.95
RunMethod · 0.95

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected