config

package
v0.0.0-...-5b6f1bf Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LabelName string                   `json:"app_label_name"`
	Sidecars  map[string]SidecarConfig `json:"sidecars"`
}

func Parse

func Parse(configFilePath string) (Config, error)

TODO: add cue validation if needed

type Owner

type Owner string
const (
	Deployment Owner = "Deployment"
	ReplicaSet Owner = "ReplicaSet"
	DaemonSet  Owner = "DaemonSet"
)

func (Owner) MarshalText

func (o Owner) MarshalText() ([]byte, error)

func (*Owner) UnmarshalText

func (o *Owner) UnmarshalText(data []byte) error

type ResourceStep

type ResourceStep struct {
	Name         string `json:"name"`
	RestartLimit int    `json:"restart_limit"`
	CPURequest   string `json:"cpu_request"`
	CPULimit     string `json:"cpu_limit"`
	MemRequest   string `json:"mem_request"`
	MemLimit     string `json:"mem_limit"`
}

type SidecarConfig

type SidecarConfig struct {
	ErrCodes              []int          `json:"err_codes"`
	Owner                 Owner          `json:"owner"`
	Steps                 []ResourceStep `json:"steps"`
	CPUAnnotationKey      string         `json:"cpu_annotation_key"`
	CPULimitAnnotationKey string         `json:"cpu_limit_annotation_key"`
	MemAnnotationKey      string         `json:"mem_annotation_key"`
	MemLimitAnnotationKey string         `json:"mem_limit_annotation_key"`
}

Jump to

Keyboard shortcuts

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