Skip to content

Commit 209aaf5

Browse files
committed
updated CI to work with a forked version of containerd
Signed-off-by: Robbie Buxton <[email protected]>
1 parent 9e9e7a5 commit 209aaf5

File tree

11 files changed

+38
-27
lines changed

11 files changed

+38
-27
lines changed

.github/workflows/tests.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Tests
22
on:
33
push:
44
branches:
5-
- main
5+
- v1.7.2-stargz
66
pull_request:
77

88
env:
@@ -52,7 +52,7 @@ jobs:
5252
strategy:
5353
fail-fast: false
5454
matrix:
55-
buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
55+
buildargs: ["", "--build-arg=CONTAINERD_VERSION=v1.7.2-stargz"] # released version & v1.7.2-stargz version
5656
builtin: ["true", "false"]
5757
metadata-store: ["memory", "db"]
5858
exclude:
@@ -61,7 +61,7 @@ jobs:
6161
- metadata-store: "db"
6262
builtin: "true"
6363
- metadata-store: "db"
64-
buildargs: "--build-arg=CONTAINERD_VERSION=main"
64+
buildargs: "--build-arg=CONTAINERD_VERSION=v1.7.2-stargz"
6565
steps:
6666
- name: Install htpasswd for setting up private registry
6767
run: sudo apt-get update -y && sudo apt-get --no-install-recommends install -y apache2-utils
@@ -79,7 +79,7 @@ jobs:
7979
strategy:
8080
fail-fast: false
8181
matrix:
82-
buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
82+
buildargs: ["", "--build-arg=CONTAINERD_VERSION=v1.7.2-stargz"] # released version & v1.7.2-stargz version
8383
steps:
8484
- name: Install htpasswd for setting up private registry
8585
run: sudo apt-get update -y && sudo apt-get --no-install-recommends install -y apache2-utils
@@ -95,7 +95,7 @@ jobs:
9595
strategy:
9696
fail-fast: false
9797
matrix:
98-
buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
98+
buildargs: ["", "--build-arg=CONTAINERD_VERSION=v1.7.2-stargz"] # released version & v1.7.2-stargz version
9999
builtin: ["true", "false"]
100100
exclude:
101101
- buildargs: ""
@@ -116,7 +116,7 @@ jobs:
116116
strategy:
117117
fail-fast: false
118118
matrix:
119-
buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
119+
buildargs: ["", "--build-arg=CONTAINERD_VERSION=v1.7.2-stargz"] # released version & v1.7.2-stargz version
120120
builtin: ["true", "false"]
121121
exclude:
122122
- buildargs: ""
@@ -137,7 +137,7 @@ jobs:
137137
strategy:
138138
fail-fast: false
139139
matrix:
140-
buildargs: ["", "--build-arg=CONTAINERD_VERSION=main"] # released version & main version
140+
buildargs: ["", "--build-arg=CONTAINERD_VERSION=v1.7.2-stargz"] # released version & v1.7.2-stargz version
141141
builtin: ["true", "false"]
142142
metadata-store: ["memory", "db"]
143143
exclude:
@@ -146,7 +146,7 @@ jobs:
146146
- metadata-store: "db"
147147
builtin: "true"
148148
- metadata-store: "db"
149-
buildargs: "--build-arg=CONTAINERD_VERSION=main"
149+
buildargs: "--build-arg=CONTAINERD_VERSION=v1.7.2-stargz"
150150
steps:
151151
- uses: actions/checkout@v3
152152
- name: Validate containerd through CRI

Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG CONTAINERD_VERSION=v1.7.2
15+
ARG CONTAINERD_VERSION=v1.7.2-stargz
1616
ARG RUNC_VERSION=v1.1.7
1717
ARG CNI_PLUGINS_VERSION=v1.3.0
1818
ARG NERDCTL_VERSION=1.4.0
@@ -32,14 +32,14 @@ ARG CRI_TOOLS_VERSION=v1.27.0
3232
# Legacy builder that doesn't support TARGETARCH should set this explicitly using --build-arg.
3333
# If TARGETARCH isn't supported by the builder, the default value is "amd64".
3434

35-
FROM golang:1.20.6-bullseye AS golang-base
35+
FROM golang:1.20.7-bullseye AS golang-base
3636

3737
# Build containerd
3838
FROM golang-base AS containerd-dev
3939
ARG CONTAINERD_VERSION
4040
RUN apt-get update -y && apt-get install -y libbtrfs-dev libseccomp-dev && \
4141
git clone -b ${CONTAINERD_VERSION} --depth 1 \
42-
https://github.com/containerd/containerd $GOPATH/src/github.com/containerd/containerd && \
42+
https://github.com/pdtpartners/containerd $GOPATH/src/github.com/containerd/containerd && \
4343
cd $GOPATH/src/github.com/containerd/containerd && \
4444
make && DESTDIR=/out/ PREFIX= make install
4545

@@ -49,7 +49,7 @@ ARG CONTAINERD_VERSION
4949
COPY . $GOPATH/src/github.com/containerd/stargz-snapshotter
5050
RUN apt-get update -y && apt-get install -y libbtrfs-dev libseccomp-dev && \
5151
git clone -b ${CONTAINERD_VERSION} --depth 1 \
52-
https://github.com/containerd/containerd $GOPATH/src/github.com/containerd/containerd && \
52+
https://github.com/pdtpartners/containerd $GOPATH/src/github.com/containerd/containerd && \
5353
cd $GOPATH/src/github.com/containerd/containerd && \
5454
echo 'require github.com/containerd/stargz-snapshotter v0.0.0' >> go.mod && \
5555
echo 'replace github.com/containerd/stargz-snapshotter => '$GOPATH'/src/github.com/containerd/stargz-snapshotter' >> go.mod && \

cmd/go.mod

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/containerd/stargz-snapshotter/cmd
33
go 1.19
44

55
require (
6-
github.com/containerd/containerd v1.7.2
6+
github.com/containerd/containerd v1.7.3
77
github.com/containerd/go-cni v1.1.9
88
github.com/containerd/stargz-snapshotter v0.14.3
99
github.com/containerd/stargz-snapshotter/estargz v0.14.3
@@ -36,7 +36,7 @@ require (
3636
github.com/cespare/xxhash/v2 v2.2.0 // indirect
3737
github.com/cilium/ebpf v0.9.1 // indirect
3838
github.com/containerd/cgroups v1.1.0 // indirect
39-
github.com/containerd/cgroups/v3 v3.0.1 // indirect
39+
github.com/containerd/cgroups/v3 v3.0.2 // indirect
4040
github.com/containerd/console v1.0.3 // indirect
4141
github.com/containerd/continuity v0.4.1 // indirect
4242
github.com/containerd/fifo v1.1.0 // indirect
@@ -144,3 +144,5 @@ replace (
144144
github.com/containerd/stargz-snapshotter/estargz => ../estargz
145145
github.com/containerd/stargz-snapshotter/ipfs => ../ipfs
146146
)
147+
148+
replace github.com/containerd/containerd => github.com/pdtpartners/containerd v1.7.2-stargz

cmd/go.sum

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
3030
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
3131
github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
3232
github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw=
33-
github.com/containerd/cgroups/v3 v3.0.1 h1:4hfGvu8rfGIwVIDd+nLzn/B9ZXx4BcCjzt5ToenJRaE=
34-
github.com/containerd/cgroups/v3 v3.0.1/go.mod h1:/vtwk1VXrtoa5AaZLkypuOJgA/6DyPMZHJPGQNtlHnw=
33+
github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0=
34+
github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE=
3535
github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw=
3636
github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
3737
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
38-
github.com/containerd/containerd v1.7.2 h1:UF2gdONnxO8I6byZXDi5sXWiWvlW3D/sci7dTQimEJo=
39-
github.com/containerd/containerd v1.7.2/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI=
4038
github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU=
4139
github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
4240
github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY=
@@ -280,6 +278,8 @@ github.com/opencontainers/runtime-spec v1.1.0-rc.3/go.mod h1:jwyrGlmzljRJv/Fgzds
280278
github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
281279
github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=
282280
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
281+
github.com/pdtpartners/containerd v1.7.2-stargz h1:b/o+aD51Am8oWD01MRAbfuBWt+oR1OzJaXWIWtAhLis=
282+
github.com/pdtpartners/containerd v1.7.2-stargz/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI=
283283
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
284284
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
285285
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

go.mod

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ go 1.19
55
require (
66
github.com/containerd/console v1.0.3
77
github.com/containerd/containerd v1.7.2
8-
github.com/containerd/continuity v0.4.1
98
github.com/containerd/stargz-snapshotter/estargz v0.14.3
109
github.com/docker/cli v24.0.4+incompatible
1110
github.com/docker/go-metrics v0.0.1
@@ -39,6 +38,7 @@ require (
3938
github.com/cespare/xxhash/v2 v2.2.0 // indirect
4039
github.com/containerd/cgroups v1.1.0 // indirect
4140
github.com/containerd/cgroups/v3 v3.0.1 // indirect
41+
github.com/containerd/continuity v0.4.1 // indirect
4242
github.com/containerd/fifo v1.1.0 // indirect
4343
github.com/containerd/go-cni v1.1.9 // indirect
4444
github.com/containerd/ttrpc v1.2.2 // indirect
@@ -116,3 +116,5 @@ require (
116116

117117
// Import local package for estargz.
118118
replace github.com/containerd/stargz-snapshotter/estargz => ./estargz
119+
120+
replace github.com/containerd/containerd => github.com/pdtpartners/containerd v1.7.2-stargz

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ github.com/containerd/cgroups/v3 v3.0.1 h1:4hfGvu8rfGIwVIDd+nLzn/B9ZXx4BcCjzt5To
3232
github.com/containerd/cgroups/v3 v3.0.1/go.mod h1:/vtwk1VXrtoa5AaZLkypuOJgA/6DyPMZHJPGQNtlHnw=
3333
github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
3434
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
35-
github.com/containerd/containerd v1.7.2 h1:UF2gdONnxO8I6byZXDi5sXWiWvlW3D/sci7dTQimEJo=
36-
github.com/containerd/containerd v1.7.2/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI=
3735
github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU=
3836
github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
3937
github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY=
@@ -230,6 +228,8 @@ github.com/opencontainers/runtime-spec v1.1.0-rc.3/go.mod h1:jwyrGlmzljRJv/Fgzds
230228
github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
231229
github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=
232230
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
231+
github.com/pdtpartners/containerd v1.7.2-stargz h1:b/o+aD51Am8oWD01MRAbfuBWt+oR1OzJaXWIWtAhLis=
232+
github.com/pdtpartners/containerd v1.7.2-stargz/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI=
233233
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
234234
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
235235
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

ipfs/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/containerd/stargz-snapshotter/ipfs
33
go 1.19
44

55
require (
6-
github.com/containerd/containerd v1.7.2
6+
github.com/containerd/containerd v1.7.3
77
github.com/mitchellh/go-homedir v1.1.0
88
github.com/multiformats/go-multiaddr v0.10.1
99
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b

ipfs/go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
1616
github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
1717
github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw=
1818
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
19-
github.com/containerd/containerd v1.7.2 h1:UF2gdONnxO8I6byZXDi5sXWiWvlW3D/sci7dTQimEJo=
20-
github.com/containerd/containerd v1.7.2/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI=
19+
github.com/containerd/containerd v1.7.3 h1:cKwYKkP1eTj54bP3wCdXXBymmKRQMrWjkLSWZZJDa8o=
20+
github.com/containerd/containerd v1.7.3/go.mod h1:32FOM4/O0RkNg7AjQj3hDzN9cUGtu+HMvaKUNiqCZB8=
2121
github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU=
2222
github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
2323
github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY=

script/k3s-argo-workflow/run.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ REPO="${CONTEXT}../../"
2121

2222
K3S_VERSION=master
2323
K3S_REPO=https://github.com/k3s-io/k3s
24-
K3S_CONTAINERD_REPO=https://github.com/k3s-io/containerd
24+
K3S_CONTAINERD_REPO=https://github.com/pdtpartners/containerd
2525

2626
K3S_NODE_REPO=ghcr.io/stargz-containers
2727
K3S_NODE_IMAGE_NAME=k3s
@@ -126,6 +126,8 @@ wget -O "${ORG_ARGOYAML}" https://raw.githubusercontent.com/argoproj/argo-workfl
126126

127127
git clone -b ${K3S_VERSION} --depth 1 "${K3S_REPO}" "${TMP_K3S_REPO}"
128128
sed -i "s|github.com/k3s-io/stargz-snapshotter .*$|$(realpath ${REPO})|g" "${TMP_K3S_REPO}/go.mod"
129+
sed -i "s|github.com/k3s-io/containerd v1.7.3-k3s1|github.com/pdtpartners/containerd v1.7.2-stargz|g" "${TMP_K3S_REPO}/go.mod"
130+
129131
echo "replace github.com/containerd/stargz-snapshotter/estargz => $(realpath ${REPO})/estargz" >> "${TMP_K3S_REPO}/go.mod"
130132

131133
# typeurl version stargz-snapshotter indirectly depends on is incompatible to the one github.com/k3s-io/containerd depends on.
@@ -137,6 +139,7 @@ cat "${TMP_K3S_REPO}/go.mod"
137139

138140
sed -i -E 's|(ENV DAPPER_RUN_ARGS .*)|\1 -v '"$(realpath ${REPO})":"$(realpath ${REPO})"':ro|g' "${TMP_K3S_REPO}/Dockerfile.dapper"
139141
sed -i -E 's|(ENV DAPPER_ENV .*)|\1 DOCKER_BUILDKIT|g' "${TMP_K3S_REPO}/Dockerfile.dapper"
142+
sed -i -E 's|github.com/k3s-io/containerd|github.com/pdtpartners/containerd|g' "${TMP_K3S_REPO}/scripts/download"
140143
(
141144
cd "${TMP_K3S_REPO}" && \
142145
git config user.email "[email protected]" && \

script/k3s/run-k3s.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set -euo pipefail
1818

1919
K3S_VERSION=master
2020
K3S_REPO=https://github.com/k3s-io/k3s
21-
K3S_CONTAINERD_REPO=https://github.com/k3s-io/containerd
21+
K3S_CONTAINERD_REPO=https://github.com/pdtpartners/containerd
2222

2323
REGISTRY_HOST=k3s-private-registry
2424
K3S_NODE_REPO=ghcr.io/stargz-containers
@@ -55,6 +55,8 @@ trap 'cleanup "$?"' EXIT SIGHUP SIGINT SIGQUIT SIGTERM
5555
echo "Preparing node image..."
5656
git clone -b ${K3S_VERSION} --depth 1 "${K3S_REPO}" "${TMP_K3S_REPO}"
5757
sed -i "s|github.com/k3s-io/stargz-snapshotter .*$|$(realpath ${REPO})|g" "${TMP_K3S_REPO}/go.mod"
58+
sed -i "s|github.com/k3s-io/containerd v1.7.3-k3s1|github.com/pdtpartners/containerd v1.7.2-stargz|g" "${TMP_K3S_REPO}/go.mod"
59+
5860
echo "replace github.com/containerd/stargz-snapshotter/estargz => $(realpath ${REPO})/estargz" >> "${TMP_K3S_REPO}/go.mod"
5961

6062
# typeurl version stargz-snapshotter indirectly depends on is incompatible to the one github.com/k3s-io/containerd depends on.
@@ -66,6 +68,8 @@ cat "${TMP_K3S_REPO}/go.mod"
6668

6769
sed -i -E 's|(ENV DAPPER_RUN_ARGS .*)|\1 -v '"$(realpath ${REPO})":"$(realpath ${REPO})"':ro|g' "${TMP_K3S_REPO}/Dockerfile.dapper"
6870
sed -i -E 's|(ENV DAPPER_ENV .*)|\1 DOCKER_BUILDKIT|g' "${TMP_K3S_REPO}/Dockerfile.dapper"
71+
sed -i -E 's|github.com/k3s-io/containerd|github.com/pdtpartners/containerd|g' "${TMP_K3S_REPO}/scripts/download"
72+
6973
(
7074
cd "${TMP_K3S_REPO}" && \
7175
git config user.email "[email protected]" && \

service/keychain/kubeconfig/kubeconfig.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ func (kc *keychain) startSyncSecrets(ctx context.Context, client kubernetes.Inte
218218
}
219219

220220
func (kc *keychain) runWorker() {
221-
for kc.processNextItem() {
221+
for kc.processNextItem() { //nolint:all
222222
// continue looping
223223
}
224224
}

0 commit comments

Comments
 (0)