diff --git a/packages/containerd/containerd-config-toml_aws-dev b/packages/containerd/containerd-config-toml_aws-dev new file mode 100644 index 00000000000..2e69e473530 --- /dev/null +++ b/packages/containerd/containerd-config-toml_aws-dev @@ -0,0 +1,14 @@ +version = 2 +root = "/var/lib/containerd" +state = "/run/containerd" +disabled_plugins = [ + "io.containerd.snapshotter.v1.aufs", + "io.containerd.snapshotter.v1.zfs", + "io.containerd.snapshotter.v1.devmapper", +] + +[grpc] +address = "/run/containerd/containerd.sock" + +[plugins."io.containerd.internal.v1.opt"] +path = "/opt/containerd" diff --git a/packages/containerd/containerd-config-toml b/packages/containerd/containerd-config-toml_aws-k8s similarity index 100% rename from packages/containerd/containerd-config-toml rename to packages/containerd/containerd-config-toml_aws-k8s diff --git a/packages/containerd/containerd.spec b/packages/containerd/containerd.spec index 545784b0296..98da04a8306 100644 --- a/packages/containerd/containerd.spec +++ b/packages/containerd/containerd.spec @@ -15,8 +15,9 @@ License: ASL 2.0 URL: https://%{goimport} Source0: https://%{goimport}/archive/v%{gover}/%{gorepo}-%{gover}.tar.gz Source1: containerd.service -Source2: containerd-config-toml -Source3: containerd-tmpfiles.conf +Source2: containerd-config-toml_aws-k8s +Source3: containerd-config-toml_aws-dev +Source4: containerd-tmpfiles.conf BuildRequires: git BuildRequires: %{_cross_os}glibc-devel BuildRequires: %{_cross_os}libseccomp-devel @@ -63,10 +64,10 @@ install -p -m 0644 %{S:1} %{buildroot}%{_cross_unitdir}/containerd.service install -d %{buildroot}%{_cross_templatedir} install -d %{buildroot}%{_cross_factorydir}%{_cross_sysconfdir}/containerd -install -p -m 0644 %{S:2} %{buildroot}%{_cross_templatedir}/containerd-config-toml +install -p -m 0644 %{S:2} %{S:3} %{buildroot}%{_cross_templatedir} install -d %{buildroot}%{_cross_tmpfilesdir} -install -p -m 0644 %{S:3} %{buildroot}%{_cross_tmpfilesdir}/containerd.conf +install -p -m 0644 %{S:4} %{buildroot}%{_cross_tmpfilesdir}/containerd.conf %files %{_cross_bindir}/containerd @@ -76,7 +77,7 @@ install -p -m 0644 %{S:3} %{buildroot}%{_cross_tmpfilesdir}/containerd.conf %{_cross_bindir}/ctr %{_cross_unitdir}/containerd.service %dir %{_cross_factorydir}%{_cross_sysconfdir}/containerd -%{_cross_templatedir}/containerd-config-toml +%{_cross_templatedir}/containerd-config-toml* %{_cross_tmpfilesdir}/containerd.conf %changelog diff --git a/workspaces/models/aws-dev/defaults.toml b/workspaces/models/aws-dev/defaults.toml index 87d04ba5bcc..3ba1861bae3 100644 --- a/workspaces/models/aws-dev/defaults.toml +++ b/workspaces/models/aws-dev/defaults.toml @@ -20,6 +20,17 @@ template-path = "/usr/share/templates/hostname" [metadata.settings.hostname] affected-services = ["hostname"] +# Container runtime. + +[services.containerd] +configuration-files = ["containerd-config-toml"] +restart-commands = [] + +[configuration-files.containerd-config-toml] +path = "/etc/containerd/config.toml" +template-path = "/usr/share/templates/containerd-config-toml_aws-dev" + + # Updog. [services.updog] diff --git a/workspaces/models/aws-k8s/defaults.toml b/workspaces/models/aws-k8s/defaults.toml index 2a889da3395..9672784932a 100644 --- a/workspaces/models/aws-k8s/defaults.toml +++ b/workspaces/models/aws-k8s/defaults.toml @@ -20,10 +20,20 @@ template-path = "/usr/share/templates/hostname" [metadata.settings.hostname] affected-services = ["hostname"] +# Container runtime. + +[services.containerd] +configuration-files = ["containerd-config-toml"] +restart-commands = [] + +[configuration-files.containerd-config-toml] +path = "/etc/containerd/config.toml" +template-path = "/usr/share/templates/containerd-config-toml_aws-k8s" + # Kubernetes. [services.kubernetes] -configuration-files = ["kubelet-env", "kubelet-config", "kubelet-kubeconfig", "kubernetes-ca-crt", "containerd-config-toml"] +configuration-files = ["kubelet-env", "kubelet-config", "kubelet-kubeconfig", "kubernetes-ca-crt"] restart-commands = [] [configuration-files.kubelet-env] @@ -42,17 +52,16 @@ template-path = "/usr/share/templates/kubelet-kubeconfig" path = "/etc/kubernetes/pki/ca.crt" template-path = "/usr/share/templates/kubernetes-ca-crt" -[configuration-files.containerd-config-toml] -path = "/etc/containerd/config.toml" -template-path = "/usr/share/templates/containerd-config-toml" - [metadata.settings.kubernetes] max-pods.setting-generator = "pluto max-pods" cluster-dns-ip.setting-generator = "pluto cluster-dns-ip" node-ip.setting-generator = "pluto node-ip" -pod-infra-container-image.setting-generator = "pluto pod-infra-container-image" affected-services = ["kubernetes"] +[metadata.settings.kubernetes.pod-infra-container-image] +setting-generator = "pluto pod-infra-container-image" +affected-services = ["kubernetes", "containerd"] + # Updog. [services.updog]