Documentation
¶
Index ¶
- Constants
- Variables
- func AutoRemove() error
- func CiliumConfigPath() string
- func GetPackageManager() (syspkg.PackageManager, error)
- func GetRegistriesConfPath() string
- func Installers() map[string]InstallerFunc
- func IsSupportedAlgorithm(algorithm string) bool
- func NewChecksumError(filePath, algorithm, expectedHash, actualHash string) *errorx.Error
- func NewCleanupError(cause error, downloadFolder string) *errorx.Error
- func NewConfigLoadError(cause error) *errorx.Error
- func NewConfigurationError(cause error, softwareName string) *errorx.Error
- func NewDownloadError(cause error, url string, statusCode int) *errorx.Error
- func NewExtractionError(cause error, filePath, destPath string) *errorx.Error
- func NewFileNotFoundError(filePath string) *errorx.Error
- func NewFileSystemError(cause error) *errorx.Error
- func NewInstallationError(cause error, softwareName, version string) *errorx.Error
- func NewInvalidURLError(cause error, url string) *errorx.Error
- func NewPathTraversalError(entryName string) *errorx.Error
- func NewPlatformNotFoundError(softwareName, version, os, arch string) *errorx.Error
- func NewSoftwareNotFoundError(softwareName string) *errorx.Error
- func NewTemplateError(cause error, softwareName string) *errorx.Error
- func NewUninstallationError(cause error, softwareName, version string) *errorx.Error
- func NewVersionNotFoundError(softwareName, version string) *errorx.Error
- func ReconfigureCiliumConfig() (string, error)
- func RefreshPackageIndex() error
- func ResetCatalogCacheForTest()
- func SafeErrorDetails(err *errorx.Error) []string
- func VerifyChecksum(filePath string, expectedValue string, algorithm string) error
- func WithPackageManager(pm syspkg.PackageManager) func(*PackageInstaller)
- func WithPackageName(name string) func(*PackageInstaller)
- func WithPackageOptions(opts manager.Options) func(*PackageInstaller)
- type ArchiveDetail
- type ArtifactMetadata
- type AutoRemover
- type BinaryDetail
- type ChartMetadata
- type ChartType
- type Checksum
- type ConfigDetail
- type Downloader
- type DownloaderOption
- func WithAllowedDomains(domains []string) DownloaderOption
- func WithBasePath(basePath string) DownloaderOption
- func WithHTTPClient(client *http.Client) DownloaderOption
- func WithInsecureTLS(insecure bool) DownloaderOption
- func WithMaxAttempts(attempts int) DownloaderOption
- func WithRetryDelay(delay time.Duration) DownloaderOption
- func WithTimeout(timeout time.Duration) DownloaderOption
- type InfrastructureCatalog
- type InstallerFunc
- type InstallerOption
- type MachineRuntime
- type Package
- type PackageInstaller
- func (p *PackageInstaller) Info() (*syspkg.PackageInfo, error)
- func (p *PackageInstaller) Install() (*syspkg.PackageInfo, error)
- func (p *PackageInstaller) IsInstalled() bool
- func (p *PackageInstaller) Name() string
- func (p *PackageInstaller) Uninstall() (*syspkg.PackageInfo, error)
- func (p *PackageInstaller) Upgrade() (*syspkg.PackageInfo, error)
- type PlatformChecksum
- type Software
- func NewCiliumInstaller(opts ...InstallerOption) (Software, error)
- func NewCrioInstaller(opts ...InstallerOption) (Software, error)
- func NewDaemonInstaller(opts ...InstallerOption) (Software, error)
- func NewHelmInstaller(opts ...InstallerOption) (Software, error)
- func NewK9sInstaller(opts ...InstallerOption) (Software, error)
- func NewKubeadmInstaller(opts ...InstallerOption) (Software, error)
- func NewKubectlInstaller(opts ...InstallerOption) (Software, error)
- func NewKubeletInstaller(opts ...InstallerOption) (Software, error)
- func NewTeleportNodeAgentInstaller(opts ...InstallerOption) (Software, error)
- func NewTeleportNodeAgentInstallerWithConfig(configOpts *TeleportNodeAgentConfigureOptions, opts ...InstallerOption) (Software, error)
- type TeleportNodeAgentConfigureOptions
- type TemplateData
- type Version
- type VersionDetails
- func (v VersionDetails) BinariesByArchive() []BinaryDetail
- func (v VersionDetails) BinariesByURL() []BinaryDetail
- func (v VersionDetails) ConfigsByArchive() []ConfigDetail
- func (v VersionDetails) ConfigsByURL() []ConfigDetail
- func (v VersionDetails) GetArchiveByName(archiveName string) (*ArchiveDetail, error)
- func (v VersionDetails) GetArchives() []ArchiveDetail
- func (v VersionDetails) GetBinaries() []BinaryDetail
- func (v VersionDetails) GetBinaryByName(binaryName string) (*BinaryDetail, error)
- func (v VersionDetails) GetConfigByName(configName string) (*ConfigDetail, error)
- func (v VersionDetails) GetConfigs() []ConfigDetail
Constants ¶
const ( OSLinux string = "linux" OSDarwin string = "darwin" OSWindows string = "windows" ArchAMD64 string = "amd64" ArchARM64 string = "arm64" )
const ( CrioBinaryName = "crio" CrioServiceName = "crio" // File names - extracted as constants to avoid duplication CrioConfFile = "10-crio.conf" CrioServiceFile = "crio.service" PolicyJsonFile = "policy.json" CrictlYamlFile = "crictl.yaml" CrioUmountConfFile = "crio-umount.conf" CrioConfDisabledFile = "10-crio-bridge.conflist.disabled" CrioConf5File = "crio.conf.5" CrioConfd5File = "crio.conf.d.5" Crio8File = "crio.8" CrioFishFile = "crio.fish" RegistriesConfFile = "registries.conf" CrioInstallFile = ".crio-install" CrioDefaultConfigFile = "crio" // Directory names ContribDir = "contrib/" )
const ( TeleportBinaryName = "teleport" TeleportServiceName = "teleport" )
const (
CiliumBinaryName = "cilium"
)
const DaemonBinaryName = "solo-provisioner-daemon"
const HelmBinaryName = "helm"
const K9sBinaryName = "k9s"
const KubeadmBinaryName = "kubeadm"
const KubectlBinaryName = "kubectl"
const KubeletBinaryName = "kubelet"
const KubeletServiceName = "kubelet"
Variables ¶
var ( ErrorsNamespace = errorx.NewNamespace("software") ConfigLoadError = ErrorsNamespace.NewType("config_load_error") SoftwareNotFoundError = ErrorsNamespace.NewType("software_not_found") VersionNotFoundError = ErrorsNamespace.NewType("version_not_found") PlatformNotFoundError = ErrorsNamespace.NewType("platform_not_found") DownloadError = ErrorsNamespace.NewType("download_error") ChecksumError = ErrorsNamespace.NewType("checksum_error") ExtractionError = ErrorsNamespace.NewType("extraction_error") FileNotFoundError = ErrorsNamespace.NewType("file_not_found") InstallationError = ErrorsNamespace.NewType("installation_error") UninstallationError = ErrorsNamespace.NewType("uninstallation_error") ConfigurationError = ErrorsNamespace.NewType("configuration_error") CleanupError = ErrorsNamespace.NewType("cleanup_error") FileSystemError = ErrorsNamespace.NewType("filesystem_error") TemplateError = ErrorsNamespace.NewType("template_error") PathTraversalError = ErrorsNamespace.NewType("path_traversal_error") InvalidURLError = ErrorsNamespace.NewType("invalid_url_error") )
var GenerateKubeadmToken = func() (string, error) { const allowedChars = "abcdefghijklmnopqrstuvwxyz0123456789" const part1Len = 6 const part2Len = 16 tokenPart := func(length int) (string, error) { b := make([]byte, length) for i := range b { nBig, err := rand.Int(rand.Reader, big.NewInt(int64(len(allowedChars)))) if err != nil { return "", errorx.ExternalError.Wrap(err, "failed to generate random int for kubeadm token") } b[i] = allowedChars[nBig.Int64()] } return string(b), nil } part1, err := tokenPart(part1Len) if err != nil { return "", err } part2, err := tokenPart(part2Len) if err != nil { return "", err } return fmt.Sprintf("%s.%s", part1, part2), nil }
GenerateKubeadmToken generates a random kubeadm token in the format [a-z0-9]{6}.[a-z0-9]{16}
Functions ¶
func AutoRemove ¶
func AutoRemove() error
func CiliumConfigPath ¶ added in v0.19.1
func CiliumConfigPath() string
CiliumConfigPath returns the canonical path of the rendered cilium-config.yaml in the weaver sandbox.
func GetPackageManager ¶
func GetPackageManager() (syspkg.PackageManager, error)
func GetRegistriesConfPath ¶
func GetRegistriesConfPath() string
GetRegistriesConfPath returns the full path to the registries.conf file in the sandbox This is used by tests to install custom registry mirror configuration
func Installers ¶ added in v0.12.0
func Installers() map[string]InstallerFunc
Installers returns a map of available installer constructors. The keys of the map are the names of the software, and the values are the corresponding installer functions. This allows for dynamic retrieval of installer functions based on software names, facilitating extensibility and modularity in the installation process. This is primarily used by the machineChecker to determine which installers are available for checking and installation on the local host.
func IsSupportedAlgorithm ¶ added in v0.21.0
IsSupportedAlgorithm reports whether VerifyChecksum can verify the given algorithm.
func NewChecksumError ¶
func NewConfigLoadError ¶
func NewConfigurationError ¶
func NewDownloadError ¶
func NewExtractionError ¶
func NewFileNotFoundError ¶
func NewFileSystemError ¶
func NewInstallationError ¶
func NewPathTraversalError ¶
func NewUninstallationError ¶
func NewVersionNotFoundError ¶
func ReconfigureCiliumConfig ¶ added in v0.19.1
ReconfigureCiliumConfig re-renders cilium-config.yaml from the embedded template to its canonical sandbox path and returns that path. Used by the startup migration that re-applies the updated template to already-provisioned clusters whose Configure()/IsConfigured guard would otherwise skip it.
func RefreshPackageIndex ¶
func RefreshPackageIndex() error
func ResetCatalogCacheForTest ¶ added in v0.17.0
func ResetCatalogCacheForTest()
ResetCatalogCacheForTest clears the cached catalog so the next LoadInfrastructureCatalog call re-reads, re-parses, and re-validates the embedded YAML. Intended for tests that exercise load-failure paths or swap in alternative embedded data; not safe to call concurrently with LoadInfrastructureCatalog. The name is deliberately verbose so it stands out at call sites — production code must never invoke this.
func SafeErrorDetails ¶
SafeErrorDetails emits a PII-safe slice of error details.
func VerifyChecksum ¶
VerifyChecksum dynamically verifies the checksum of a file using the specified algorithm
func WithPackageManager ¶
func WithPackageManager(pm syspkg.PackageManager) func(*PackageInstaller)
func WithPackageName ¶
func WithPackageName(name string) func(*PackageInstaller)
func WithPackageOptions ¶
func WithPackageOptions(opts manager.Options) func(*PackageInstaller)
Types ¶
type ArchiveDetail ¶
type ArchiveDetail struct {
Name string `yaml:"name"`
URL string `yaml:"url"`
PlatformChecksum `yaml:",inline"`
}
type ArtifactMetadata ¶
type ArtifactMetadata struct {
Name string `yaml:"name"`
Default Version `yaml:"default"`
Versions map[Version]VersionDetails `yaml:"versions"`
// contains filtered or unexported fields
}
ArtifactMetadata represents a single software artifact configuration with its versions which including archives, binaries and configuration files
func (*ArtifactMetadata) GetDefaultVersion ¶ added in v0.17.0
func (si *ArtifactMetadata) GetDefaultVersion() (string, error)
GetDefaultVersion returns the explicit default version declared for this software item. The default is read from the artifact's `default:` field; it must point to a version present in the `versions:` map. Returns an error when `default:` is unset or names an unknown version.
type AutoRemover ¶
type AutoRemover interface {
AutoRemove(opts *manager.Options) ([]manager.PackageInfo, error)
}
AutoRemover is an interface for package managers that support autoremove.
type BinaryDetail ¶
type BinaryDetail struct {
Name string `yaml:"name"`
URL string `yaml:"url,omitempty"`
Archive string `yaml:"archive,omitempty"`
PlatformChecksum `yaml:",inline"`
}
type ChartMetadata ¶ added in v0.17.0
type ChartMetadata struct {
Name string `yaml:"name"`
Type ChartType `yaml:"type"`
Repo string `yaml:"repo,omitempty"`
Chart string `yaml:"chart"`
Namespace string `yaml:"namespace"`
Release string `yaml:"release"`
Default Version `yaml:"default"`
Versions map[Version]Checksum `yaml:"versions"`
}
ChartMetadata describes a Helm chart entry under `cluster:`. A chart has a single artifact per version; integrity is verified against the SHA256 of the .tgz (classic) or the OCI manifest digest (oci), recorded as a Checksum value. Namespace and Release describe the installation topology — the Kubernetes namespace the chart deploys into and the Helm release name used to track it.
func MustGetClusterComponent ¶ added in v0.17.0
func MustGetClusterComponent(name string) *ChartMetadata
MustGetClusterComponent returns the named cluster chart from the embedded catalog. It panics if the catalog cannot be loaded or the chart is not present — both conditions are impossible at runtime because the catalog is embedded into the binary and validated at load time. Callers that reference catalog entries by literal name (steps, RSL defaults, manifest rendering) use this to avoid threading uninteresting errors through every call site.
func (*ChartMetadata) GetDefaultVersion ¶ added in v0.17.0
func (cm *ChartMetadata) GetDefaultVersion() (string, error)
GetDefaultVersion returns the explicit default version declared for this chart. The default is read from the chart's `default:` field; it must point to a version present in the `versions:` map. Returns an error when `default:` is unset or names an unknown version.
type ChartType ¶ added in v0.17.0
type ChartType string
ChartType identifies how a Helm chart is distributed.
type ConfigDetail ¶
type ConfigDetail struct {
Name string `yaml:"name"`
URL string `yaml:"url"`
Archive string `yaml:"archive,omitempty"`
Algorithm string `yaml:"algorithm"`
Value string `yaml:"checksum"`
}
ConfigDetail represents a configuration file with its software
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
Downloader is responsible for downloading a software package and checking its integrity.
func NewDownloader ¶
func NewDownloader(opts ...DownloaderOption) *Downloader
NewDownloader creates a new Downloader with default settings and optional configurations
func (*Downloader) Download ¶
func (fd *Downloader) Download(url, destination string) error
Download downloads a file from the given URL to the specified destination
func (*Downloader) DownloadAndVerify ¶ added in v0.21.0
func (fd *Downloader) DownloadAndVerify(url, destination, expectedValue, algorithm string) error
DownloadAndVerify downloads a file from url to destination and verifies its checksum, retrying transient corruption. Both download errors (network reset, empty/truncated body) and a subsequent checksum mismatch are treated as retryable: on failure the bad file is removed and the download is re-attempted with capped exponential backoff, up to maxAttempts. The last error is returned once attempts are exhausted.
type DownloaderOption ¶
type DownloaderOption func(*Downloader)
DownloaderOption is a function that configures a Downloader
func WithAllowedDomains ¶
func WithAllowedDomains(domains []string) DownloaderOption
WithAllowedDomains sets custom allowed domains for the downloader
func WithBasePath ¶
func WithBasePath(basePath string) DownloaderOption
WithBasePath sets a custom base path for the downloader
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) DownloaderOption
WithHTTPClient sets a custom HTTP client for the downloader (useful for testing)
func WithInsecureTLS ¶ added in v0.7.0
func WithInsecureTLS(insecure bool) DownloaderOption
WithInsecureTLS skips TLS certificate verification. WARNING: Only use this for local development with self-signed certificates! This option is ignored in release builds for security.
func WithMaxAttempts ¶ added in v0.21.0
func WithMaxAttempts(attempts int) DownloaderOption
WithMaxAttempts sets the number of download+verify attempts before giving up. Values below 1 are clamped to 1.
func WithRetryDelay ¶ added in v0.21.0
func WithRetryDelay(delay time.Duration) DownloaderOption
WithRetryDelay sets the base backoff delay between download attempts. A zero delay disables sleeping (useful for tests).
func WithTimeout ¶
func WithTimeout(timeout time.Duration) DownloaderOption
WithTimeout sets a custom timeout for the downloader
type InfrastructureCatalog ¶ added in v0.17.0
type InfrastructureCatalog struct {
Host []ArtifactMetadata `yaml:"host"`
Cluster []ChartMetadata `yaml:"cluster"`
}
InfrastructureCatalog is the root structure of the embedded infrastructure-catalog.yaml file shipped inside the solo-provisioner binary. It groups infrastructure components by where they run: `host:` for binaries installed on the host, `cluster:` for Helm charts installed into Kubernetes. The catalog's `default:` field is the single source of truth for which version of each component gets installed at runtime.
A separate file named `manifests/infrastructure-versions.yaml` (shipped inside the CN release package, minimal `name`+`version` schema) acts as a declarative audit list that the provisioner cross-checks against this catalog at apply time — it does not direct version selection. The intentional filename split (`-catalog` vs `-versions`) avoids any suggestion that the two are interchangeable. A hidden emergency CLI flag (`--override-component <name>=<version>`, guarded by `--confirm-untested-combination`) will additionally allow overriding a single component's version, but only among versions the catalog already declares. See docs/dev/chart-checksums.md ("Future overrides") for details.
func LoadInfrastructureCatalog ¶ added in v0.17.0
func LoadInfrastructureCatalog() (*InfrastructureCatalog, error)
LoadInfrastructureCatalog loads, parses, and validates the embedded infrastructure-catalog.yaml configuration. The result is cached for the lifetime of the process — the catalog is embedded in the binary and immutable, so callers must not mutate the returned value.
func (*InfrastructureCatalog) ClusterNames ¶ added in v0.17.0
func (c *InfrastructureCatalog) ClusterNames() []string
ClusterNames returns the names of all cluster components in the catalog.
func (*InfrastructureCatalog) GetClusterComponent ¶ added in v0.17.0
func (c *InfrastructureCatalog) GetClusterComponent(name string) (*ChartMetadata, error)
GetClusterComponent finds a cluster Helm chart entry by name.
func (*InfrastructureCatalog) GetHostArtifact ¶ added in v0.17.0
func (c *InfrastructureCatalog) GetHostArtifact(name string) (*ArtifactMetadata, error)
GetHostArtifact finds a host artifact entry by name.
func (*InfrastructureCatalog) HostNames ¶ added in v0.17.0
func (c *InfrastructureCatalog) HostNames() []string
HostNames returns the names of all host artifacts in the catalog.
type InstallerFunc ¶ added in v0.12.0
type InstallerFunc func(opts ...InstallerOption) (Software, error)
type InstallerOption ¶
type InstallerOption func(*baseInstaller)
func WithMachineRuntime ¶ added in v0.16.0
func WithMachineRuntime(mr MachineRuntime) InstallerOption
WithMachineRuntime injects a MachineRuntime into the installer so that IsInstalled/IsConfigured reads flow through the RSL MachineRuntimeResolver instead of falling back to expensive disk verification.
func WithVersion ¶
func WithVersion(version string) InstallerOption
WithVersion sets the specific version to install for the software. If not provided, the latest version will be used automatically. This is a public API option that can be used when creating installers to override the default version selection behavior.
type MachineRuntime ¶ added in v0.16.0
type MachineRuntime interface {
SoftwareState(name string) (state.SoftwareState, bool)
}
MachineRuntime is the subset of rsl.MachineRuntimeResolver used by software installers to look up effective state for a named component without a direct dependency on internal/rsl. *rsl.MachineRuntimeResolver satisfies this interface.
type Package ¶
type Package interface {
Name() string
Install() (*syspkg.PackageInfo, error)
Uninstall() (*syspkg.PackageInfo, error)
Upgrade() (*syspkg.PackageInfo, error)
Info() (*syspkg.PackageInfo, error)
IsInstalled() bool
}
func NewConntrack ¶
func NewContainerd ¶
func NewEbtables ¶
func NewGpg ¶
NewGpg creates a GPG package installer that works across different distributions Uses "gpg" package name which works on most modern distributions including: - Ubuntu/Debian (newer versions) - RHEL/CentOS/Fedora/Oracle Linux The underlying syspkg library automatically detects the correct package manager
func NewIptables ¶
func NewNftables ¶
type PackageInstaller ¶
type PackageInstaller struct {
// contains filtered or unexported fields
}
PackageInstaller is the default implementation of the Package interface that uses standard system package manager to manage a system package
func NewPackageInstaller ¶
func NewPackageInstaller(opts ...option) (*PackageInstaller, error)
func (*PackageInstaller) Info ¶
func (p *PackageInstaller) Info() (*syspkg.PackageInfo, error)
func (*PackageInstaller) Install ¶
func (p *PackageInstaller) Install() (*syspkg.PackageInfo, error)
func (*PackageInstaller) IsInstalled ¶
func (p *PackageInstaller) IsInstalled() bool
func (*PackageInstaller) Name ¶
func (p *PackageInstaller) Name() string
func (*PackageInstaller) Uninstall ¶
func (p *PackageInstaller) Uninstall() (*syspkg.PackageInfo, error)
func (*PackageInstaller) Upgrade ¶
func (p *PackageInstaller) Upgrade() (*syspkg.PackageInfo, error)
type PlatformChecksum ¶
PlatformChecksum maps OS and ARCH to their respective checksums Format: map[OS]map[ARCH]Checksum e.g. in yaml format:
linux:
amd64:
algorithm: sha256
checksum: abcdef...
type Software ¶
type Software interface {
// Download fetches the software artifacts,
// including the binary, and configuration files
Download() error
// Extract unpacks the downloaded files under a temporary subdirectory called 'unpack'
Extract() error
// Install places the files in the sandbox destination
Install() error
// Uninstall removes the software from the sandbox and cleans up related files
Uninstall() error
// IsInstalled checks the directories and high-level contents in sandbox
IsInstalled() (bool, error)
// Configure sets up configurations, services, and related symlinks
// It also fills the configuration files
Configure() error
// RemoveConfiguration removes symlinks and restores the configuration files
RemoveConfiguration() error
// IsConfigured checks if the configuration has been done
IsConfigured() (bool, error)
// Version returns the version of the software to be installed
Version() string
// Cleanup removes temporary files created during download and extraction
Cleanup() error
// GetSoftwareName returns the software name
GetSoftwareName() string
// VerifyInstallation checks if the software is installed and configured
VerifyInstallation() (*state.SoftwareState, error)
}
func NewCiliumInstaller ¶
func NewCiliumInstaller(opts ...InstallerOption) (Software, error)
NewCiliumInstaller creates a new installer for Cilium
func NewCrioInstaller ¶
func NewCrioInstaller(opts ...InstallerOption) (Software, error)
func NewDaemonInstaller ¶ added in v0.20.0
func NewDaemonInstaller(opts ...InstallerOption) (Software, error)
NewDaemonInstaller creates an installer for the solo-provisioner-daemon binary. It follows the same pattern as other host software installers but overrides Install so the binary lands at paths.BinDir (the path hardcoded in the service unit's ExecStart) rather than the generic SandboxBinDir.
func NewHelmInstaller ¶
func NewHelmInstaller(opts ...InstallerOption) (Software, error)
func NewK9sInstaller ¶
func NewK9sInstaller(opts ...InstallerOption) (Software, error)
func NewKubeadmInstaller ¶
func NewKubeadmInstaller(opts ...InstallerOption) (Software, error)
func NewKubectlInstaller ¶
func NewKubectlInstaller(opts ...InstallerOption) (Software, error)
func NewKubeletInstaller ¶
func NewKubeletInstaller(opts ...InstallerOption) (Software, error)
func NewTeleportNodeAgentInstaller ¶ added in v0.7.0
func NewTeleportNodeAgentInstaller(opts ...InstallerOption) (Software, error)
NewTeleportNodeAgentInstaller creates a new installer for the Teleport node agent
func NewTeleportNodeAgentInstallerWithConfig ¶ added in v0.7.0
func NewTeleportNodeAgentInstallerWithConfig(configOpts *TeleportNodeAgentConfigureOptions, opts ...InstallerOption) (Software, error)
NewTeleportNodeAgentInstallerWithConfig creates a new Teleport node agent installer with configuration options This is used when setting up the node agent with proxy address and join token
type TeleportNodeAgentConfigureOptions ¶ added in v0.7.0
type TeleportNodeAgentConfigureOptions struct {
// ProxyAddr is the address of the Teleport proxy server (e.g., "hashgraph.teleport.sh:443")
ProxyAddr string
// JoinToken is the token used to join the Teleport cluster
JoinToken string
}
TeleportNodeAgentConfigureOptions holds options for configuring the Teleport node agent
type TemplateData ¶
TemplateData contains the variables used in template substitution
type VersionDetails ¶
type VersionDetails struct {
Archives []ArchiveDetail `yaml:"archives,omitempty"`
Binaries []BinaryDetail `yaml:"binaries"`
Configs []ConfigDetail `yaml:"configs,omitempty"`
}
VersionDetails represents the structure for a specific versionToBeInstalled including the archive, binary and related configuration files
func (VersionDetails) BinariesByArchive ¶
func (v VersionDetails) BinariesByArchive() []BinaryDetail
BinariesByArchive returns only the binaries that are extracted from archives
func (VersionDetails) BinariesByURL ¶
func (v VersionDetails) BinariesByURL() []BinaryDetail
BinariesByURL returns only the binaries that are downloaded directly via URL
func (VersionDetails) ConfigsByArchive ¶
func (v VersionDetails) ConfigsByArchive() []ConfigDetail
ConfigsByArchive returns only the configuration files that are extracted from archives
func (VersionDetails) ConfigsByURL ¶
func (v VersionDetails) ConfigsByURL() []ConfigDetail
ConfigsByURL returns only the configuration files that are downloaded directly via URL
func (VersionDetails) GetArchiveByName ¶
func (v VersionDetails) GetArchiveByName(archiveName string) (*ArchiveDetail, error)
GetArchiveByName retrieves a specific archive file by name
func (VersionDetails) GetArchives ¶
func (v VersionDetails) GetArchives() []ArchiveDetail
GetArchives retrieves all archives, sorted by name for consistent order
func (VersionDetails) GetBinaries ¶
func (v VersionDetails) GetBinaries() []BinaryDetail
GetBinaries retrieves all binaries, sorted by name for consistent order
func (VersionDetails) GetBinaryByName ¶
func (v VersionDetails) GetBinaryByName(binaryName string) (*BinaryDetail, error)
GetBinaryByName retrieves a specific binary file by name
func (VersionDetails) GetConfigByName ¶
func (v VersionDetails) GetConfigByName(configName string) (*ConfigDetail, error)
GetConfigByName retrieves a specific configuration file by name
func (VersionDetails) GetConfigs ¶
func (v VersionDetails) GetConfigs() []ConfigDetail
GetConfigs retrieves all configuration files, sorted by name for consistent order
Source Files
¶
- base_installer.go
- cilium_installer.go
- config.go
- crio_installer.go
- daemon_installer.go
- downloader.go
- errors.go
- helm_installer.go
- init.go
- integrity_checker.go
- interface.go
- k9s_installer.go
- kubeadm_installer.go
- kubectl_installer.go
- kubelet_installer.go
- package_installer.go
- system_packages.go
- teleport_node_agent_installer.go