mirror of https://github.com/k3s-io/k3s
Upgrade containerd to v2.0.2
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>pull/11626/head
parent
a858412cb8
commit
4765e09750
96
go.mod
96
go.mod
|
@ -3,11 +3,13 @@ module github.com/k3s-io/k3s
|
|||
go 1.23.3
|
||||
|
||||
replace (
|
||||
github.com/Microsoft/hcsshim => github.com/Microsoft/hcsshim v0.11.7
|
||||
github.com/Microsoft/hcsshim => github.com/Microsoft/hcsshim v0.12.9
|
||||
github.com/Mirantis/cri-dockerd => github.com/k3s-io/cri-dockerd v0.3.15-k3s1.32-1 // v1.32.0-k3s1
|
||||
github.com/cilium/ebpf => github.com/cilium/ebpf v0.12.3
|
||||
github.com/cloudnativelabs/kube-router/v2 => github.com/k3s-io/kube-router/v2 v2.2.1
|
||||
github.com/containerd/containerd => github.com/k3s-io/containerd v1.7.23-k3s2
|
||||
github.com/containerd/containerd/api => github.com/containerd/containerd/api v1.8.0
|
||||
github.com/containerd/containerd/v2 => github.com/k3s-io/containerd/v2 v2.0.2-k3s1
|
||||
github.com/containerd/imgcrypt => github.com/containerd/imgcrypt v1.1.11
|
||||
github.com/distribution/reference => github.com/distribution/reference v0.5.0
|
||||
github.com/docker/distribution => github.com/docker/distribution v2.8.3+incompatible
|
||||
|
@ -21,7 +23,7 @@ replace (
|
|||
github.com/opencontainers/selinux => github.com/opencontainers/selinux v1.11.0
|
||||
github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.19.1
|
||||
github.com/prometheus/common => github.com/prometheus/common v0.55.0
|
||||
github.com/spegel-org/spegel => github.com/k3s-io/spegel v0.0.23-0.20240516234953-f3d2c4072314
|
||||
github.com/spegel-org/spegel => github.com/k3s-io/spegel v0.0.23-k3s2
|
||||
github.com/ugorji/go => github.com/ugorji/go v1.2.11
|
||||
go.etcd.io/etcd/api/v3 => github.com/k3s-io/etcd/api/v3 v3.5.16-k3s1
|
||||
go.etcd.io/etcd/client/pkg/v3 => github.com/k3s-io/etcd/client/pkg/v3 v3.5.16-k3s1
|
||||
|
@ -78,18 +80,20 @@ replace (
|
|||
)
|
||||
|
||||
require (
|
||||
github.com/Microsoft/hcsshim v0.12.6
|
||||
github.com/Microsoft/hcsshim v0.12.9
|
||||
github.com/Mirantis/cri-dockerd v0.0.0-00010101000000-000000000000
|
||||
github.com/blang/semver/v4 v4.0.0
|
||||
github.com/cloudnativelabs/kube-router/v2 v2.0.0-00010101000000-000000000000
|
||||
github.com/containerd/aufs v1.0.0
|
||||
github.com/containerd/cgroups/v3 v3.0.3
|
||||
github.com/containerd/containerd v1.7.16
|
||||
github.com/containerd/fuse-overlayfs-snapshotter v1.0.8
|
||||
github.com/containerd/stargz-snapshotter v0.15.1
|
||||
github.com/containerd/zfs v1.1.0
|
||||
github.com/containerd/containerd/api v1.8.0
|
||||
github.com/containerd/containerd/v2 v2.0.2
|
||||
github.com/containerd/errdefs v1.0.0
|
||||
github.com/containerd/fuse-overlayfs-snapshotter/v2 v2.1.0
|
||||
github.com/containerd/stargz-snapshotter v0.16.3
|
||||
github.com/containerd/zfs/v2 v2.0.0-rc.0
|
||||
github.com/coreos/go-iptables v0.8.0
|
||||
github.com/coreos/go-systemd/v22 v22.5.0
|
||||
github.com/distribution/reference v0.6.0
|
||||
github.com/docker/docker v27.1.1+incompatible
|
||||
github.com/erikdubbelboer/gspt v0.0.0-20190125194910-e68493906b83
|
||||
github.com/flannel-io/flannel v0.25.7
|
||||
|
@ -113,6 +117,7 @@ require (
|
|||
github.com/klauspost/compress v1.17.11
|
||||
github.com/libp2p/go-libp2p v0.33.2
|
||||
github.com/minio/minio-go/v7 v7.0.70
|
||||
github.com/moby/sys/userns v0.1.0
|
||||
github.com/mwitkow/go-http-dialer v0.0.0-20161116154839-378f744fb2b8
|
||||
github.com/natefinch/lumberjack v2.0.0+incompatible
|
||||
github.com/onsi/ginkgo/v2 v2.22.2
|
||||
|
@ -134,8 +139,9 @@ require (
|
|||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/spegel-org/spegel v1.0.18
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/stretchr/testify v1.9.0
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/urfave/cli v1.22.15
|
||||
github.com/urfave/cli/v2 v2.27.5
|
||||
github.com/vishvananda/netlink v1.3.1-0.20240905180732-b1ce50cfa9be
|
||||
github.com/yl2chen/cidranger v1.0.2
|
||||
go.etcd.io/etcd/api/v3 v3.5.16
|
||||
|
@ -150,7 +156,7 @@ require (
|
|||
golang.org/x/net v0.33.0
|
||||
golang.org/x/sync v0.10.0
|
||||
golang.org/x/sys v0.28.0
|
||||
google.golang.org/grpc v1.68.0
|
||||
google.golang.org/grpc v1.68.1
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
k8s.io/api v0.32.1
|
||||
k8s.io/apimachinery v0.32.1
|
||||
|
@ -190,8 +196,8 @@ require (
|
|||
cel.dev/expr v0.18.0 // indirect
|
||||
dario.cat/mergo v1.0.1 // indirect
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
|
||||
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 // indirect
|
||||
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20231105174938-2b5cbb29f3e2 // indirect
|
||||
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
|
||||
github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab // indirect
|
||||
github.com/MakeNowJust/heredoc v1.0.0 // indirect
|
||||
|
@ -210,26 +216,27 @@ require (
|
|||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/chai2010/gettext-go v1.0.2 // indirect
|
||||
github.com/checkpoint-restore/checkpointctl v1.3.0 // indirect
|
||||
github.com/checkpoint-restore/go-criu/v7 v7.2.0 // indirect
|
||||
github.com/cilium/ebpf v0.16.0 // indirect
|
||||
github.com/container-storage-interface/spec v1.9.0 // indirect
|
||||
github.com/containerd/btrfs/v2 v2.0.0 // indirect
|
||||
github.com/containerd/cgroups v1.1.0 // indirect
|
||||
github.com/containerd/console v1.0.4 // indirect
|
||||
github.com/containerd/containerd/api v1.8.0-rc.3 // indirect
|
||||
github.com/containerd/continuity v0.4.3 // indirect
|
||||
github.com/containerd/errdefs v0.3.0 // indirect
|
||||
github.com/containerd/continuity v0.4.5 // indirect
|
||||
github.com/containerd/errdefs/pkg v0.3.0 // indirect
|
||||
github.com/containerd/fifo v1.1.0 // indirect
|
||||
github.com/containerd/go-cni v1.1.10 // indirect
|
||||
github.com/containerd/go-cni v1.1.11 // indirect
|
||||
github.com/containerd/go-runc v1.1.0 // indirect
|
||||
github.com/containerd/imgcrypt v1.2.0-rc1 // indirect
|
||||
github.com/containerd/imgcrypt/v2 v2.0.0-rc.1 // indirect
|
||||
github.com/containerd/log v0.1.0 // indirect
|
||||
github.com/containerd/nri v0.6.1 // indirect
|
||||
github.com/containerd/platforms v0.2.1 // indirect
|
||||
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
|
||||
github.com/containerd/ttrpc v1.2.5 // indirect
|
||||
github.com/containerd/typeurl v1.0.2 // indirect
|
||||
github.com/containerd/typeurl/v2 v2.2.0 // indirect
|
||||
github.com/containerd/nri v0.8.0 // indirect
|
||||
github.com/containerd/otelttrpc v0.1.0 // indirect
|
||||
github.com/containerd/platforms v1.0.0-rc.1 // indirect
|
||||
github.com/containerd/plugin v1.0.0 // indirect
|
||||
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
|
||||
github.com/containerd/ttrpc v1.2.7 // indirect
|
||||
github.com/containerd/typeurl/v2 v2.2.3 // indirect
|
||||
github.com/containernetworking/cni v1.2.3 // indirect
|
||||
github.com/containernetworking/plugins v1.5.1 // indirect
|
||||
github.com/containers/ocicrypt v1.2.0 // indirect
|
||||
|
@ -240,8 +247,8 @@ require (
|
|||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
|
||||
github.com/distribution/reference v0.6.0 // indirect
|
||||
github.com/docker/cli v27.1.2+incompatible // indirect
|
||||
github.com/dgraph-io/ristretto v0.1.1 // indirect
|
||||
github.com/docker/cli v27.3.1+incompatible // indirect
|
||||
github.com/docker/distribution v2.8.3+incompatible // indirect
|
||||
github.com/docker/docker-credential-helpers v0.7.0 // indirect
|
||||
github.com/docker/go-connections v0.5.0 // indirect
|
||||
|
@ -261,7 +268,7 @@ require (
|
|||
github.com/francoispqt/gojay v1.2.13 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/go-errors/errors v1.4.2 // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.0.2 // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.21.0 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
|
@ -286,8 +293,8 @@ require (
|
|||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
|
||||
github.com/hanwen/go-fuse/v2 v2.5.1 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
|
||||
github.com/hanwen/go-fuse/v2 v2.6.3 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
|
@ -298,7 +305,7 @@ require (
|
|||
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
|
||||
github.com/huin/goupnp v1.3.0 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/intel/goresctrl v0.7.0 // indirect
|
||||
github.com/intel/goresctrl v0.8.0 // indirect
|
||||
github.com/ipfs/boxo v0.10.0 // indirect
|
||||
github.com/ipfs/go-cid v0.4.1 // indirect
|
||||
github.com/ipfs/go-datastore v0.6.0 // indirect
|
||||
|
@ -342,6 +349,7 @@ require (
|
|||
github.com/mdlayher/genetlink v1.3.2 // indirect
|
||||
github.com/mdlayher/netlink v1.7.2 // indirect
|
||||
github.com/mdlayher/socket v0.4.1 // indirect
|
||||
github.com/mdlayher/vsock v1.2.1 // indirect
|
||||
github.com/miekg/dns v1.1.58 // indirect
|
||||
github.com/miekg/pkcs11 v1.1.1 // indirect
|
||||
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
|
||||
|
@ -361,7 +369,6 @@ require (
|
|||
github.com/moby/sys/signal v0.7.1 // indirect
|
||||
github.com/moby/sys/symlink v0.3.0 // indirect
|
||||
github.com/moby/sys/user v0.3.0 // indirect
|
||||
github.com/moby/sys/userns v0.1.0 // indirect
|
||||
github.com/moby/term v0.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
|
@ -393,7 +400,6 @@ require (
|
|||
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 // indirect
|
||||
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
||||
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
|
||||
github.com/pierrec/lz4 v2.6.0+incompatible // indirect
|
||||
|
@ -406,7 +412,7 @@ require (
|
|||
github.com/quic-go/quic-go v0.42.0 // indirect
|
||||
github.com/quic-go/webtransport-go v0.6.0 // indirect
|
||||
github.com/raulk/go-watchdog v1.3.0 // indirect
|
||||
github.com/rs/xid v1.5.0 // indirect
|
||||
github.com/rs/xid v1.6.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/shengdoushi/base58 v1.0.0 // indirect
|
||||
github.com/soheilhy/cmux v0.1.5 // indirect
|
||||
|
@ -420,8 +426,7 @@ require (
|
|||
github.com/tchap/go-patricia/v2 v2.3.1 // indirect
|
||||
github.com/tidwall/btree v1.6.0 // indirect
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect
|
||||
github.com/urfave/cli/v2 v2.27.5 // indirect
|
||||
github.com/vbatts/tar-split v0.11.5 // indirect
|
||||
github.com/vbatts/tar-split v0.11.6 // indirect
|
||||
github.com/vishvananda/netns v0.0.4 // indirect
|
||||
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect
|
||||
github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 // indirect
|
||||
|
@ -431,18 +436,17 @@ require (
|
|||
go.etcd.io/etcd/client/v2 v2.305.16 // indirect
|
||||
go.etcd.io/etcd/pkg/v3 v3.5.16 // indirect
|
||||
go.etcd.io/etcd/raft/v3 v3.5.16 // indirect
|
||||
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 // indirect
|
||||
go.mozilla.org/pkcs7 v0.9.0 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful v0.42.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
|
||||
go.opentelemetry.io/otel v1.28.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.28.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.28.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect
|
||||
go.opentelemetry.io/otel v1.31.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.31.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.31.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.31.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
|
||||
go.uber.org/dig v1.17.1 // indirect
|
||||
go.uber.org/fx v1.20.1 // indirect
|
||||
|
@ -457,8 +461,8 @@ require (
|
|||
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6 // indirect
|
||||
gonum.org/v1/gonum v0.13.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect
|
||||
google.golang.org/protobuf v1.36.1 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/containerd/containerd/remotes/docker"
|
||||
"github.com/containerd/containerd/v2/core/remotes/docker"
|
||||
"github.com/k3s-io/k3s/pkg/agent/templates"
|
||||
util2 "github.com/k3s-io/k3s/pkg/agent/util"
|
||||
"github.com/k3s-io/k3s/pkg/daemons/config"
|
||||
|
|
|
@ -6,16 +6,16 @@ package containerd
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
overlayutils "github.com/containerd/containerd/snapshots/overlay/overlayutils"
|
||||
fuseoverlayfs "github.com/containerd/fuse-overlayfs-snapshotter"
|
||||
containerd "github.com/containerd/containerd/v2/client"
|
||||
"github.com/containerd/containerd/v2/plugins/snapshots/overlay/overlayutils"
|
||||
fuseoverlayfs "github.com/containerd/fuse-overlayfs-snapshotter/v2"
|
||||
stargz "github.com/containerd/stargz-snapshotter/service"
|
||||
"github.com/docker/docker/pkg/parsers/kernel"
|
||||
"github.com/k3s-io/k3s/pkg/agent/templates"
|
||||
"github.com/k3s-io/k3s/pkg/cgroups"
|
||||
"github.com/k3s-io/k3s/pkg/daemons/config"
|
||||
"github.com/k3s-io/k3s/pkg/version"
|
||||
"github.com/opencontainers/runc/libcontainer/userns"
|
||||
"github.com/moby/sys/userns"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/sys/unix"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
package containerd
|
||||
|
||||
import (
|
||||
"github.com/containerd/containerd"
|
||||
containerd "github.com/containerd/containerd/v2/client"
|
||||
"github.com/k3s-io/k3s/pkg/agent/templates"
|
||||
"github.com/k3s-io/k3s/pkg/daemons/config"
|
||||
util3 "github.com/k3s-io/k3s/pkg/util"
|
||||
|
|
|
@ -11,13 +11,11 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/images"
|
||||
"github.com/containerd/containerd/namespaces"
|
||||
"github.com/containerd/containerd/pkg/cri/constants"
|
||||
"github.com/containerd/containerd/pkg/cri/labels"
|
||||
"github.com/containerd/containerd/reference/docker"
|
||||
containerd "github.com/containerd/containerd/v2/client"
|
||||
"github.com/containerd/containerd/v2/core/images"
|
||||
"github.com/containerd/containerd/v2/pkg/namespaces"
|
||||
"github.com/containerd/errdefs"
|
||||
docker "github.com/distribution/reference"
|
||||
reference "github.com/google/go-containerregistry/pkg/name"
|
||||
"github.com/k3s-io/k3s/pkg/agent/cri"
|
||||
util2 "github.com/k3s-io/k3s/pkg/agent/util"
|
||||
|
@ -39,6 +37,16 @@ var (
|
|||
k3sPinnedImageLabelValue = "pinned"
|
||||
)
|
||||
|
||||
const (
|
||||
// these were previously exported via containerd/containerd/pkg/cri/constants
|
||||
// and containerd/containerd/pkg/cri/labels but have been made internal as of
|
||||
// containerd v2.
|
||||
criContainerdPrefix = "io.cri-containerd"
|
||||
criPinnedImageLabelKey = criContainerdPrefix + ".pinned"
|
||||
criPinnedImageLabelValue = "pinned"
|
||||
criK8sContainerdNamespace = "k8s.io"
|
||||
)
|
||||
|
||||
// Run configures and starts containerd as a child process. Once it is up, images are preloaded
|
||||
// or pulled from files found in the agent images directory.
|
||||
func Run(ctx context.Context, cfg *config.Node) error {
|
||||
|
@ -133,7 +141,7 @@ func PreloadImages(ctx context.Context, cfg *config.Node) error {
|
|||
imageClient := runtimeapi.NewImageServiceClient(criConn)
|
||||
|
||||
// Ensure that our images are imported into the correct namespace
|
||||
ctx = namespaces.WithNamespace(ctx, constants.K8sContainerdNamespace)
|
||||
ctx = namespaces.WithNamespace(ctx, criK8sContainerdNamespace)
|
||||
|
||||
// At startup all leases from k3s are cleared; we no longer use leases to lock content
|
||||
if err := clearLeases(ctx, client); err != nil {
|
||||
|
@ -261,7 +269,7 @@ func clearLabels(ctx context.Context, client *containerd.Client) error {
|
|||
}
|
||||
for _, image := range images {
|
||||
delete(image.Labels, k3sPinnedImageLabelKey)
|
||||
delete(image.Labels, labels.PinnedImageLabelKey)
|
||||
delete(image.Labels, criPinnedImageLabelKey)
|
||||
if _, err := imageService.Update(ctx, image, "labels"); err != nil {
|
||||
errs = append(errs, errors.Wrap(err, "failed to delete labels from image "+image.Name))
|
||||
}
|
||||
|
@ -276,7 +284,7 @@ func labelImages(ctx context.Context, client *containerd.Client, images []images
|
|||
imageService := client.ImageService()
|
||||
for i, image := range images {
|
||||
if image.Labels[k3sPinnedImageLabelKey] == k3sPinnedImageLabelValue &&
|
||||
image.Labels[labels.PinnedImageLabelKey] == labels.PinnedImageLabelValue {
|
||||
image.Labels[criPinnedImageLabelKey] == criPinnedImageLabelValue {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -285,7 +293,7 @@ func labelImages(ctx context.Context, client *containerd.Client, images []images
|
|||
}
|
||||
|
||||
image.Labels[k3sPinnedImageLabelKey] = k3sPinnedImageLabelValue
|
||||
image.Labels[labels.PinnedImageLabelKey] = labels.PinnedImageLabelValue
|
||||
image.Labels[criPinnedImageLabelKey] = criPinnedImageLabelValue
|
||||
updatedImage, err := imageService.Update(ctx, image, "labels")
|
||||
if err != nil {
|
||||
errs = append(errs, errors.Wrap(err, "failed to add labels to image "+image.Name))
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
containerd "github.com/containerd/containerd/v2/client"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/k3s-io/k3s/pkg/agent/cri"
|
||||
"github.com/k3s-io/k3s/pkg/daemons/config"
|
||||
|
|
|
@ -5,7 +5,7 @@ package cmds
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/containerd/containerd/pkg/userns"
|
||||
"github.com/moby/sys/userns"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rootless-containers/rootlesskit/pkg/parent/cgrouputil"
|
||||
)
|
||||
|
|
|
@ -21,31 +21,33 @@ package containerd
|
|||
|
||||
// register containerd builtins here
|
||||
import (
|
||||
_ "github.com/containerd/containerd/diff/walking/plugin"
|
||||
_ "github.com/containerd/containerd/events/plugin"
|
||||
_ "github.com/containerd/containerd/gc/scheduler"
|
||||
_ "github.com/containerd/containerd/leases/plugin"
|
||||
_ "github.com/containerd/containerd/metadata/plugin"
|
||||
_ "github.com/containerd/containerd/pkg/nri/plugin"
|
||||
_ "github.com/containerd/containerd/plugins/sandbox"
|
||||
_ "github.com/containerd/containerd/plugins/streaming"
|
||||
_ "github.com/containerd/containerd/plugins/transfer"
|
||||
_ "github.com/containerd/containerd/runtime/restart/monitor"
|
||||
_ "github.com/containerd/containerd/runtime/v2"
|
||||
_ "github.com/containerd/containerd/services/containers"
|
||||
_ "github.com/containerd/containerd/services/content"
|
||||
_ "github.com/containerd/containerd/services/diff"
|
||||
_ "github.com/containerd/containerd/services/events"
|
||||
_ "github.com/containerd/containerd/services/healthcheck"
|
||||
_ "github.com/containerd/containerd/services/images"
|
||||
_ "github.com/containerd/containerd/services/introspection"
|
||||
_ "github.com/containerd/containerd/services/leases"
|
||||
_ "github.com/containerd/containerd/services/namespaces"
|
||||
_ "github.com/containerd/containerd/services/opt"
|
||||
_ "github.com/containerd/containerd/services/sandbox"
|
||||
_ "github.com/containerd/containerd/services/snapshots"
|
||||
_ "github.com/containerd/containerd/services/streaming"
|
||||
_ "github.com/containerd/containerd/services/tasks"
|
||||
_ "github.com/containerd/containerd/services/transfer"
|
||||
_ "github.com/containerd/containerd/services/version"
|
||||
_ "github.com/containerd/containerd/v2/core/runtime/v2"
|
||||
_ "github.com/containerd/containerd/v2/plugins/content/local/plugin"
|
||||
_ "github.com/containerd/containerd/v2/plugins/events"
|
||||
_ "github.com/containerd/containerd/v2/plugins/gc"
|
||||
_ "github.com/containerd/containerd/v2/plugins/imageverifier"
|
||||
_ "github.com/containerd/containerd/v2/plugins/leases"
|
||||
_ "github.com/containerd/containerd/v2/plugins/metadata"
|
||||
_ "github.com/containerd/containerd/v2/plugins/nri"
|
||||
_ "github.com/containerd/containerd/v2/plugins/restart"
|
||||
_ "github.com/containerd/containerd/v2/plugins/sandbox"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/containers"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/content"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/diff"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/events"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/healthcheck"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/images"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/introspection"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/leases"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/namespaces"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/opt"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/sandbox"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/snapshots"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/streaming"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/tasks"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/transfer"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/version"
|
||||
_ "github.com/containerd/containerd/v2/plugins/services/warning"
|
||||
_ "github.com/containerd/containerd/v2/plugins/streaming"
|
||||
_ "github.com/containerd/containerd/v2/plugins/transfer"
|
||||
)
|
||||
|
|
|
@ -19,4 +19,8 @@
|
|||
|
||||
package containerd
|
||||
|
||||
import _ "github.com/containerd/containerd/pkg/cri"
|
||||
import (
|
||||
_ "github.com/containerd/containerd/v2/plugins/cri"
|
||||
_ "github.com/containerd/containerd/v2/plugins/cri/images"
|
||||
_ "github.com/containerd/containerd/v2/plugins/cri/runtime"
|
||||
)
|
||||
|
|
|
@ -20,16 +20,16 @@
|
|||
package containerd
|
||||
|
||||
import (
|
||||
_ "github.com/containerd/aufs/plugin"
|
||||
_ "github.com/containerd/containerd/metrics"
|
||||
_ "github.com/containerd/containerd/metrics/cgroups"
|
||||
_ "github.com/containerd/containerd/metrics/cgroups/v2"
|
||||
_ "github.com/containerd/containerd/runtime/v2/runc/options"
|
||||
_ "github.com/containerd/containerd/snapshots/btrfs/plugin"
|
||||
_ "github.com/containerd/containerd/snapshots/devmapper/plugin"
|
||||
_ "github.com/containerd/containerd/snapshots/native/plugin"
|
||||
_ "github.com/containerd/containerd/snapshots/overlay/plugin"
|
||||
_ "github.com/containerd/fuse-overlayfs-snapshotter/plugin"
|
||||
_ "github.com/containerd/containerd/api/types/runc/options"
|
||||
_ "github.com/containerd/containerd/v2/core/metrics/cgroups"
|
||||
_ "github.com/containerd/containerd/v2/core/metrics/cgroups/v2"
|
||||
_ "github.com/containerd/containerd/v2/plugins/diff/walking/plugin"
|
||||
_ "github.com/containerd/containerd/v2/plugins/snapshots/blockfile/plugin"
|
||||
_ "github.com/containerd/containerd/v2/plugins/snapshots/btrfs/plugin"
|
||||
_ "github.com/containerd/containerd/v2/plugins/snapshots/devmapper/plugin"
|
||||
_ "github.com/containerd/containerd/v2/plugins/snapshots/native/plugin"
|
||||
_ "github.com/containerd/containerd/v2/plugins/snapshots/overlay/plugin"
|
||||
_ "github.com/containerd/fuse-overlayfs-snapshotter/v2/plugin"
|
||||
_ "github.com/containerd/stargz-snapshotter/service/plugin"
|
||||
_ "github.com/containerd/zfs/plugin"
|
||||
_ "github.com/containerd/zfs/v2/plugin"
|
||||
)
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
package containerd
|
||||
|
||||
import (
|
||||
_ "github.com/containerd/containerd/diff/lcow"
|
||||
_ "github.com/containerd/containerd/diff/windows"
|
||||
_ "github.com/containerd/containerd/snapshots/lcow"
|
||||
_ "github.com/containerd/containerd/snapshots/windows"
|
||||
_ "github.com/containerd/containerd/v2/plugins/diff/lcow"
|
||||
_ "github.com/containerd/containerd/v2/plugins/diff/windows"
|
||||
_ "github.com/containerd/containerd/v2/plugins/snapshots/lcow"
|
||||
_ "github.com/containerd/containerd/v2/plugins/snapshots/windows"
|
||||
)
|
||||
|
|
|
@ -7,13 +7,10 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/containerd/containerd/cmd/containerd/command"
|
||||
"github.com/containerd/containerd/pkg/seed"
|
||||
"github.com/containerd/containerd/v2/cmd/containerd/command"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
//klog.InitFlags(nil)
|
||||
seed.WithTimeAndRand()
|
||||
app := command.App()
|
||||
if err := app.Run(os.Args); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "containerd: %s\n", err)
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
package containerd
|
||||
|
||||
import (
|
||||
"github.com/containerd/containerd/snapshots/overlay/overlayutils"
|
||||
fuseoverlayfs "github.com/containerd/fuse-overlayfs-snapshotter"
|
||||
"github.com/containerd/containerd/v2/plugins/snapshots/overlay/overlayutils"
|
||||
fuseoverlayfs "github.com/containerd/fuse-overlayfs-snapshotter/v2"
|
||||
stargz "github.com/containerd/stargz-snapshotter/service"
|
||||
)
|
||||
|
||||
|
|
|
@ -20,9 +20,8 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/containerd/containerd/cmd/ctr/app"
|
||||
"github.com/containerd/containerd/pkg/seed"
|
||||
"github.com/urfave/cli"
|
||||
"github.com/containerd/containerd/v2/cmd/ctr/app"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
|
@ -30,14 +29,13 @@ func Main() {
|
|||
}
|
||||
|
||||
func main() {
|
||||
seed.WithTimeAndRand()
|
||||
app := app.New()
|
||||
for i, flag := range app.Flags {
|
||||
if sFlag, ok := flag.(cli.StringFlag); ok {
|
||||
if sFlag.Name == "address, a" {
|
||||
if sFlag, ok := flag.(*cli.StringFlag); ok {
|
||||
if sFlag.Name == "address" {
|
||||
sFlag.Value = "/run/k3s/containerd/containerd.sock"
|
||||
app.Flags[i] = sFlag
|
||||
} else if sFlag.Name == "namespace, n" {
|
||||
} else if sFlag.Name == "namespace" {
|
||||
sFlag.Value = "k8s.io"
|
||||
app.Flags[i] = sFlag
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package spegel
|
|||
import (
|
||||
"net"
|
||||
|
||||
"github.com/containerd/containerd/remotes/docker"
|
||||
"github.com/containerd/containerd/v2/core/remotes/docker"
|
||||
"github.com/k3s-io/k3s/pkg/daemons/config"
|
||||
"github.com/rancher/wharfie/pkg/registries"
|
||||
)
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/containerd/containerd/remotes/docker"
|
||||
"github.com/containerd/containerd/v2/core/remotes/docker"
|
||||
"github.com/k3s-io/k3s/pkg/agent/https"
|
||||
"github.com/k3s-io/k3s/pkg/clientaccess"
|
||||
"github.com/k3s-io/k3s/pkg/daemons/config"
|
||||
|
|
|
@ -8,7 +8,7 @@ cd $(dirname $0)/..
|
|||
GO=${GO-go}
|
||||
|
||||
PKG="github.com/k3s-io/k3s"
|
||||
PKG_CONTAINERD="github.com/containerd/containerd"
|
||||
PKG_CONTAINERD="github.com/containerd/containerd/v2"
|
||||
PKG_CRICTL="sigs.k8s.io/cri-tools/pkg"
|
||||
PKG_K8S_BASE="k8s.io/component-base"
|
||||
PKG_K8S_CLIENT="k8s.io/client-go/pkg"
|
||||
|
|
|
@ -36,7 +36,7 @@ case ${OS} in
|
|||
;;
|
||||
esac
|
||||
|
||||
git clone --single-branch --branch=${VERSION_CONTAINERD} --depth=1 https://${PKG_CONTAINERD_K3S} ${CONTAINERD_DIR}
|
||||
git clone --single-branch --branch=${VERSION_CONTAINERD} --depth=1 https://${PKG_CONTAINERD_K3S/\/v*/} ${CONTAINERD_DIR}
|
||||
|
||||
for CHART_FILE in $(grep -rlF HelmChart manifests/ | xargs yq eval --no-doc .spec.chart | xargs -n1 basename); do
|
||||
CHART_NAME=$(echo $CHART_FILE | grep -oE '^(-*[a-z])+')
|
||||
|
|
|
@ -8,8 +8,8 @@ cd $(dirname $0)/..
|
|||
GO=${GO-go}
|
||||
|
||||
PKG="github.com/k3s-io/k3s"
|
||||
PKG_CONTAINERD="github.com/containerd/containerd"
|
||||
PKG_K3S_CONTAINERD="github.com/k3s-io/containerd"
|
||||
PKG_CONTAINERD="github.com/containerd/containerd/v2"
|
||||
PKG_K3S_CONTAINERD="github.com/k3s-io/containerd/v2"
|
||||
PKG_CRICTL="sigs.k8s.io/cri-tools/pkg"
|
||||
PKG_K8S_BASE="k8s.io/component-base"
|
||||
PKG_K8S_CLIENT="k8s.io/client-go/pkg"
|
||||
|
|
|
@ -31,8 +31,8 @@ get-module-path(){
|
|||
go list -m -f '{{if .Replace}}{{.Replace.Path}}{{else}}{{.Path}}{{end}}' $1
|
||||
}
|
||||
|
||||
PKG_CONTAINERD_K3S=$(get-module-path github.com/containerd/containerd)
|
||||
VERSION_CONTAINERD=$(get-module-version github.com/containerd/containerd)
|
||||
PKG_CONTAINERD_K3S=$(get-module-path github.com/containerd/containerd/v2)
|
||||
VERSION_CONTAINERD=$(get-module-version github.com/containerd/containerd/v2)
|
||||
if [ -z "$VERSION_CONTAINERD" ]; then
|
||||
VERSION_CONTAINERD="v0.0.0"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue