Documentation
¶
Overview ¶
Package v1alpha1 is for the shared File logic across both the cluster and distro api's
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinarySelector ¶
type BinarySelector struct {
// Roles arbitrary list of roles to upload files too
Roles []string `json:"roles,omitempty"`
// Profile what type of node to upload files too
Profile string `json:"profile,omitempty" jsonschema:"enum=worker,enum=controller"`
// Package what type of engine binary will be used to install
Package string `json:"package,omitempty" jsonschema:"enum=rpm,enum=apt,enum=binary"`
}
BinarySelector allows for filtering files based on certain criteria
type LocalFile ¶
type LocalFile struct {
// Path to the file that will be uploaded
Path string
// PermMode permission of the file
PermMode string
}
LocalFile runtime information that will be used for the local files
type ZarfFile ¶
type ZarfFile struct {
// Data file contents
Data string `json:"data,omitempty"`
// Executable if the file should have executable permissions
Executable bool `json:"executable,omitempty"`
// ExtractPath used to extract a file from a tar ball
ExtractPath string `json:"extractPath,omitempty"`
// Group to which the file will be owned by
Group string `json:"group,omitempty"`
// Name id, not the actual file name
Name string `json:"name,omitempty"`
// PermMode what permissions will be applied to the file
PermMode any `json:"perm,omitempty"`
// Selector used to determine if this file should be uploaded to the node
Selector BinarySelector `json:"selector,omitempty"`
// Shasum is used to check the file during sourcing of the distro package
Shasum string `json:"shasum,omitempty"`
// Source path the file should be found during package creation
Source string `json:"source"`
// Symlinks that will be created from the Target file
Symlinks []string `json:"symlinks,omitempty"`
// Target path on the remote host that will created
Target string `json:"target"`
// TargetIsDir if the target is a directory, normally used for image upload logic
TargetIsDir bool `json:"isDirectory,omitempty"`
// User to which the file will be owned by
User string `json:"user,omitempty"`
// Base is runtime option
Base string `json:"-"`
// PermString is runtime option
PermString string `json:"-"`
// DirPermString is runtime option
DirPermString string `json:"-"`
// OriginalTarget is runtime option
OriginalTarget string `json:"-"`
// LocalSource is runtime option
LocalSource LocalFile `json:"-"`
}
ZarfFile used by both Distro and Cluster logic
func (*ZarfFile) Owner ¶
Owner returns a chown compatible user:group string from User and Group, or empty when neither are set.
func (*ZarfFile) TargetDirectory ¶
TargetDirectory returns the directory for the target file
Click to show internal directories.
Click to hide internal directories.