controller

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0, MIT Imports: 19 Imported by: 0

Documentation

Overview

Controller manages the state transitions of the node's agent which itself integrates with the Bottlerocket platform. The controller takes cluster state into account and manages the nodes at arms length by encoding agreed upon state transitions into a combination of labels and annotations stored as metadata on the Kubernetes Resource Object for each Node.

Currently, this controller is capable of:

  • coordinating host updates such that no two nodes are performing an update simultaneously

The controller IS NOT capable of (yet!):

  • ensuring that workloads are sufficiently replicated or distributed to avoid service outages.

- executing transitions during a set maintenance period

- executing transitions with a bake time

  • configuring cluster wide update settings (normally, and currently, set via user data)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller coordinates updates within a Cluster run by the Update Operator Agent on Bottlerocket Nodes.

func New

func New(log logging.Logger, kube kubernetes.Interface, nodeName string) (*Controller, error)

New creates a Controller instance.

func (*Controller) Run

func (c *Controller) Run(ctx context.Context) error

Run executes the event loop for the Controller until signaled to exit.

type Policy

type Policy interface {
	// Check determines if the policy permits continuing with an intended
	// action.
	Check(*PolicyCheck) (bool, error)
}

type PolicyCheck

type PolicyCheck struct {
	Intent        *intent.Intent
	ClusterActive int
	ClusterCount  int
}

Jump to

Keyboard shortcuts

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