config

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig(path *string)

NewConfig set config

Types

type Config

type Config struct {
	App                string              `json:"app" yaml:"app"`
	Project            string              `json:"project" yaml:"project"`
	Service            string              `json:"service" yaml:"service"`
	Version            string              `json:"version" yaml:"version"`
	Hpa                Hpa                 `json:"hpa" yaml:"hpa"`
	Resources          map[string]Resource `json:"resources" yaml:"resources"`
	Replicas           uint                `json:"replicas" yaml:"replicas"`
	TestReplicas       uint                `json:"testReplicas" yaml:"testReplicas"`
	ServiceAccount     bool                `json:"serviceAccount" yaml:"serviceAccount"`
	ServiceAccountName string              `json:"serviceAccountName" yaml:"serviceAccountName"`
	Image              Image               `json:"image" yaml:"image"`
	Ports              []Port              `json:"ports" yaml:"ports"`
	Metrics            Metrics             `json:"metrics" yaml:"metrics"`
	ImportEnvNames     []string            `json:"importEnvNames" yaml:"importEnvNames"`
	Config             []ConfigmapData     `json:"config" yaml:"config"`
	Secret             []SecretData        `json:"secret" yaml:"secret"`
	Storages           []Storage           `json:"storages" yaml:"storages"`
	WorkloadType       string              `json:"workloadType" yaml:"workloadType"`
	Command            []*string           `json:"command" yaml:"command"`
	Args               []*string           `json:"args" yaml:"args"`
	Containers         []Container         `json:"containers" yaml:"containers"`
	NodeSelector       map[string]*string  `json:"nodeSelector" yaml:"nodeSelector"`
}
var Cfg Config

func (*Config) GetName added in v0.1.0

func (c *Config) GetName() string

type ConfigmapData

type ConfigmapData struct {
	Name    string            `json:"name" yaml:"name"`
	Path    string            `json:"path" yaml:"path"`
	EnvName string            `json:"envName" yaml:"envName"`
	Key     string            `json:"key" yaml:"key"`
	Data    map[string]string `json:"data" yaml:"data"`
}

type Container

type Container struct {
	Image string          `json:"image" yaml:"image"`
	Name  string          `json:"name" yaml:"name"`
	Ports []ContainerPort `json:"ports" yaml:"ports"`
}

type ContainerPort

type ContainerPort struct {
	Name          string  `json:"name"`
	HostIp        string  `json:"hostIp"`
	HostPort      float64 `json:"hostPort"`
	ContainerPort float64 `json:"containerPort"`
	Protocol      string  `json:"protocol"`
}

type Hpa added in v0.1.9

type Hpa struct {
	Enabled     bool `json:"enabled" yaml:"enabled"`
	MinReplicas uint `json:"minReplicas" yaml:"minReplicas"`
	MaxReplicas uint `json:"maxReplicas" yaml:"maxReplicas"`
}

type Image

type Image struct {
	Path    string   `json:"path" yaml:"path"`
	Tag     string   `json:"tag" yaml:"tag"`
	Secrets []string `json:"secrets" yaml:"secrets"`
}

func (Image) String

func (e Image) String() string

type Metrics

type Metrics struct {
	Scrape bool   `json:"scrape" yaml:"scrape"`
	Path   string `json:"path" yaml:"path"`
	Port   uint   `json:"port" yaml:"port"`
}

type Port

type Port struct {
	Port       uint   `json:"port" yaml:"port"`
	TargetPort uint   `json:"targetPort" yaml:"targetPort"`
	Name       string `json:"name" yaml:"name"`
}

type Resource

type Resource struct {
	CPU    string `json:"cpu" yaml:"cpu"`
	Memory string `json:"memory" yaml:"memory"`
}

type SecretData added in v0.1.5

type SecretData struct {
	Name    string `json:"name" yaml:"name"`
	Path    string `json:"path" yaml:"path"`
	EnvName string `json:"envName" yaml:"envName"`
	Key     string `json:"key" yaml:"key"`
}

type Storage added in v0.1.1

type Storage struct {
	Name         string `json:"name" yaml:"name"`
	Path         string `json:"path" yaml:"path"`
	SubPath      string `json:"subPath" yaml:"subPath"`
	Size         string `json:"size" yaml:"size"`
	StorageClass string `json:"storageClass" yaml:"storageClass"`
}

Jump to

Keyboard shortcuts

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