phases

package
v0.0.0-...-3bfe646 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 56 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// InitPhase is a phase that prepares the node for the operation
	InitPhase = "/init"
	// ChecksPhase is a phase that executes preflight checks
	ChecksPhase = "/checks"
	// InstallerPhase is a phase that downloads installer from Ops Center
	InstallerPhase = "/installer"
	// DecryptPhase is a phase that decrypts encrypted packages
	DecryptPhase = "/decrypt"
	// ConfigurePhase is a phase that configures cluster packages
	ConfigurePhase = "/configure"
	// BootstrapPhase is a phase that prepares the nodes for installation
	BootstrapPhase = "/bootstrap"
	// BootstrapSELinuxPhase is a phase that performs additional SELinux configuration
	BootstrapSELinuxPhase = "/selinux"
	// PullPhase is a phase that pulls configured packages
	PullPhase = "/pull"
	// MastersPhase is a phase that installs system software on master nodes
	MastersPhase = "/masters"
	// NodesPhase is a phase that installs system software on regular nodes
	NodesPhase = "/nodes"
	// WaitPhase is a phase that waits for planet to start
	WaitPhase = "/wait"
	// HealthPhase is a phase that waits for the cluster to be healthy
	HealthPhase = "/health"
	// RBACPhase is a phase that creates Kubernetes RBAC resources
	RBACPhase = "/rbac"
	// CorednsPhase is a phase that generates coredns configuration for the cluster
	CorednsPhase = "/coredns"
	// OpenEBSPhase is a phase that creates OpenEBS configuration.
	OpenEBSPhase = "/openebs"
	// SystemResourcesPhase is a phase that creates system Kubernetes resources
	SystemResourcesPhase = "/system-resources"
	// UserResourcesPhase is a phase that creates user supplied Kubernetes resources
	UserResourcesPhase = "/user-resources"
	// GravityResourcesPhase is a phase that creates user supplied Gravity resources
	GravityResourcesPhase = "/gravity-resources"
	// ExportPhase is a phase that exports application layers to registries
	ExportPhase = "/export"
	// RuntimePhase is a phase that installs system applications
	RuntimePhase = "/runtime"
	// AppPhase is a phase that installs user application
	AppPhase = "/app"
	// ConnectInstallerPhase is a phase that connects cluster to the installer
	ConnectInstallerPhase = "/connect-installer"
	// EnableElectionPhase turns on election participation for master nodes
	// at the end of the installation. During installation, the election is
	// off with a single master
	EnableElectionPhase = "/election"
	// InstallOverlayPhase installs a custom overlay network
	InstallOverlayPhase = "/overlay"
)

Variables

This section is empty.

Functions

func GenerateCorefile

func GenerateCorefile(config CorednsConfig) (string, error)

GenerateCorefile will generate a coredns configuration file to be used from within the cluster

func NewApp

func NewApp(p fsm.ExecutorParams, operator ops.Operator, apps app.Applications) (fsm.PhaseExecutor, error)

NewApp returns executor that runs install and post-install hooks

func NewBootstrap

func NewBootstrap(p fsm.ExecutorParams, operator ops.Operator, apps app.Applications, backend storage.LocalBackend,
	remote fsm.Remote) (fsm.PhaseExecutor, error)

NewBootstrap returns a new "bootstrap" phase executor

func NewChecks

func NewChecks(p fsm.ExecutorParams, operator ops.Operator, key ops.SiteOperationKey) (fsm.PhaseExecutor, error)

NewChecks creates a new preflight checks executor

func NewConfigure

func NewConfigure(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewConfigure returns a new "configure" phase executor

func NewConnectInstaller

func NewConnectInstaller(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewConnectInstaller returns executor that establishes trust b/w installed cluster and the installer process

func NewCorednsPhase

func NewCorednsPhase(p fsm.ExecutorParams, operator ops.Operator, client *kubernetes.Clientset) (fsm.PhaseExecutor, error)

NewCorednsPhase creates a new coredns phase executor

func NewEnableElectionPhase

func NewEnableElectionPhase(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewEnableElectionPhase returns an executor to enable election for all master nodes in the cluster

func NewExport

func NewExport(p fsm.ExecutorParams, operator ops.Operator, packages pack.PackageService, apps app.Applications,
	remote fsm.Remote) (fsm.PhaseExecutor, error)

NewExport returns a new "export" phase executor.

This phase exports Docker images of the application and its dependencies to the locally running Docker registry.

func NewGravityResourcesPhase

func NewGravityResourcesPhase(p fsm.ExecutorParams, operator ops.Operator, factory resources.Resources) (fsm.PhaseExecutor, error)

NewGravityResourcesPhase returns executor that creates Gravity resources

func NewHealth

func NewHealth(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewHealth returns a new "health" phase executor

func NewHook

func NewHook(p fsm.ExecutorParams, operator ops.Operator, apps app.Applications, hooks ...schema.HookType) (fsm.PhaseExecutor, error)

NewHook returns executor that runs specified application hooks

func NewInit

func NewInit(p fsm.ExecutorParams, operator ops.Operator, apps app.Applications, packages pack.PackageService) (fsm.PhaseExecutor, error)

NewInit returns executor that prepares the node for the operation.

func NewOpenEBS

func NewOpenEBS(p fsm.ExecutorParams, operator ops.Operator, client *kubernetes.Clientset) (fsm.PhaseExecutor, error)

NewOpenEBS returns executor that creates OpenEBS configuration.

func NewPull

func NewPull(p fsm.ExecutorParams, operator ops.Operator, wizardPack, localPack pack.PackageService,
	wizardApps, localApps app.Applications, remote fsm.Remote) (fsm.PhaseExecutor, error)

NewPull returns a new "pull" phase executor

func NewRBAC

func NewRBAC(p fsm.ExecutorParams, operator ops.Operator, apps app.Applications, client *kubernetes.Clientset) (fsm.PhaseExecutor, error)

NewRBAC returns a new "rbac" phase executor

func NewSELinux

func NewSELinux(p fsm.ExecutorParams, operator ops.Operator, apps app.Applications) (fsm.PhaseExecutor, error)

NewSELinux returns executor that configures SELinux on a node

func NewSystem

func NewSystem(p fsm.ExecutorParams, operator ops.Operator, localPackages *localpack.PackageServer, remote fsm.Remote) (fsm.PhaseExecutor, error)

NewSystem returns a new "system" phase executor

func NewSystemResources

func NewSystemResources(p fsm.ExecutorParams, operator ops.Operator, client *kubernetes.Clientset) (fsm.PhaseExecutor, error)

NewSystemResources returns executor that creates system Kubernetes resources.

func NewUserResources

func NewUserResources(p fsm.ExecutorParams, operator ops.Operator) (fsm.PhaseExecutor, error)

NewUserResources returns an executor that creates user-supplied Kubernetes resources

func NewWait

func NewWait(p fsm.ExecutorParams, operator ops.Operator, client *kubernetes.Clientset) (fsm.PhaseExecutor, error)

NewWait returns a new "wait" phase executor

Types

type CorednsConfig

type CorednsConfig struct {
	// Zones maps a DNS zone to nameservers it will be served by as provided by a user at install time
	Zones map[string][]string
	// Hosts  maps a hostname to an IP address it will resolve to as provided by a user at install time
	Hosts map[string]string
	// UpstreamNameservers is a list of nameservers to use as resolvers as detected from the system resolv.conf
	UpstreamNameservers []string
	// Rotate indicates whether the upstream servers should be round-robin load balanced as detected from the system
	// resolv.conf
	Rotate bool
}

CorednsConfig represents the CoreDNS configuration options to apply to our template

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL