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

chore: ensure containerd has image cache on VHDs #4249

Merged
merged 13 commits into from
Feb 12, 2021

Conversation

jackfrancis
Copy link
Member

Reason for Change:

This PR changes the way we pre-pull container images during VHD CI so that both docker (moby) and containerd runtime configurations can use them.

Issue Fixed:

Credit Where Due:

Does this change contain code from or inspired by another project?

  • No
  • Yes

If "Yes," did you notify that project's maintainers and provide attribution?

  • No
  • Yes

Requirements:

Notes:

@acs-bot
Copy link

acs-bot commented Feb 10, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackfrancis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jackfrancis jackfrancis force-pushed the vhd-containerd branch 2 times, most recently from f97eee9 to d663bd9 Compare February 10, 2021 04:45
@codecov
Copy link

codecov bot commented Feb 10, 2021

Codecov Report

Merging #4249 (c0ddd04) into master (1c12289) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4249   +/-   ##
=======================================
  Coverage   72.07%   72.07%           
=======================================
  Files         141      141           
  Lines       21686    21686           
=======================================
  Hits        15630    15630           
  Misses       5106     5106           
  Partials      950      950           
Impacted Files Coverage Δ
pkg/engine/templates_generated.go 43.42% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c12289...c0ddd04. Read the comment docs.

removeContainerd
retrycmd_no_stats 120 5 25 curl ${MS_APT_REPO}/config/ubuntu/${UBUNTU_RELEASE}/prod.list >/tmp/microsoft-prod.list || exit 25
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved this duplicated collection of statements (both installMoby and installContainerd have it) into installDeps; in other words, all suppported configurations are going to need these apt config updates, so we should do them in that common place

local v
v=$(containerd -version | cut -d " " -f 3 | sed 's|v||')
if [[ $v != "${CONTAINERD_VERSION}" ]]; then
if [[ $v != "${CONTAINERD_VERSION}"* ]]; then
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need this glob expansion because the versions we get from azure now include a -azure suffix

@@ -676,14 +672,18 @@ installSGXDrivers() {
{{end}}
{{- if HasVHDDistroNodes}}
cleanUpContainerImages() {
{{- if NeedsContainerd}}
docker rmi -f $(docker images -a -q) &
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we remove all docker cache images if we're in a containerd context

docker rmi registry:2.7.1 &
ctr -n=k8s.io image rm $(ctr -n=k8s.io images ls -q) &
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we remove all containerd cache images if we're in a docker context

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants