config

package
v0.0.0-...-22414a3 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetAuthorization

func SetAuthorization(config *CloudConfig) error

Types

type CloudConfig

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

CloudConfig contains the config that will be read from the secret

func ParseCloudConfig

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

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
	VAppName             string `yaml:"vAppName"`
	IsZoneEnabledCluster bool   `yaml:"isZoneEnabledCluster"`

	// 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
}

VCDConfig :

Jump to

Keyboard shortcuts

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