Skip to content

Commit

Permalink
Merge pull request #17 from rlex/versions_upgrade_1.29.3
Browse files Browse the repository at this point in the history
upgrade k3s, crun and gvisor
  • Loading branch information
rlex authored May 16, 2024
2 parents 3d515e5 + b0b052d commit 3153d53
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 25 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
7 changes: 4 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
26 changes: 5 additions & 21 deletions templates/containerd.toml.tmpl.j2
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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]
Expand All @@ -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}}

Expand Down

0 comments on commit 3153d53

Please sign in to comment.