Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
Install custom containerd package in installMoby()
Browse files Browse the repository at this point in the history
Signed-off-by: Ernest Wong <[email protected]>
  • Loading branch information
Ernest Wong committed Sep 29, 2020
1 parent 808c58b commit 69ff349
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
8 changes: 8 additions & 0 deletions parts/k8s/cloud-init/artifacts/cse_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ installMoby() {
apt_get_update || exit 99
apt_get_install 20 30 120 ${install_pkgs} --allow-downgrades || exit 27
fi
{{- if HasLinuxContainerURL}}
LINUX_CONTAINERD_URL={{GetLinuxContainerdURL}}
if [[ -n "${LINUX_CONTAINERD_URL:-}" ]]; then
DEB="${LINUX_CONTAINERD_URL##*/}"
retrycmd_no_stats 120 5 25 curl -fsSL ${LINUX_CONTAINERD_URL} >/tmp/${DEB} || exit {{GetCSEErrorCode "ERR_DEB_DOWNLOAD_TIMEOUT"}}
retrycmd 20 30 120 dpkg -i /tmp/${DEB} || exit {{GetCSEErrorCode "ERR_DEB_PKG_ADD_FAIL"}}
fi
{{end}}
}
installBcc() {
local key=/tmp/iovisor-release.key url=https://repo.iovisor.org/GPG-KEY
Expand Down
4 changes: 0 additions & 4 deletions pkg/api/vlabs/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -1830,10 +1830,6 @@ func (a *Properties) validateContainerRuntime(isUpdate bool) error {
}
}

if containerRuntime != Containerd && a.OrchestratorProfile.KubernetesConfig != nil && a.OrchestratorProfile.KubernetesConfig.LinuxContainerdURL != "" {
return errors.Errorf("linuxContainerdURL requires containerdRuntime to be %s", Containerd)
}

return nil
}

Expand Down
8 changes: 0 additions & 8 deletions pkg/api/vlabs/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1700,14 +1700,6 @@ func Test_Properties_ValidateContainerRuntime(t *testing.T) {
"%s containerRuntime has been deprecated, you will not be able to update this cluster with this version of aks-engine", KataContainers,
)
}

p.OrchestratorProfile.KubernetesConfig.ContainerRuntime = Docker
p.OrchestratorProfile.KubernetesConfig.LinuxContainerdURL = "test"
if err := p.validateContainerRuntime(false); err == nil {
t.Errorf(
"linuxContainerdURL requires containerdRuntime to be %s", Containerd,
)
}
}

func TestProperties_ValidateContainerRuntime_Windows(t *testing.T) {
Expand Down
8 changes: 8 additions & 0 deletions pkg/engine/templates_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 69ff349

Please sign in to comment.