diff --git a/README.md b/README.md index 6cb679a..e19c190 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Apart from [what k3s requires](https://rancher.com/docs/k3s/latest/en/installati | Variable name | Default value | Description | | ------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| k3s_version | `v1.29.1+k3s1` | version of k3s to install | +| k3s_version | `v1.29.3+k3s1` | version of k3s to install | | k3s_systemd_dir | /etc/systemd/system | Directory for systemd unit file | | k3s_master | `false` | installs k3s master when true | | k3s_agent | `false` | installs k3s agent when true | diff --git a/defaults/main.yml b/defaults/main.yml index 7cde368..672d12c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,5 @@ --- -k3s_version: v1.29.1+k3s1 +k3s_version: v1.29.3+k3s1 k3s_systemd_dir: /etc/systemd/system k3s_master_ip: "{{ hostvars[groups[k3s_master_group][0]]['ansible_host'] | default(groups[k3s_master_group][0]) }}" k3s_master_port: 6443 @@ -31,9 +31,10 @@ k3s_gvisor_platform: systrap k3s_gvisor_create_runtimeclass: true k3s_gvisor_config: {} # https://github.com/google/gvisor/tags -k3s_gvisor_version: 20231218 +k3s_gvisor_version: 20240415 k3s_crun: false -k3s_crun_version: 1.14.1 +# https://github.com/containers/crun/releases +k3s_crun_version: 1.14.4 k3s_sysctl_config: {} k3s_registries: "" k3s_kubeconfig: false diff --git a/templates/containerd.toml.tmpl.j2 b/templates/containerd.toml.tmpl.j2 index cdd68f0..7c33cfb 100644 --- a/templates/containerd.toml.tmpl.j2 +++ b/templates/containerd.toml.tmpl.j2 @@ -1,8 +1,9 @@ #jinja2:variable_start_string:'[[' , variable_end_string:']]' , block_start_string:'[%', block_end_string:'%]' #Template needs to be re-synced with each containerd update #Current version: -#https://github.com/k3s-io/k3s/blob/v1.28.4%2Bk3s2/pkg/agent/templates/templates_linux.go +#https://github.com/k3s-io/k3s/blob/v1.29.3%2Bk3s1/pkg/agent/templates/templates_linux.go +{{- /* */ -}} # File generated by {{ .Program }}. DO NOT EDIT. Use config.toml.tmpl instead. version = 2 @@ -90,20 +91,10 @@ enable_keychain = true [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options] SystemdCgroup = {{ .SystemdCgroup }} -{{ if .PrivateRegistryConfig }} -{{ if .PrivateRegistryConfig.Mirrors }} -[plugins."io.containerd.grpc.v1.cri".registry.mirrors]{{end}} -{{range $k, $v := .PrivateRegistryConfig.Mirrors }} -[plugins."io.containerd.grpc.v1.cri".registry.mirrors."{{$k}}"] - endpoint = [{{range $i, $j := $v.Endpoints}}{{if $i}}, {{end}}{{printf "%q" .}}{{end}}] -{{if $v.Rewrites}} - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."{{$k}}".rewrite] -{{range $pattern, $replace := $v.Rewrites}} - "{{$pattern}}" = "{{$replace}}" -{{end}} -{{end}} -{{end}} +[plugins."io.containerd.grpc.v1.cri".registry] + config_path = "{{ .NodeConfig.Containerd.Registry }}" +{{ if .PrivateRegistryConfig }} {{range $k, $v := .PrivateRegistryConfig.Configs }} {{ if $v.Auth }} [plugins."io.containerd.grpc.v1.cri".registry.configs."{{$k}}".auth] @@ -112,13 +103,6 @@ enable_keychain = true {{ if $v.Auth.Auth }}auth = {{ printf "%q" $v.Auth.Auth }}{{end}} {{ if $v.Auth.IdentityToken }}identitytoken = {{ printf "%q" $v.Auth.IdentityToken }}{{end}} {{end}} -{{ if $v.TLS }} -[plugins."io.containerd.grpc.v1.cri".registry.configs."{{$k}}".tls] - {{ if $v.TLS.CAFile }}ca_file = "{{ $v.TLS.CAFile }}"{{end}} - {{ if $v.TLS.CertFile }}cert_file = "{{ $v.TLS.CertFile }}"{{end}} - {{ if $v.TLS.KeyFile }}key_file = "{{ $v.TLS.KeyFile }}"{{end}} - {{ if $v.TLS.InsecureSkipVerify }}insecure_skip_verify = true{{end}} -{{end}} {{end}} {{end}}