config

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePreset

func ValidatePreset(preset *Preset) validation.ValidationErrors

Types

type Preset

type Preset struct {
	Name         string             `yaml:"name" validate:"required"`
	Namespace    string             `yaml:"namespace" validate:"required"`
	Deployments  []ScalableResource `yaml:"deployments" validate:"required,dive"`
	StatefulSets []ScalableResource `yaml:"statefulSets" validate:"required,dive"`
}

func LoadPreset

func LoadPreset(filepath string) (*Preset, error)

func (*Preset) Apply

func (p *Preset) Apply(client *kube.KubeClient)

func (*Preset) ApplyDeployments

func (p *Preset) ApplyDeployments(client *kube.KubeClient)

func (*Preset) ApplyStatefulSet

func (p *Preset) ApplyStatefulSet(client *kube.KubeClient)

func (*Preset) Populate

func (p *Preset) Populate(client *kube.KubeClient)

func (*Preset) PopulateDeployments

func (p *Preset) PopulateDeployments(client *kube.KubeClient)

func (*Preset) PopulateStatefulSets

func (p *Preset) PopulateStatefulSets(client *kube.KubeClient)

func (*Preset) SavePreset

func (p *Preset) SavePreset(filepath string) error

type ScalableResource

type ScalableResource struct {
	Name     string `yaml:"name" validate:"required"`
	Replicas int32  `yaml:"replicas" validate:"required,gte=0"`
}

Jump to

Keyboard shortcuts

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