config

package
v0.0.0-...-ed127e3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const PORT = "8080"

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationConfig

type ApplicationConfig struct {
	Name                   string       `yaml:"name"`
	NamespaceMappingFormat string       `yaml:"namespaceMappingFormat"`
	Namespaces             []Namespaces `yaml:"namespaces"`
}

type ApplicationParams

type ApplicationParams struct {
	Name  string `yaml:"name"`
	Value string `yaml:"value"`
}

type Args

type Args struct {
	ConfigFile    string `short:"f" description:"Application configuration file for deployment" required:"true"`
	RootOutputDir string `short:"o" long:"output-dir" default:"output" description:"Root output folder"`
	RootSourceDir string `short:"s" long:"source-dir" description:"Root source folder" required:"true"`
	Port          int
	Debug         bool
}

func ParseEnvs

func ParseEnvs() *Args

func ParseFlags

func ParseFlags() *Args

type AwsSettings

type AwsSettings struct {
	AwsPublicDomain    string `yaml:"aws_public_domain"`
	AwsAccountName     string `yaml:"aws_account_name"`
	AwsAccessKeyId     string `yaml:"aws_access_key_id"`
	AwsSecretAccessKey string `yaml:"aws_secret_access_key"`
}

type ClusterConfig

type ClusterConfig struct {
	Server        string        `yaml:"server"`
	User          string        `yaml:"user"`
	Token         string        `yaml:"token"`
	FromClusterId string        `yaml:"fromClusterId"`
	ClusterId     string        `yaml:"clusterId"`
	Aws           AwsSettings   `yaml:"aws"`
	Params        ClusterParams `yaml:"params"`
	Provision     ClusterProvision
}

type ClusterParams

type ClusterParams struct {
	ClusterName           string `yaml:"CLUSTER_NAME",omitempty`
	ClusterBaseDomain     string `yaml:"CLUSTER_BASE_DOMAIN",omitempty`
	WorkerCount           string `yaml:"WORKER_COUNT",omitempty`
	ClusterVersion        string `yaml:"CLUSTER_VERSION",omitempty`
	ClusterNetwork        string `yaml:"CLUSTER_NETWORK",omitempty`
	HostPrefix            string `yaml:"HOST_PREFIX",omitempty`
	ServiceNetwork        string `yaml:"SERVICE_NETWORK",omitempty`
	NetworkType           string `yaml:"NETWORK_TYPE",omitempty`
	RegistryRouteHostname string `yaml:"REGISTRY_ROUTE_HOSTNAME",omitempty`
	RegistryIsExposed     string `yaml:"REGISTRY_IS_EXPOSED",omitempty`
	ProvCloudProvider     string `yaml:"PROV_CLOUD_PROVIDER",omitempty`
	ProvCloudRegion       string `yaml:"PROV_CLOUD_REGION",omitempty`
	MasterCount           string `yaml:"MASTER_COUNT",omitempty`
}

type ClusterProvision

type ClusterProvision struct {
	AuthByCreds    bool
	Provisioned    bool
	KubeConfigPath string
}

type ComponentConfig

type ComponentConfig struct {
	ClusterConfig     ClusterConfig     `yaml:"cluster"`
	ApplicationConfig ApplicationConfig `yaml:"application"`
}

func InitDeployerConfig

func InitDeployerConfig(configFile string) *ComponentConfig

func (*ComponentConfig) Validate

func (e *ComponentConfig) Validate() error

type ConfigMaps

type ConfigMaps struct {
	ConfigMap string              `yaml:"configMap"`
	Params    []ApplicationParams `yaml:"params"`
}

type DeployerConfig

type DeployerConfig struct {
	Deployer ComponentConfig `yaml:"deployer"`
}

type Namespaces

type Namespaces struct {
	Name       string       `yaml:"name"`
	Target     string       `yaml:"target"`
	ConfigMaps []ConfigMaps `yaml:"params"`
	Secrets    []Secrets    `yaml:"secrets"`
}

type Secrets

type Secrets struct {
	Secret string              `yaml:"secret"`
	Params []ApplicationParams `yaml:"params"`
}

Jump to

Keyboard shortcuts

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