Documentation ¶
Index ¶
- Constants
- type AptSource
- func (*AptSource) CheckChanges(a, e, changes *AptSource) error
- func (e *AptSource) Find(c *fi.NodeupContext) (*AptSource, error)
- func (f *AptSource) GetName() *string
- func (f *AptSource) RenderLocal(t *local.LocalTarget, a, e, changes *AptSource) error
- func (f *AptSource) Run(c *fi.NodeupContext) error
- func (f *AptSource) String() string
- type Archive
- func (_ *Archive) CheckChanges(a, e, changes *Archive) error
- func (e *Archive) Dir() string
- func (e *Archive) Find(c *fi.NodeupContext) (*Archive, error)
- func (e *Archive) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
- func (e *Archive) GetName() *string
- func (_ *Archive) RenderLocal(t *local.LocalTarget, a, e, changes *Archive) error
- func (e *Archive) Run(c *fi.NodeupContext) error
- func (e *Archive) String() string
- type BindMount
- func (s *BindMount) CheckChanges(a, e, changes *BindMount) error
- func (e *BindMount) Dir() string
- func (e *BindMount) Find(c *fi.NodeupContext) (*BindMount, error)
- func (e *BindMount) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
- func (e *BindMount) GetName() *string
- func (_ *BindMount) RenderLocal(t *local.LocalTarget, a, e, changes *BindMount) error
- func (e *BindMount) Run(c *fi.NodeupContext) error
- func (s *BindMount) String() string
- type BootstrapCert
- type BootstrapClientTask
- type Chattr
- func (s *Chattr) CheckChanges(a, e, changes *Chattr) error
- func (e *Chattr) Find(c *fi.NodeupContext) (*Chattr, error)
- func (e *Chattr) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
- func (e *Chattr) GetName() *string
- func (_ *Chattr) RenderLocal(t *local.LocalTarget, a, e, changes *Chattr) error
- func (e *Chattr) Run(c *fi.NodeupContext) error
- func (s *Chattr) String() string
- type CreatesDir
- type Executor
- type File
- func (f *File) CheckChanges(a, e, changes *File) error
- func (f *File) Dir() string
- func (e *File) Find(_ *fi.NodeupContext) (*File, error)
- func (e *File) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
- func (f *File) GetName() *string
- func (_ *File) RenderLocal(_ *local.LocalTarget, a, e, changes *File) error
- func (e *File) Run(c *fi.NodeupContext) error
- func (f *File) String() string
- type GroupTask
- func (_ *GroupTask) CheckChanges(a, e, changes *GroupTask) error
- func (e *GroupTask) Find(c *fi.NodeupContext) (*GroupTask, error)
- func (f *GroupTask) GetName() *string
- func (_ *GroupTask) RenderLocal(t *local.LocalTarget, a, e, changes *GroupTask) error
- func (e *GroupTask) Run(c *fi.NodeupContext) error
- func (e *GroupTask) String() string
- type HostRecord
- type InstallFile
- func (i *InstallFile) CheckChanges(a, e, changes *InstallFile) error
- func (e *InstallFile) Find(_ *fi.InstallContext) (*InstallFile, error)
- func (e *InstallFile) GetDependencies(tasks map[string]fi.InstallTask) []fi.InstallTask
- func (i *InstallFile) RenderInstall(_ *install.InstallTarget, a, e, changes *InstallFile) error
- func (e *InstallFile) Run(c *fi.InstallContext) error
- type InstallService
- func (i *InstallService) CheckChanges(a, e, changes *InstallService) error
- func (e *InstallService) Find(_ *fi.InstallContext) (*InstallService, error)
- func (i *InstallService) GetDependencies(tasks map[string]fi.InstallTask) []fi.InstallTask
- func (i *InstallService) InitDefaults() *InstallService
- func (i *InstallService) RenderInstall(_ *install.InstallTarget, a, e, changes *InstallService) error
- func (e *InstallService) Run(c *fi.InstallContext) error
- type IssueCert
- func (i *IssueCert) AddFileTasks(c *fi.NodeupModelBuilderContext, dir string, name string, caName string, ...) error
- func (i *IssueCert) GetName() *string
- func (i *IssueCert) GetResources() (certResource, keyResource, caResource *fi.NodeupTaskDependentResource)
- func (e *IssueCert) Run(c *fi.NodeupContext) error
- func (i *IssueCert) String() string
- type KubeConfig
- type LoadImageTask
- func (_ *LoadImageTask) CheckChanges(a, e, changes *LoadImageTask) error
- func (e *LoadImageTask) Find(c *fi.NodeupContext) (*LoadImageTask, error)
- func (t *LoadImageTask) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
- func (t *LoadImageTask) GetName() *string
- func (_ *LoadImageTask) RenderLocal(t *local.LocalTarget, a, e, changes *LoadImageTask) error
- func (e *LoadImageTask) Run(c *fi.NodeupContext) error
- func (t *LoadImageTask) String() string
- type PKIXName
- type Package
- func (_ *Package) CheckChanges(a, e, changes *Package) error
- func (e *Package) Find(c *fi.NodeupContext) (*Package, error)
- func (e *Package) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
- func (f *Package) GetName() *string
- func (_ *Package) RenderLocal(t *local.LocalTarget, a, e, changes *Package) error
- func (e *Package) Run(c *fi.NodeupContext) error
- func (p *Package) String() string
- type Prefix
- func (_ *Prefix) CheckChanges(a, e, changes *Prefix) error
- func (e *Prefix) Find(c *fi.NodeupContext) (*Prefix, error)
- func (f *Prefix) GetName() *string
- func (_ *Prefix) RenderLocal(t *local.LocalTarget, a, e, changes *Prefix) error
- func (e *Prefix) Run(c *fi.NodeupContext) error
- func (p *Prefix) String() string
- type PullImageTask
- type Service
- func (s *Service) CheckChanges(a, e, changes *Service) error
- func (e *Service) Find(_ *fi.NodeupContext) (*Service, error)
- func (s *Service) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
- func (s *Service) GetName() *string
- func (s *Service) InitDefaults() *Service
- func (s *Service) RenderLocal(_ *local.LocalTarget, a, e, changes *Service) error
- func (e *Service) Run(c *fi.NodeupContext) error
- func (s *Service) String() string
- type UpdateEtcHostsTask
- func (_ *UpdateEtcHostsTask) CheckChanges(a, e, changes *UpdateEtcHostsTask) error
- func (e *UpdateEtcHostsTask) Find(c *fi.NodeupContext) (*UpdateEtcHostsTask, error)
- func (f *UpdateEtcHostsTask) GetName() *string
- func (_ *UpdateEtcHostsTask) RenderLocal(t *local.LocalTarget, a, e, changes *UpdateEtcHostsTask) error
- func (e *UpdateEtcHostsTask) Run(c *fi.NodeupContext) error
- func (e *UpdateEtcHostsTask) String() string
- type UpdatePackages
- func (s *UpdatePackages) CheckChanges(a, e, changes *UpdatePackages) error
- func (e *UpdatePackages) Find(c *fi.NodeupContext) (*UpdatePackages, error)
- func (p *UpdatePackages) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
- func (_ *UpdatePackages) RenderLocal(t *local.LocalTarget, a, e, changes *UpdatePackages) error
- func (e *UpdatePackages) Run(c *fi.NodeupContext) error
- func (p *UpdatePackages) String() string
- type UserTask
- func (_ *UserTask) CheckChanges(a, e, changes *UserTask) error
- func (e *UserTask) Find(c *fi.NodeupContext) (*UserTask, error)
- func (f *UserTask) GetName() *string
- func (_ *UserTask) RenderLocal(t *local.LocalTarget, a, e, changes *UserTask) error
- func (e *UserTask) Run(c *fi.NodeupContext) error
- func (e *UserTask) String() string
Constants ¶
const ( // FileType_Symlink defines a symlink FileType_Symlink = "symlink" // FileType_Directory defines a directory FileType_Directory = "directory" // FileType_File is a regular file FileType_File = "file" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AptSource ¶ added in v1.21.3
func (*AptSource) CheckChanges ¶ added in v1.21.3
func (*AptSource) Find ¶ added in v1.21.3
func (e *AptSource) Find(c *fi.NodeupContext) (*AptSource, error)
func (*AptSource) RenderLocal ¶ added in v1.21.3
func (f *AptSource) RenderLocal(t *local.LocalTarget, a, e, changes *AptSource) error
type Archive ¶ added in v1.10.0
type Archive struct { Name string // Source is the location for the archive Source string `json:"source,omitempty"` // Hash is the source tar Hash string `json:"hash,omitempty"` // TargetDir is the directory for extraction TargetDir string `json:"target,omitempty"` // StripComponents is the number of components to remove when expanding the archive StripComponents int `json:"stripComponents,omitempty"` // MapFiles is the list of files to extract with corresponding directories to extract MapFiles map[string]string `json:"mapFiles,omitempty"` }
Archive task downloads and extracts a tar file
func (*Archive) CheckChanges ¶ added in v1.10.0
CheckChanges implements fi.Task::CheckChanges
func (*Archive) Find ¶ added in v1.10.0
func (e *Archive) Find(c *fi.NodeupContext) (*Archive, error)
Find implements fi.Task::Find
func (*Archive) GetDependencies ¶ added in v1.10.0
func (e *Archive) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
GetDependencies implements HasDependencies::GetDependencies
func (*Archive) RenderLocal ¶ added in v1.10.0
func (_ *Archive) RenderLocal(t *local.LocalTarget, a, e, changes *Archive) error
RenderLocal implements the fi.Task::Render functionality for a local target
type BindMount ¶ added in v1.10.0
type BindMount struct { Source string `json:"source"` Mountpoint string `json:"mountpoint"` Options []string `json:"options,omitempty"` Recursive bool `json:"recursive"` }
BindMount performs bind mounts
func (*BindMount) CheckChanges ¶ added in v1.10.0
func (*BindMount) Find ¶ added in v1.10.0
func (e *BindMount) Find(c *fi.NodeupContext) (*BindMount, error)
func (*BindMount) GetDependencies ¶ added in v1.10.0
func (e *BindMount) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
GetDependencies implements HasDependencies::GetDependencies
func (*BindMount) RenderLocal ¶ added in v1.10.0
func (_ *BindMount) RenderLocal(t *local.LocalTarget, a, e, changes *BindMount) error
type BootstrapCert ¶ added in v1.19.0
type BootstrapCert struct { Cert *fi.NodeupTaskDependentResource Key *fi.NodeupTaskDependentResource }
type BootstrapClientTask ¶ added in v1.21.0
type BootstrapClientTask struct { // Certs are the requested certificates. Certs map[string]*BootstrapCert // KeypairIDs are the keypair IDs of the CAs to use for issuing certificates. KeypairIDs map[string]string // Client holds the client wrapper for the kops-bootstrap protocol Client *kopscontrollerclient.Client // UseChallengeCallback is true if we should run a challenge responder during the request. UseChallengeCallback bool // ClusterName is the name of the cluster ClusterName string // contains filtered or unexported fields }
func (*BootstrapClientTask) GetDependencies ¶ added in v1.21.0
func (b *BootstrapClientTask) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
func (*BootstrapClientTask) GetName ¶ added in v1.21.0
func (b *BootstrapClientTask) GetName() *string
func (*BootstrapClientTask) Run ¶ added in v1.21.0
func (b *BootstrapClientTask) Run(c *fi.NodeupContext) error
func (*BootstrapClientTask) String ¶ added in v1.21.0
func (b *BootstrapClientTask) String() string
type Chattr ¶ added in v1.15.1
type Chattr struct { File string `json:"file"` Mode string `json:"mode"` Deps []fi.NodeupTask `json:"-"` }
Chattr performs a chattr command, in particular to set a file as immutable
func (*Chattr) CheckChanges ¶ added in v1.15.1
func (*Chattr) GetDependencies ¶ added in v1.15.1
func (e *Chattr) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
GetDependencies implements HasDependencies::GetDependencies
func (*Chattr) RenderLocal ¶ added in v1.15.1
func (_ *Chattr) RenderLocal(t *local.LocalTarget, a, e, changes *Chattr) error
type CreatesDir ¶ added in v1.10.0
type CreatesDir interface {
Dir() string
}
CreatesDir is a marker interface for tasks that create directories, used for dependencies
type Executor ¶ added in v1.10.0
Executor allows execution of a command; it makes for testing of commands
type File ¶
type File struct { AfterFiles []string `json:"afterFiles,omitempty"` BeforeServices []string `json:"beforeServices,omitempty"` Contents fi.Resource `json:"contents,omitempty"` Group *string `json:"group,omitempty"` IfNotExists bool `json:"ifNotExists,omitempty"` Mode *string `json:"mode,omitempty"` OnChangeExecute [][]string `json:"onChangeExecute,omitempty"` Owner *string `json:"owner,omitempty"` Path string `json:"path,omitempty"` Symlink *string `json:"symlink,omitempty"` Type string `json:"type"` }
func (*File) CheckChanges ¶
func (*File) GetDependencies ¶
func (e *File) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
GetDependencies implements HasDependencies::GetDependencies
func (*File) RenderLocal ¶
func (_ *File) RenderLocal(_ *local.LocalTarget, a, e, changes *File) error
type GroupTask ¶ added in v1.11.0
GroupTask is responsible for creating a group, by calling groupadd
func (*GroupTask) CheckChanges ¶ added in v1.11.0
func (*GroupTask) Find ¶ added in v1.11.0
func (e *GroupTask) Find(c *fi.NodeupContext) (*GroupTask, error)
func (*GroupTask) RenderLocal ¶ added in v1.11.0
func (_ *GroupTask) RenderLocal(t *local.LocalTarget, a, e, changes *GroupTask) error
type HostRecord ¶ added in v1.26.0
type HostRecord struct { fi.NodeupNotADependency // Hostname is the "DNS" name that we want to configure. Hostname string // Addresses holds the IP addresses to write. // Other IP addresses for the same Name will be removed. Addresses []string }
HostRecord holds an individual host's addresses.
type InstallFile ¶ added in v1.26.0
type InstallFile struct {
File
}
func (*InstallFile) CheckChanges ¶ added in v1.26.0
func (i *InstallFile) CheckChanges(a, e, changes *InstallFile) error
func (*InstallFile) Find ¶ added in v1.26.0
func (e *InstallFile) Find(_ *fi.InstallContext) (*InstallFile, error)
func (*InstallFile) GetDependencies ¶ added in v1.26.0
func (e *InstallFile) GetDependencies(tasks map[string]fi.InstallTask) []fi.InstallTask
func (*InstallFile) RenderInstall ¶ added in v1.26.0
func (i *InstallFile) RenderInstall(_ *install.InstallTarget, a, e, changes *InstallFile) error
func (*InstallFile) Run ¶ added in v1.26.0
func (e *InstallFile) Run(c *fi.InstallContext) error
type InstallService ¶ added in v1.26.0
type InstallService struct {
Service
}
func (*InstallService) CheckChanges ¶ added in v1.26.0
func (i *InstallService) CheckChanges(a, e, changes *InstallService) error
func (*InstallService) Find ¶ added in v1.26.0
func (e *InstallService) Find(_ *fi.InstallContext) (*InstallService, error)
func (*InstallService) GetDependencies ¶ added in v1.26.0
func (i *InstallService) GetDependencies(tasks map[string]fi.InstallTask) []fi.InstallTask
func (*InstallService) InitDefaults ¶ added in v1.26.0
func (i *InstallService) InitDefaults() *InstallService
func (*InstallService) RenderInstall ¶ added in v1.26.0
func (i *InstallService) RenderInstall(_ *install.InstallTarget, a, e, changes *InstallService) error
func (*InstallService) Run ¶ added in v1.26.0
func (e *InstallService) Run(c *fi.InstallContext) error
type IssueCert ¶ added in v1.19.0
type IssueCert struct { Name string Signer string `json:"signer"` KeypairID string `json:"keypairID"` Type string `json:"type"` Subject PKIXName `json:"subject"` AlternateNames []string `json:"alternateNames,omitempty"` // IncludeRootCertificate will force the certificate data to include the full chain, not just the leaf IncludeRootCertificate bool `json:"includeRootCertificate,omitempty"` // contains filtered or unexported fields }
func (*IssueCert) AddFileTasks ¶ added in v1.19.0
func (*IssueCert) GetResources ¶ added in v1.19.0
func (i *IssueCert) GetResources() (certResource, keyResource, caResource *fi.NodeupTaskDependentResource)
type KubeConfig ¶ added in v1.19.0
type KubeConfig struct { Name string Cert fi.Resource Key fi.Resource CA fi.Resource ServerURL string // contains filtered or unexported fields }
func (*KubeConfig) GetConfig ¶ added in v1.19.0
func (k *KubeConfig) GetConfig() *fi.NodeupTaskDependentResource
func (*KubeConfig) GetDependencies ¶ added in v1.19.0
func (k *KubeConfig) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
func (*KubeConfig) GetName ¶ added in v1.19.0
func (k *KubeConfig) GetName() *string
func (*KubeConfig) Run ¶ added in v1.19.0
func (k *KubeConfig) Run(_ *fi.NodeupContext) error
func (*KubeConfig) String ¶ added in v1.19.0
func (k *KubeConfig) String() string
String returns a string representation, implementing the Stringer interface
type LoadImageTask ¶
LoadImageTask is responsible for downloading a docker image
func (*LoadImageTask) CheckChanges ¶
func (_ *LoadImageTask) CheckChanges(a, e, changes *LoadImageTask) error
func (*LoadImageTask) Find ¶
func (e *LoadImageTask) Find(c *fi.NodeupContext) (*LoadImageTask, error)
func (*LoadImageTask) GetDependencies ¶ added in v1.10.0
func (t *LoadImageTask) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
func (*LoadImageTask) GetName ¶ added in v1.18.0
func (t *LoadImageTask) GetName() *string
func (*LoadImageTask) RenderLocal ¶
func (_ *LoadImageTask) RenderLocal(t *local.LocalTarget, a, e, changes *LoadImageTask) error
func (*LoadImageTask) Run ¶
func (e *LoadImageTask) Run(c *fi.NodeupContext) error
func (*LoadImageTask) String ¶
func (t *LoadImageTask) String() string
type PKIXName ¶ added in v1.19.0
type PKIXName struct { fi.NodeupNotADependency CommonName string Organization []string `json:",omitempty"` }
PKIXName is a simplified form of pkix.Name, for better golden test output
type Package ¶
type Package struct { Name string Version *string `json:"version,omitempty"` Source *string `json:"source,omitempty"` Hash *string `json:"hash,omitempty"` PreventStart *bool `json:"preventStart,omitempty"` // Healthy is true if the package installation did not fail Healthy *bool `json:"healthy,omitempty"` // Additional dependencies that must be installed before this package. // These will actually be passed together with this package to rpm/dpkg, // which will then figure out the correct order in which to install them. // This means that Deps don't get installed unless this package needs to // get installed. Deps []*Package `json:"deps,omitempty"` }
func (*Package) CheckChanges ¶
func (*Package) GetDependencies ¶
func (e *Package) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
GetDependencies computes dependencies for the package task
func (*Package) RenderLocal ¶
func (_ *Package) RenderLocal(t *local.LocalTarget, a, e, changes *Package) error
type Prefix ¶ added in v1.23.0
type Prefix struct {
Name string
}
func (*Prefix) CheckChanges ¶ added in v1.23.0
func (*Prefix) RenderLocal ¶ added in v1.23.0
func (_ *Prefix) RenderLocal(t *local.LocalTarget, a, e, changes *Prefix) error
type PullImageTask ¶ added in v1.21.0
PullImageTask is responsible for pulling a docker image
func (*PullImageTask) GetDependencies ¶ added in v1.21.0
func (t *PullImageTask) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
func (*PullImageTask) GetName ¶ added in v1.21.0
func (t *PullImageTask) GetName() *string
func (*PullImageTask) Run ¶ added in v1.21.0
func (e *PullImageTask) Run(c *fi.NodeupContext) error
type Service ¶
type Service struct { Name string Definition *string `json:"definition,omitempty"` Running *bool `json:"running,omitempty"` // Enabled configures the service to start at boot (or not start at boot) Enabled *bool `json:"enabled,omitempty"` ManageState *bool `json:"manageState,omitempty"` SmartRestart *bool `json:"smartRestart,omitempty"` }
func (*Service) CheckChanges ¶
func (*Service) GetDependencies ¶
func (s *Service) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
func (*Service) InitDefaults ¶ added in v1.10.0
func (*Service) RenderLocal ¶
func (s *Service) RenderLocal(_ *local.LocalTarget, a, e, changes *Service) error
type UpdateEtcHostsTask ¶ added in v1.26.0
type UpdateEtcHostsTask struct { // Name is a reference for our task Name string // Records holds the records that should be updated Records []HostRecord }
UpdateEtcHostsTask is responsible for updating /etc/hosts to set some DNS records, for gossip.
func (*UpdateEtcHostsTask) CheckChanges ¶ added in v1.26.0
func (_ *UpdateEtcHostsTask) CheckChanges(a, e, changes *UpdateEtcHostsTask) error
func (*UpdateEtcHostsTask) Find ¶ added in v1.26.0
func (e *UpdateEtcHostsTask) Find(c *fi.NodeupContext) (*UpdateEtcHostsTask, error)
func (*UpdateEtcHostsTask) GetName ¶ added in v1.26.0
func (f *UpdateEtcHostsTask) GetName() *string
func (*UpdateEtcHostsTask) RenderLocal ¶ added in v1.26.0
func (_ *UpdateEtcHostsTask) RenderLocal(t *local.LocalTarget, a, e, changes *UpdateEtcHostsTask) error
func (*UpdateEtcHostsTask) Run ¶ added in v1.26.0
func (e *UpdateEtcHostsTask) Run(c *fi.NodeupContext) error
func (*UpdateEtcHostsTask) String ¶ added in v1.26.0
func (e *UpdateEtcHostsTask) String() string
type UpdatePackages ¶
type UpdatePackages struct { // We can't be completely empty or we don't run Updated bool }
func NewUpdatePackages ¶ added in v1.4.1
func NewUpdatePackages() *UpdatePackages
func (*UpdatePackages) CheckChanges ¶
func (s *UpdatePackages) CheckChanges(a, e, changes *UpdatePackages) error
func (*UpdatePackages) Find ¶
func (e *UpdatePackages) Find(c *fi.NodeupContext) (*UpdatePackages, error)
func (*UpdatePackages) GetDependencies ¶
func (p *UpdatePackages) GetDependencies(tasks map[string]fi.NodeupTask) []fi.NodeupTask
func (*UpdatePackages) RenderLocal ¶
func (_ *UpdatePackages) RenderLocal(t *local.LocalTarget, a, e, changes *UpdatePackages) error
func (*UpdatePackages) Run ¶
func (e *UpdatePackages) Run(c *fi.NodeupContext) error
func (*UpdatePackages) String ¶
func (p *UpdatePackages) String() string
type UserTask ¶
type UserTask struct { Name string UID int `json:"uid"` Shell string `json:"shell"` Home string `json:"home"` }
UserTask is responsible for creating a user, by calling useradd
func (*UserTask) CheckChanges ¶
func (*UserTask) RenderLocal ¶
func (_ *UserTask) RenderLocal(t *local.LocalTarget, a, e, changes *UserTask) error