Documentation
¶
Index ¶
- Constants
- Variables
- func HasTarfsHint(labels map[string]string) bool
- func IsNydusDataLayer(labels map[string]string) bool
- func IsNydusMetaLayer(labels map[string]string) bool
- func IsNydusProxyMode(labels map[string]string) bool
- func IsTarfsDataLayer(labels map[string]string) bool
- func RafsInstanceID(snapshotID string, idMapping *IDMapping) string
- func RafsInstanceIDFromLabels(snapshotID string, labels map[string]string) (string, error)
- type IDMapping
Constants ¶
View Source
const ( CRIImageRef = snpkg.TargetRefLabel CRIImageLayers = snpkg.TargetImageLayersLabel CRILayerDigest = snpkg.TargetLayerDigestLabel CRIManifestDigest = snpkg.TargetManifestDigestLabel )
For package compatibility, we still keep the old exported name here.
View Source
const ( // Marker for remote snapshotter to handle the pull request. // During image pull, the containerd client calls Prepare API with the label containerd.io/snapshot.ref. // This is a containerd-defined label which contains ChainID that targets a committed snapshot that the // client is trying to prepare. TargetSnapshotRef = "containerd.io/snapshot.ref" // A bool flag to mark the blob as a Nydus data blob, set by image builders. NydusDataLayer = "containerd.io/snapshot/nydus-blob" // A bool flag to mark the blob as a nydus bootstrap, set by image builders. NydusMetaLayer = "containerd.io/snapshot/nydus-bootstrap" // The referenced blob sha256 in format of `sha256:xxx`, set by image builders. NydusRefLayer = "containerd.io/snapshot/nydus-ref" // The blobID of associated layer, also marking the layer as a nydus tarfs, set by the snapshotter NydusTarfsLayer = "containerd.io/snapshot/nydus-tarfs" // Dm-verity information for image block device NydusImageBlockInfo = "containerd.io/snapshot/nydus-image-block" // Dm-verity information for layer block device NydusLayerBlockInfo = "containerd.io/snapshot/nydus-layer-block" // Annotation containing secret to pull images from registry, set by the snapshotter. NydusImagePullSecret = "containerd.io/snapshot/pullsecret" // Annotation containing username to pull images from registry, set by the snapshotter. NydusImagePullUsername = "containerd.io/snapshot/pullusername" // Proxy image pull actions to other agents. NydusProxyMode = "containerd.io/snapshot/nydus-proxy-mode" // A bool flag to enable integrity verification of meta data blob NydusSignature = "containerd.io/snapshot/nydus-signature" // A bool flag to mark the blob as a estargz data blob, set by the snapshotter. StargzLayer = "containerd.io/snapshot/stargz" // volatileOpt is a key of an optional label to each snapshot. // If this optional label of a snapshot is specified, when mounted to rootdir // this snapshot will include volatile option OverlayfsVolatileOpt = "containerd.io/snapshot/overlay.volatile" // A bool flag to mark it is recommended to run this image with tarfs mode, set by image builders. // runtime can decide whether to rely on this annotation TarfsHint = "containerd.io/snapshot/tarfs-hint" // An alternative nydus index manifest exists in the original OCI index manifest for this snapshot NydusIndexAlternative = "containerd.io/snapshot/nydus-index-alternative" SnapshotUIDMapping = snapshots.LabelSnapshotUIDMapping SnapshotGIDMapping = snapshots.LabelSnapshotGIDMapping )
Variables ¶
View Source
var AppendLabelsHandlerWrapper = snpkg.AppendInfoHandlerWrapper
For package compatibility, we still keep the old exported name here.
Functions ¶
func HasTarfsHint ¶ added in v0.12.0
func IsNydusDataLayer ¶ added in v0.8.0
func IsNydusMetaLayer ¶ added in v0.8.0
func IsNydusProxyMode ¶ added in v0.12.0
func IsTarfsDataLayer ¶ added in v0.12.0
func RafsInstanceID ¶ added in v0.15.16
Types ¶
type IDMapping ¶ added in v0.15.16
type IDMapping struct {
Internal uint32 // User/Group ID inside the container (namespace)
External uint32 // Mapped User/Group ID on the host
Range uint32 // Number of contiguous IDs in the mapping
}
IDMapping represents a contiguous UID/GID mapping tuple (Internal, External, Range), matching nydusd's `RafsConfigV2.id_mapping` format.
func ParseIDMapping ¶ added in v0.15.16
ParseIDMapping extracts raw UID/GID mappings from snapshot labels. It enforces that UID and GID mappings are identical and returns a single unified IDMapping. Returns nil with no error if idmap labels are absent.
Click to show internal directories.
Click to hide internal directories.