config

package
v0.0.0-...-57daf80 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetAuthorization

func SetAuthorization(config *CloudConfig) error

func ValidateCloudConfig

func ValidateCloudConfig(config *CloudConfig) error

Types

type CloudConfig

type CloudConfig struct {
	VCD       VCDConfig `yaml:"vcd"`
	LB        LBConfig  `yaml:"loadbalancer"`
	ClusterID string    `yaml:"clusterid"`
}

CloudConfig contains the config that will be read from the secret

func ParseCloudConfig

func ParseCloudConfig(configReader io.Reader) (*CloudConfig, error)

ParseCloudConfig : parses config and env to fill in the CloudConfig struct

type LBConfig

type LBConfig struct {
	OneArm           *OneArm `yaml:"oneArm,omitempty"`
	Ports            Ports   `yaml:"ports"`
	CertificateAlias string  `yaml:"certAlias"`
}

LBConfig :

type OneArm

type OneArm struct {
	StartIP string `yaml:"startIP"`
	EndIP   string `yaml:"endIP"`
}

OneArm :

type Ports

type Ports struct {
	HTTP  int32 `yaml:"http" default:"80"`
	HTTPS int32 `yaml:"https" default:"443"`
}

Ports :

type VCDConfig

type VCDConfig struct {
	Host    string `yaml:"host"`
	VDC     string `yaml:"vdc"`
	Org     string `yaml:"org"`
	UserOrg string // this defaults to Org or a prefix of User

	// The User, Secret and RefreshToken are obtained from a secret mounted to /etc/kubernetes/vcloud/basic-auth
	// with files at username, password and refreshToken respectively.
	// The User could be userOrg/user or just user. In the latter case, we assume
	// that Org is the org in which the user exists.
	User         string
	Secret       string
	RefreshToken string

	VDCNetwork string `yaml:"network"`
	VIPSubnet  string `yaml:"vipSubnet"`
	VAppName   string `yaml:"vAppName"`
}

VCDConfig :

Jump to

Keyboard shortcuts

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