package service
import "github.com/containerd/stargz-snapshotter/service"
Index ¶
- func NewStargzSnapshotterService(ctx context.Context, root string, config *Config, opts ...Option) (snapshots.Snapshotter, error)
- func Supported(root string) error
- type CRIKeychainConfig
- type Config
- type KubeconfigKeychainConfig
- type Option
- func WithCredsFuncs(creds ...resolver.Credential) Option
- func WithCustomRegistryHosts(hosts source.RegistryHosts) Option
- func WithFilesystemOptions(opts ...stargzfs.Option) Option
- type ResolverConfig
- type SnapshotterConfig
Functions ¶
func NewStargzSnapshotterService ¶
func NewStargzSnapshotterService(ctx context.Context, root string, config *Config, opts ...Option) (snapshots.Snapshotter, error)
NewStargzSnapshotterService returns stargz snapshotter.
func Supported ¶
Supported returns nil when the remote snapshotter is functional on the system with the root directory. Supported is not called during plugin initialization, but exposed for downstream projects which uses this snapshotter as a library.
Types ¶
type CRIKeychainConfig ¶
type CRIKeychainConfig struct { // EnableKeychain enables CRI-based keychain EnableKeychain bool `toml:"enable_keychain"` // ImageServicePath is the path to the unix socket of backing CRI Image Service (e.g. containerd CRI plugin) ImageServicePath string `toml:"image_service_path"` }
CRIKeychainConfig is config for CRI-based keychain.
type Config ¶
type Config struct { config.Config // KubeconfigKeychainConfig is config for kubeconfig-based keychain. KubeconfigKeychainConfig `toml:"kubeconfig_keychain"` // CRIKeychainConfig is config for CRI-based keychain. CRIKeychainConfig `toml:"cri_keychain"` // ResolverConfig is config for resolving registries. ResolverConfig `toml:"resolver"` // SnapshotterConfig is snapshotter-related config. SnapshotterConfig `toml:"snapshotter"` }
Config is configuration for stargz snapshotter service.
type KubeconfigKeychainConfig ¶
type KubeconfigKeychainConfig struct { // EnableKeychain enables kubeconfig-based keychain EnableKeychain bool `toml:"enable_keychain"` // KubeconfigPath is the path to kubeconfig which can be used to sync // secrets on the cluster into this snapshotter. KubeconfigPath string `toml:"kubeconfig_path"` }
KubeconfigKeychainConfig is config for kubeconfig-based keychain.
type Option ¶
type Option func(*options)
func WithCredsFuncs ¶
func WithCredsFuncs(creds ...resolver.Credential) Option
WithCredsFuncs specifies credsFuncs to be used for connecting to the registries.
func WithCustomRegistryHosts ¶
func WithCustomRegistryHosts(hosts source.RegistryHosts) Option
WithCustomRegistryHosts is registry hosts to use instead.
func WithFilesystemOptions ¶
WithFilesystemOptions allowes to pass filesystem-related configuration.
type ResolverConfig ¶
ResolverConfig is config for resolving registries.
type SnapshotterConfig ¶
type SnapshotterConfig struct { // AllowInvalidMountsOnRestart allows that there are snapshot mounts that cannot access to the // data source when restarting the snapshotter. // NOTE: User needs to manually remove the snapshots from containerd's metadata store using // ctr (e.g. `ctr snapshot rm`). AllowInvalidMountsOnRestart bool `toml:"allow_invalid_mounts_on_restart"` }
SnapshotterConfig is snapshotter-related config.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
service/keychain | |
service/keychain/cri | |
service/keychain/dockerconfig | |
service/keychain/kubeconfig | |
service/plugin | |
service/plugincore | |
service/resolver |
- Version
- v0.16.3 (latest)
- Published
- Dec 12, 2024
- Platform
- linux/amd64
- Imports
- 19 packages
- Last checked
- 2 weeks ago –
Tools for package owners.