Documentation
¶
Index ¶
- Constants
- func GetCacheGCPeriod() time.Duration
- func GetConfigRoot() string
- func GetDaemonProfileCPUDuration() int64
- func GetDaemonThreadsNumber() int
- func GetFsDriver() string
- func GetLogDir() string
- func GetLogLevel() string
- func GetLogToStdout() bool
- func GetMirrorsConfigDir() string
- func GetSnapshotsRootDir() string
- func GetSocketRoot() string
- func IsSystemControllerEnabled() bool
- func MergeConfig(to, from *SnapshotterConfig) error
- func ParseParameters(args *flags.Args, cfg *SnapshotterConfig) error
- func ProcessConfigurations(c *SnapshotterConfig) error
- func SystemControllerAddress() string
- func SystemControllerPprofAddress() string
- func ValidateConfig(c *SnapshotterConfig) error
- type AuthConfig
- type CacheManagerConfig
- type DaemonConfig
- type DaemonMode
- type DaemonRecoverPolicy
- type DebugConfig
- type Experimental
- type GlobalConfig
- type ImageConfig
- type LoggingConfig
- type MetricsConfig
- type MirrorsConfig
- type RemoteConfig
- type SnapshotConfig
- type SnapshotterConfig
- type SystemControllerConfig
Constants ¶
const ( FsDriverFusedev string = "fusedev" FsDriverFscache string = "fscache" )
const (
DefaultLogLevel string = "info"
)
Variables ¶
This section is empty.
Functions ¶
func GetCacheGCPeriod ¶ added in v0.6.0
func GetConfigRoot ¶ added in v0.6.0
func GetConfigRoot() string
func GetDaemonProfileCPUDuration ¶ added in v0.6.0
func GetDaemonProfileCPUDuration() int64
func GetDaemonThreadsNumber ¶ added in v0.6.0
func GetDaemonThreadsNumber() int
func GetFsDriver ¶ added in v0.5.0
func GetFsDriver() string
func GetLogLevel ¶ added in v0.6.0
func GetLogLevel() string
func GetLogToStdout ¶ added in v0.6.0
func GetLogToStdout() bool
func GetMirrorsConfigDir ¶ added in v0.6.0
func GetMirrorsConfigDir() string
func GetSnapshotsRootDir ¶ added in v0.6.0
func GetSnapshotsRootDir() string
func GetSocketRoot ¶ added in v0.6.0
func GetSocketRoot() string
func IsSystemControllerEnabled ¶ added in v0.6.0
func IsSystemControllerEnabled() bool
func MergeConfig ¶ added in v0.6.0
func MergeConfig(to, from *SnapshotterConfig) error
func ParseParameters ¶ added in v0.6.0
func ParseParameters(args *flags.Args, cfg *SnapshotterConfig) error
Parse command line arguments and fill the nydus-snapshotter configuration Always let options from CLI override those from configuration file.
func ProcessConfigurations ¶ added in v0.6.0
func ProcessConfigurations(c *SnapshotterConfig) error
func SystemControllerAddress ¶ added in v0.6.0
func SystemControllerAddress() string
func SystemControllerPprofAddress ¶ added in v0.7.0
func SystemControllerPprofAddress() string
func ValidateConfig ¶ added in v0.6.0
func ValidateConfig(c *SnapshotterConfig) error
Types ¶
type AuthConfig ¶ added in v0.6.0
type AuthConfig struct {
// based on kubeconfig or ServiceAccount
EnableKubeconfigKeychain bool `toml:"enable_kubeconfig_keychain"`
KubeconfigPath string `toml:"kubeconfig_path"`
// CRI proxy mode
EnableCRIKeychain bool `toml:"enable_cri_keychain"`
ImageServiceAddress string `toml:"image_service_address"`
}
Configure how nydus-snapshotter receive auth information
type CacheManagerConfig ¶ added in v0.6.0
type CacheManagerConfig struct {
Disable bool `toml:"disable"`
// Trigger GC gc_period after the specified period.
// Example format: 24h, 120min
GCPeriod string `toml:"gc_period"`
CacheDir string `toml:"cache_dir"`
}
Configure cache manager that manages the cache files lifecycle
type DaemonConfig ¶
type DaemonConfig struct {
NydusdPath string `toml:"nydusd_path"`
NydusImagePath string `toml:"nydusimage_path"`
NydusdConfigPath string `toml:"nydusd_config"`
RecoverPolicy string `toml:"recover_policy"`
FsDriver string `toml:"fs_driver"`
ThreadsNumber int `toml:"threads_number"`
}
Configure how to start and recover nydusd daemons
type DaemonMode ¶ added in v0.4.0
type DaemonMode string
Define a policy how to fork nydusd daemon and attach file system instances to serve.
const ( // One nydusd, one rafs instance DaemonModeMultiple DaemonMode = "multiple" DaemonModeShared DaemonMode = "shared" // No nydusd daemon is needed to be started. Snapshotter does not start any nydusd // and only interacts with containerd with mount slice to pass necessary configuration // to container runtime DaemonModeNone DaemonMode = "none" DaemonModeInvalid DaemonMode = "" )
func GetDaemonMode ¶ added in v0.5.0
func GetDaemonMode() DaemonMode
type DaemonRecoverPolicy ¶ added in v0.6.0
type DaemonRecoverPolicy int
const ( RecoverPolicyInvalid DaemonRecoverPolicy = iota RecoverPolicyNone RecoverPolicyRestart RecoverPolicyFailover )
func ParseRecoverPolicy ¶ added in v0.6.0
func ParseRecoverPolicy(p string) (DaemonRecoverPolicy, error)
func (DaemonRecoverPolicy) String ¶ added in v0.6.0
func (p DaemonRecoverPolicy) String() string
type DebugConfig ¶ added in v0.6.0
type Experimental ¶ added in v0.6.0
type Experimental struct {
EnableStargz bool `toml:"enable_stargz"`
}
type GlobalConfig ¶ added in v0.6.0
type GlobalConfig struct {
SnapshotsDir string
DaemonMode DaemonMode
SocketRoot string
ConfigRoot string
DaemonThreadsNum int
CacheGCPeriod time.Duration
MirrorsConfig MirrorsConfig
// contains filtered or unexported fields
}
Retain the configurations that must be parsed and converted and the configurations that are not easy to access from some modules. Or avoid calculating repeatedly
type ImageConfig ¶ added in v0.6.0
type ImageConfig struct {
PublicKeyFile string `toml:"public_key_file"`
ValidateSignature bool `toml:"validate_signature"`
}
Nydus image layers additional process
type LoggingConfig ¶ added in v0.6.0
type LoggingConfig struct {
LogToStdout bool `toml:"log_to_stdout"`
LogLevel string `toml:"level"`
LogDir string `toml:"dir"`
RotateLogMaxSize int `toml:"log_rotation_max_size"`
RotateLogMaxBackups int `toml:"log_rotation_max_backups"`
RotateLogMaxAge int `toml:"log_rotation_max_age"`
RotateLogLocalTime bool `toml:"log_rotation_local_time"`
RotateLogCompress bool `toml:"log_rotation_compress"`
}
type MetricsConfig ¶ added in v0.6.0
type MetricsConfig struct {
Address string `toml:"address"`
}
type MirrorsConfig ¶ added in v0.6.0
type MirrorsConfig struct {
Dir string `toml:"dir"`
}
type RemoteConfig ¶ added in v0.6.0
type RemoteConfig struct {
AuthConfig AuthConfig `toml:"auth"`
ConvertVpcRegistry bool `toml:"convert_vpc_registry"`
MirrorsConfig MirrorsConfig `toml:"mirrors_config"`
}
Configure remote storage like container registry
type SnapshotConfig ¶ added in v0.6.0
type SnapshotConfig struct {
EnableNydusOverlayFS bool `toml:"enable_nydus_overlayfs"`
SyncRemove bool `toml:"sync_remove"`
}
Configure containerd snapshots interfaces and how to process the snapshots requests from containerd
type SnapshotterConfig ¶ added in v0.4.0
type SnapshotterConfig struct {
// Configuration format version
Version int `toml:"version"`
// Snapshotter's root work directory
Root string `toml:"root"`
Address string `toml:"address"`
DaemonMode string `toml:"daemon_mode"`
// Clean up all the resources when snapshotter is closed
CleanupOnClose bool `toml:"cleanup_on_close"`
SystemControllerConfig SystemControllerConfig `toml:"system"`
MetricsConfig MetricsConfig `toml:"metrics"`
DaemonConfig DaemonConfig `toml:"daemon"`
SnapshotsConfig SnapshotConfig `toml:"snapshot"`
RemoteConfig RemoteConfig `toml:"remote"`
ImageConfig ImageConfig `toml:"image"`
CacheManagerConfig CacheManagerConfig `toml:"cache_manager"`
LoggingConfig LoggingConfig `toml:"log"`
Experimental Experimental `toml:"experimental"`
}
func LoadSnapshotterConfig ¶ added in v0.4.0
func LoadSnapshotterConfig(path string) (*SnapshotterConfig, error)
func (*SnapshotterConfig) FillUpWithDefaults ¶ added in v0.6.0
func (c *SnapshotterConfig) FillUpWithDefaults() error
func (*SnapshotterConfig) SetupNydusBinaryPaths ¶ added in v0.6.0
func (c *SnapshotterConfig) SetupNydusBinaryPaths() error
type SystemControllerConfig ¶ added in v0.6.0
type SystemControllerConfig struct {
Enable bool `toml:"enable"`
Address string `toml:"address"`
DebugConfig DebugConfig `toml:"debug"`
}