Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions internal/cri/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ type ImageConfig struct {
// When transfer service is used to pull images, pull related configs, like max_concurrent_downloads
// and unpack_config are configured under [plugins."io.containerd.transfer.v1.local"]
UseLocalImagePull bool `toml:"use_local_image_pull" json:"useLocalImagePull"`

// Limit the number of manifests that will be unpacked during image pulls.
// The default is to unpack all the manifests that match the current platform
// but this can help limit the amount of returned manifests further
ManifestLimit int `toml:"manifest_limit" json:"manifestLimit"`
}

// RuntimeConfig contains toml config related to CRI plugin,
Expand Down
1 change: 1 addition & 0 deletions internal/cri/server/images/image_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ func (c *CRIImageService) pullImageWithTransferService(
sopts = append(sopts, transferimage.WithPlatforms(platforms.DefaultSpec()))
sopts = append(sopts, transferimage.WithUnpack(platforms.DefaultSpec(), snapshotter))
sopts = append(sopts, transferimage.WithImageLabels(labels))
sopts = append(sopts, transferimage.WithManifestLimit(c.config.ManifestLimit))
is := transferimage.NewStore(ref, sopts...)
log.G(ctx).Debugf("Getting new CRI credentials")
ch := newCRICredentials(ref, credentials)
Expand Down