supercontroller

package
v0.0.0-...-cae2324 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeState

type NodeState struct {
	Deployments []api.Deployment `json:"deployments"`
	Services    []api.Service    `json:"services"`
	Job         []api.Job        `json:"jobs"`
}

type SuperController

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

func NewSuperController

func NewSuperController() (*SuperController, error)

func (*SuperController) AddPods

func (s *SuperController) AddPods(deployment api.Deployment, count uint) error

Adds the required number of pods

func (*SuperController) DeploymentRoutes

func (s *SuperController) DeploymentRoutes()

func (*SuperController) RemovePods

func (s *SuperController) RemovePods(deployment api.Deployment, count uint) error

Removes the given number of pods

func (*SuperController) Start

func (s *SuperController) Start() error

func (*SuperController) UpdateDeployments

func (s *SuperController) UpdateDeployments(c *fiber.Ctx) error

func (*SuperController) Watch

func (s *SuperController) Watch()

func (*SuperController) WatchDeployments

func (s *SuperController) WatchDeployments()

Whenever we register a difference between desired state and actual state we need to update the pods in the superlet for the node now this update can be one of the following: 1. Create a new pod 2. Delete an existing pod 3. Update an existing pod 4. Increase the number of replicas of the pod 5. Stop a running pod 6. Restart a pod 7. Update the image of a pod We can create something like a job for things like restarting, deletion, image updation, etc. Could use a message queue instead of the cache for that. Or for consistency use the cache and

func (*SuperController) WatchServices

func (s *SuperController) WatchServices()

Jump to

Keyboard shortcuts

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