Skip to content

Commit

Permalink
Merge pull request #589 from amazonlinux/dev-containerd
Browse files Browse the repository at this point in the history
Use separate containerd configs in aws-k8s and aws-dev
  • Loading branch information
tjkirch authored Dec 16, 2019
2 parents 1a04398 + 7e964aa commit 4783862
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 11 deletions.
14 changes: 14 additions & 0 deletions packages/containerd/containerd-config-toml_aws-dev
Original file line number Diff line number Diff line change
@@ -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"
File renamed without changes.
11 changes: 6 additions & 5 deletions packages/containerd/containerd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
11 changes: 11 additions & 0 deletions workspaces/models/aws-dev/defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
21 changes: 15 additions & 6 deletions workspaces/models/aws-k8s/defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand Down

0 comments on commit 4783862

Please sign in to comment.