Documentation ¶
Index ¶
- Constants
- func NeedMigrateRoles(roles []teleservices.Role) bool
- func NewGarbageCollectPhase(p fsm.ExecutorParams, remote fsm.Remote, logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseCoreDNS(p fsm.ExecutorParams, operator ops.Operator, client *kubernetes.Clientset, ...) (fsm.PhaseExecutor, error)
- func NewPhaseDrain(p fsm.ExecutorParams, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseElectionChange(p fsm.ExecutorParams, operator ops.Operator, remote fsm.Remote, ...) (fsm.PhaseExecutor, error)
- func NewPhaseEndpoints(p fsm.ExecutorParams, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseKubeletPermissions(p fsm.ExecutorParams, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseMigrateLinks(plan storage.OperationPlan, backend storage.Backend, logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseMigrateRoles(plan storage.OperationPlan, backend storage.Backend, logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseNodeHealth(logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseTaint(p fsm.ExecutorParams, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseUncordon(p fsm.ExecutorParams, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseUntaint(p fsm.ExecutorParams, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseUpdateLabels(plan storage.OperationPlan, client *kubernetes.Clientset, ...) (fsm.PhaseExecutor, error)
- func NewPhaseUpgradeEtcd(phase storage.OperationPhase, logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseUpgradeEtcdBackup(logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseUpgradeEtcdRestart(phase storage.OperationPhase, logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseUpgradeEtcdRestore(phase storage.OperationPhase, logger log.FieldLogger) (fsm.PhaseExecutor, error)
- func NewPhaseUpgradeEtcdShutdown(phase storage.OperationPhase, client *kubeapi.Clientset, ...) (fsm.PhaseExecutor, error)
- func NewPhaseUpgradeGravitySiteRestart(phase storage.OperationPhase, client *kubeapi.Clientset, ...) (fsm.PhaseExecutor, error)
- func NewUpdatePhaseApp(p fsm.ExecutorParams, operator ops.Operator, apps app.Applications, ...) (fsm.PhaseExecutor, error)
- func NewUpdatePhaseBeforeApp(p fsm.ExecutorParams, apps app.Applications, client *kubernetes.Clientset, ...) (fsm.PhaseExecutor, error)
- func NewUpdatePhaseBootstrap(p fsm.ExecutorParams, operator ops.Operator, ...) (fsm.PhaseExecutor, error)
- func NewUpdatePhaseChecks(p fsm.ExecutorParams, operator ops.Operator, apps app.Applications, ...) (fsm.PhaseExecutor, error)
- func NewUpdatePhaseConfig(p fsm.ExecutorParams, operator ops.Operator, packages pack.PackageService, ...) (fsm.PhaseExecutor, error)
- func NewUpdatePhaseInit(p fsm.ExecutorParams, operator ops.Operator, apps app.Applications, ...) (fsm.PhaseExecutor, error)
- func NewUpdatePhaseSELinux(p fsm.ExecutorParams, operator ops.Operator, apps app.Applications, ...) (fsm.PhaseExecutor, error)
- func NewUpdatePhaseSystem(p fsm.ExecutorParams, remote fsm.Remote, backend storage.Backend, ...) (fsm.PhaseExecutor, error)
- type PhaseUpgradeEtcd
- type PhaseUpgradeEtcdBackup
- type PhaseUpgradeEtcdRestart
- type PhaseUpgradeEtcdRestore
- type PhaseUpgradeEtcdShutdown
- type PhaseUpgradeGravitySiteRestart
Constants ¶
const (
// CoreDNSResourceName defines the name common for coredns resources
CoreDNSResourceName = "gravity:coredns"
)
Variables ¶
This section is empty.
Functions ¶
func NeedMigrateRoles ¶
func NeedMigrateRoles(roles []teleservices.Role) bool
NeedMigrateRoles returns true if the provided cluster roles need to be migrated to a new format
func NewGarbageCollectPhase ¶
func NewGarbageCollectPhase(p fsm.ExecutorParams, remote fsm.Remote, logger log.FieldLogger) (fsm.PhaseExecutor, error)
NewGarbageCollectPhase returns a new executor for the garbage collection phase
func NewPhaseCoreDNS ¶
func NewPhaseCoreDNS(p fsm.ExecutorParams, operator ops.Operator, client *kubernetes.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
NewPhaseCoreDNS creates an upgrade phase to add coredns rbac permissions The normal upgrade sequence is to Rolling update planet, then to update our RBAC settings in the RBAC app However, CoreDNS within planet needs these settings to function, so these settings specifically need to be created before the rolling restart of planet
func NewPhaseDrain ¶
func NewPhaseDrain(p fsm.ExecutorParams, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
NewPhaseDrain returns a new executor for draining a node
func NewPhaseElectionChange ¶
func NewPhaseElectionChange( p fsm.ExecutorParams, operator ops.Operator, remote fsm.Remote, logger logrus.FieldLogger, ) (fsm.PhaseExecutor, error)
NewPhaseElectionChange is a phase for modifying cluster elections during upgrades
func NewPhaseEndpoints ¶
func NewPhaseEndpoints(p fsm.ExecutorParams, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
NewPhaseEndpoints returns a new executor for waiting for endpoints
func NewPhaseKubeletPermissions ¶
func NewPhaseKubeletPermissions(p fsm.ExecutorParams, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
NewPhaseKubeletPermissions returns a new executor for bootstrapping additional kubelet permissions
func NewPhaseMigrateLinks ¶
func NewPhaseMigrateLinks(plan storage.OperationPlan, backend storage.Backend, logger log.FieldLogger) (fsm.PhaseExecutor, error)
NewPhaseMigrateLinks returns a new links migration executor
func NewPhaseMigrateRoles ¶
func NewPhaseMigrateRoles(plan storage.OperationPlan, backend storage.Backend, logger log.FieldLogger) (fsm.PhaseExecutor, error)
NewPhaseMigrateRoles returns a new roles migration executor
func NewPhaseNodeHealth ¶
func NewPhaseNodeHealth(logger log.FieldLogger) (fsm.PhaseExecutor, error)
NewPhaseNodeHealth creates an upgrade phase to check whether the node is healthy
func NewPhaseTaint ¶
func NewPhaseTaint(p fsm.ExecutorParams, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
NewPhaseTaint returns a new executor for adding a taint to a node
func NewPhaseUncordon ¶
func NewPhaseUncordon(p fsm.ExecutorParams, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
NewPhaseUncordon returns a new executor for uncordoning a node
func NewPhaseUntaint ¶
func NewPhaseUntaint(p fsm.ExecutorParams, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
NewPhaseUntaint returns a new executor for removing a taint from a node
func NewPhaseUpdateLabels ¶
func NewPhaseUpdateLabels(plan storage.OperationPlan, client *kubernetes.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
NewPhaseUpdateLabels updates labels during an upgrade
func NewPhaseUpgradeEtcd ¶
func NewPhaseUpgradeEtcd(phase storage.OperationPhase, logger log.FieldLogger) (fsm.PhaseExecutor, error)
func NewPhaseUpgradeEtcdBackup ¶
func NewPhaseUpgradeEtcdBackup(logger log.FieldLogger) (fsm.PhaseExecutor, error)
func NewPhaseUpgradeEtcdRestart ¶
func NewPhaseUpgradeEtcdRestart(phase storage.OperationPhase, logger log.FieldLogger) (fsm.PhaseExecutor, error)
func NewPhaseUpgradeEtcdRestore ¶
func NewPhaseUpgradeEtcdRestore(phase storage.OperationPhase, logger log.FieldLogger) (fsm.PhaseExecutor, error)
func NewPhaseUpgradeEtcdShutdown ¶
func NewPhaseUpgradeEtcdShutdown(phase storage.OperationPhase, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
NewPhaseUpgradeEtcdShutdown creates a phase for shutting down etcd across the cluster 4. Shutdown etcd (all servers) // API outage starts
func NewPhaseUpgradeGravitySiteRestart ¶
func NewPhaseUpgradeGravitySiteRestart(phase storage.OperationPhase, client *kubeapi.Clientset, logger log.FieldLogger) (fsm.PhaseExecutor, error)
func NewUpdatePhaseApp ¶
func NewUpdatePhaseApp( p fsm.ExecutorParams, operator ops.Operator, apps app.Applications, client *kubernetes.Clientset, logger log.FieldLogger, ) (fsm.PhaseExecutor, error)
NewUpdatePhaseApp returns a new app phase executor
func NewUpdatePhaseBeforeApp ¶
func NewUpdatePhaseBeforeApp( p fsm.ExecutorParams, apps app.Applications, client *kubernetes.Clientset, logger log.FieldLogger, ) (fsm.PhaseExecutor, error)
NewUpdatePhaseBeforeApp returns a new executor for running application pre-update hook
func NewUpdatePhaseBootstrap ¶
func NewUpdatePhaseBootstrap( p fsm.ExecutorParams, operator ops.Operator, backend, localBackend storage.Backend, hostLocalBackend storage.LocalBackend, localPackages, packages pack.PackageService, remote fsm.Remote, logger log.FieldLogger, ) (fsm.PhaseExecutor, error)
NewUpdatePhaseBootstrap creates a new bootstrap phase executor
func NewUpdatePhaseChecks ¶
func NewUpdatePhaseChecks( p fsm.ExecutorParams, operator ops.Operator, apps app.Applications, remote rpc.AgentRepository, logger log.FieldLogger, ) (fsm.PhaseExecutor, error)
NewUpdatePhaseChecks creates a new preflight checks phase executor
func NewUpdatePhaseConfig ¶
func NewUpdatePhaseConfig( p fsm.ExecutorParams, operator ops.Operator, packages pack.PackageService, localPackages pack.PackageService, remote fsm.Remote, logger log.FieldLogger, ) (fsm.PhaseExecutor, error)
NewUpdatePhaseConfig returns executor that pulls local configuration packages
func NewUpdatePhaseInit ¶
func NewUpdatePhaseInit( p fsm.ExecutorParams, operator ops.Operator, apps app.Applications, backend, localBackend storage.Backend, packages pack.PackageService, users users.Identity, client *kubernetes.Clientset, logger log.FieldLogger, ) (fsm.PhaseExecutor, error)
NewUpdatePhaseInit creates a new update init phase executor
func NewUpdatePhaseSELinux ¶
func NewUpdatePhaseSELinux( p fsm.ExecutorParams, operator ops.Operator, apps app.Applications, logger log.FieldLogger, ) (fsm.PhaseExecutor, error)
NewUpdatePhaseSELinux creates a new phase to configure SELinux on a node
func NewUpdatePhaseSystem ¶
func NewUpdatePhaseSystem( p fsm.ExecutorParams, remote fsm.Remote, backend storage.Backend, packages pack.PackageService, localPackages update.LocalPackageService, logger log.FieldLogger, ) (fsm.PhaseExecutor, error)
NewUpdatePhaseSystem returns a new node update phase executor
Types ¶
type PhaseUpgradeEtcd ¶
type PhaseUpgradeEtcd struct { log.FieldLogger Server storage.Server }
PhaseUpgradeEtcd upgrades etcd specifically on the leader
type PhaseUpgradeEtcdBackup ¶
type PhaseUpgradeEtcdBackup struct {
log.FieldLogger
}
PhaseUpgradeEtcdBackup backs up etcd data on all servers
func (*PhaseUpgradeEtcdBackup) Execute ¶
func (p *PhaseUpgradeEtcdBackup) Execute(ctx context.Context) error
func (*PhaseUpgradeEtcdBackup) PostCheck ¶
func (*PhaseUpgradeEtcdBackup) PostCheck(context.Context) error
type PhaseUpgradeEtcdRestart ¶
PhaseUpgradeEtcdRestart disables the etcd-upgrade service, and starts the etcd service
func (*PhaseUpgradeEtcdRestart) Execute ¶
func (p *PhaseUpgradeEtcdRestart) Execute(ctx context.Context) error
func (*PhaseUpgradeEtcdRestart) PostCheck ¶
func (*PhaseUpgradeEtcdRestart) PostCheck(context.Context) error
type PhaseUpgradeEtcdRestore ¶
type PhaseUpgradeEtcdRestore struct { log.FieldLogger Server storage.Server }
PhaseUpgradeEtcdRestore restores etcd data from backup, if it was wiped by the upgrade stage
func (*PhaseUpgradeEtcdRestore) Execute ¶
func (p *PhaseUpgradeEtcdRestore) Execute(ctx context.Context) error
Execute restores the etcd data from backup 7. Restore the /registry (kubernetes) data to etcd, including automatic migration to v3 datastore for kubernetes 10. Restart etcd on the correct ports on first node // API outage ends
func (*PhaseUpgradeEtcdRestore) PostCheck ¶
func (*PhaseUpgradeEtcdRestore) PostCheck(context.Context) error
type PhaseUpgradeEtcdShutdown ¶
type PhaseUpgradeEtcdShutdown struct { log.FieldLogger Client *kubeapi.Clientset // contains filtered or unexported fields }
PhaseUpgradeEtcdShutdown shuts down etcd across the cluster
func (*PhaseUpgradeEtcdShutdown) Execute ¶
func (p *PhaseUpgradeEtcdShutdown) Execute(ctx context.Context) error
func (*PhaseUpgradeEtcdShutdown) PostCheck ¶
func (*PhaseUpgradeEtcdShutdown) PostCheck(context.Context) error
type PhaseUpgradeGravitySiteRestart ¶
type PhaseUpgradeGravitySiteRestart struct { log.FieldLogger Client *kubeapi.Clientset }
PhaseUpgradeGravitySiteRestart restarts gravity-site pod
func (*PhaseUpgradeGravitySiteRestart) Execute ¶
func (p *PhaseUpgradeGravitySiteRestart) Execute(ctx context.Context) error
func (*PhaseUpgradeGravitySiteRestart) PostCheck ¶
func (*PhaseUpgradeGravitySiteRestart) PostCheck(context.Context) error