Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
1df72d14
Commit
1df72d14
authored
Oct 18, 2019
by
Erik Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup containerd config template spacing
parent
90df4a19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
templates.go
pkg/agent/templates/templates.go
+18
-18
No files found.
pkg/agent/templates/templates.go
View file @
1df72d14
...
@@ -15,26 +15,26 @@ type ContainerdConfig struct {
...
@@ -15,26 +15,26 @@ type ContainerdConfig struct {
const
ContainerdConfigTemplate
=
`
const
ContainerdConfigTemplate
=
`
[plugins.opt]
[plugins.opt]
path = "{{ .NodeConfig.Containerd.Opt }}"
path = "{{ .NodeConfig.Containerd.Opt }}"
[plugins.cri]
[plugins.cri]
stream_server_address = "127.0.0.1"
stream_server_address = "127.0.0.1"
stream_server_port = "10010"
stream_server_port = "10010"
{{- if .IsRunningInUserNS }}
{{- if .IsRunningInUserNS }}
disable_cgroup = true
disable_cgroup = true
disable_apparmor = true
disable_apparmor = true
restrict_oom_score_adj = true
restrict_oom_score_adj = true
{{ end -}}
{{ end -}}
{{- if .NodeConfig.AgentConfig.PauseImage }}
{{- if .NodeConfig.AgentConfig.PauseImage }}
sandbox_image = "{{ .NodeConfig.AgentConfig.PauseImage }}"
sandbox_image = "{{ .NodeConfig.AgentConfig.PauseImage }}"
{{ end -}}
{{ end -}}
{{- if not .NodeConfig.NoFlannel }}
{{- if not .NodeConfig.NoFlannel }}
[plugins.cri.cni]
[plugins.cri.cni]
bin_dir = "{{ .NodeConfig.AgentConfig.CNIBinDir }}"
bin_dir = "{{ .NodeConfig.AgentConfig.CNIBinDir }}"
conf_dir = "{{ .NodeConfig.AgentConfig.CNIConfDir }}"
conf_dir = "{{ .NodeConfig.AgentConfig.CNIConfDir }}"
{{ end -}}
{{ end -}}
[plugins.cri.containerd.runtimes.runc]
[plugins.cri.containerd.runtimes.runc]
...
@@ -45,22 +45,22 @@ sandbox_image = "{{ .NodeConfig.AgentConfig.PauseImage }}"
...
@@ -45,22 +45,22 @@ sandbox_image = "{{ .NodeConfig.AgentConfig.PauseImage }}"
[plugins.cri.registry.mirrors]{{end}}
[plugins.cri.registry.mirrors]{{end}}
{{range $k, $v := .PrivateRegistryConfig.Mirrors }}
{{range $k, $v := .PrivateRegistryConfig.Mirrors }}
[plugins.cri.registry.mirrors."{{$k}}"]
[plugins.cri.registry.mirrors."{{$k}}"]
endpoint = [{{range $i, $j := $v.Endpoints}}{{if $i}}, {{end}}{{printf "%q" .}}{{end}}]
endpoint = [{{range $i, $j := $v.Endpoints}}{{if $i}}, {{end}}{{printf "%q" .}}{{end}}]
{{end}}
{{end}}
{{range $k, $v := .PrivateRegistryConfig.Configs }}
{{range $k, $v := .PrivateRegistryConfig.Configs }}
{{ if $v.Auth }}
{{ if $v.Auth }}
[plugins.cri.registry.configs."{{$k}}".auth]
[plugins.cri.registry.configs."{{$k}}".auth]
{{ if $v.Auth.Username }}username = "{{ $v.Auth.Username }}"{{end}}
{{ if $v.Auth.Username }}username = "{{ $v.Auth.Username }}"{{end}}
{{ if $v.Auth.Password }}password = "{{ $v.Auth.Password }}"{{end}}
{{ if $v.Auth.Password }}password = "{{ $v.Auth.Password }}"{{end}}
{{ if $v.Auth.Auth }}auth = "{{ $v.Auth.Auth }}"{{end}}
{{ if $v.Auth.Auth }}auth = "{{ $v.Auth.Auth }}"{{end}}
{{ if $v.Auth.IdentityToken }}identity_token = "{{ $v.Auth.IdentityToken }}"{{end}}
{{ if $v.Auth.IdentityToken }}identity_token = "{{ $v.Auth.IdentityToken }}"{{end}}
{{end}}
{{end}}
{{ if $v.TLS }}
{{ if $v.TLS }}
[plugins.cri.registry.configs."{{$k}}".tls]
[plugins.cri.registry.configs."{{$k}}".tls]
{{ if $v.TLS.CAFile }}ca_file = "{{ $v.TLS.CAFile }}"{{end}}
{{ if $v.TLS.CAFile }}ca_file = "{{ $v.TLS.CAFile }}"{{end}}
{{ if $v.TLS.CertFile }}cert_file = "{{ $v.TLS.CertFile }}"{{end}}
{{ if $v.TLS.CertFile }}cert_file = "{{ $v.TLS.CertFile }}"{{end}}
{{ if $v.TLS.KeyFile }}key_file = "{{ $v.TLS.KeyFile }}"{{end}}
{{ if $v.TLS.KeyFile }}key_file = "{{ $v.TLS.KeyFile }}"{{end}}
{{end}}
{{end}}
{{end}}
{{end}}
{{end}}
{{end}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment