Skip to content

Commit

Permalink
chore: add system.conf with static JoinControllers configuration (Azu…
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis authored and Justin Hackett committed Mar 14, 2019
1 parent c58c603 commit 0c6d85a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions parts/k8s/kubernetesagentcustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ write_files:
content: !!binary |
{{WrapAsVariable "sshdConfig"}}

- path: /etc/systemd/system.conf
permissions: "0644"
encoding: gzip
owner: root
content: !!binary |
{{WrapAsVariable "systemConf"}}

- path: /usr/local/bin/health-monitor.sh
permissions: "0544"
encoding: gzip
Expand Down
7 changes: 7 additions & 0 deletions parts/k8s/kubernetesmastercustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ write_files:
content: !!binary |
{{WrapAsVariable "sshdConfig"}}

- path: /etc/systemd/system.conf
permissions: "0644"
encoding: gzip
owner: root
content: !!binary |
{{WrapAsVariable "systemConf"}}

- path: /usr/local/bin/health-monitor.sh
permissions: "0544"
encoding: gzip
Expand Down
1 change: 1 addition & 0 deletions parts/k8s/kubernetesmastervars.t
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
{{if IsAzureStackCloud}}
"provisionConfigsCustomCloud": "{{GetKubernetesB64ConfigsCustomCloud}}",
{{end}}
"systemConf": "{{GetB64systemConf}}",
"mountetcdScript": "{{GetKubernetesB64Mountetcd}}",
"customSearchDomainsScript": "{{GetKubernetesB64CustomSearchDomainsScript}}",
"sshdConfig": "{{GetB64sshdConfig}}",
Expand Down
2 changes: 2 additions & 0 deletions parts/k8s/system.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Manager]
JoinControllers=cpu,cpuacct,cpuset,net_cls,net_prio,hugetlb,memory
1 change: 1 addition & 0 deletions pkg/engine/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ const (
kubernetesWindowsAzureCniFunctionsPS1 = "k8s/windowsazurecnifunc.ps1"
kubernetesWindowsOpenSSHFunctionPS1 = "k8s/windowsinstallopensshfunc.ps1"
sshdConfig = "k8s/sshd_config"
systemConf = "k8s/system.conf"
)

const (
Expand Down
3 changes: 3 additions & 0 deletions pkg/engine/template_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,9 @@ func (t *TemplateGenerator) getTemplateFuncMap(cs *api.ContainerService) templat
"GetB64sshdConfig": func() string {
return getBase64CustomScript(sshdConfig)
},
"GetB64systemConf": func() string {
return getBase64CustomScript(systemConf)
},
"HasMultipleSshKeys": func() bool {
return len(cs.Properties.LinuxProfile.SSH.PublicKeys) > 1
},
Expand Down

0 comments on commit 0c6d85a

Please sign in to comment.