options

package
v0.0.0-...-3d6e66f Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBaseDomain

func GetBaseDomain(cloud string) (string, error)

GetBaseDomain returns the BaseDomain for the supported cloud providers

func GetHubKubeConfig

func GetHubKubeConfig(configDir, kubeConfigPath string) string

GetHubKubeConfig returns the hub kubeconfig path if provided if not it search for a kubeocnfig.yaml in the configDir if exists and empty string if not The kubeconfig file for the hub is supposed to be in <configDir>/kubeconfig

func GetManagedClusterKubeConfigs

func GetManagedClusterKubeConfigs(configDir, scenario string) (map[string]string, error)

GetManagedClusterKubeConfigs returns all managedcluster kubeconfig for a given scenario The file path <configDir>/<scenario>/<clusterName>/kubeconfig.yaml are returned

func GetOwner

func GetOwner() string

GetOwner returns the owner in the following priority: 1. From command-line 2. From options.yaml 3. Using the $USER environment variable. 4. Default: ginkgo

func GetRegion

func GetRegion(cloud string) (string, error)

GetRegion returns the region for the supported cloud providers

func GetUID

func GetUID() (string, error)

GetUID returns the UID in the following priority: 1. From command-line 2. From options.yaml 3. Generate a new one

func LoadOptions

func LoadOptions(optionsFile string) error

LoadOptions load the options in the following priority: 1. The provided file path 2. The OPTIONS environment variable 3. Default "resources/options.yaml"

func StringWithCharset

func StringWithCharset(length int, charset string) (string, error)

StringWithCharset returns a string of the given length and componsed from a characters of the provided charset

Types

type APIKeys

type APIKeys struct {
	AWS       AWSAPIKey       `json:"aws,omitempty"`
	GCP       GCPAPIKey       `json:"gcp,omitempty"`
	Azure     AzureAPIKey     `json:"azure,omitempty"`
	BareMetal BareMetalAPIKey `json:"baremetal,omitempty"`
}

APIKeys - define the cloud connection information

type AWSAPIKey

type AWSAPIKey struct {
	AWSAccessKeyID  string `json:"awsAccessKeyID"`
	AWSAccessSecret string `json:"awsSecretAccessKeyID"`
	BaseDNSDomain   string `json:"baseDnsDomain"`
	Region          string `json:"region"`
}

AWSAPIKey ...

type AzureAPIKey

type AzureAPIKey struct {
	BaseDomainRGN  string `json:"azureBaseDomainRGN"`
	BaseDNSDomain  string `json:"baseDnsDomain"`
	SubscriptionID string `json:"subscriptionID"`
	ClientID       string `json:"clientID"`
	ClientSecret   string `json:"clientSecret"`
	TenantID       string `json:"tenantID"`
	Region         string `json:"region"`
}

AzureAPIKey ...

type BMC

type BMC struct {
	Address                        string `json:"address"`
	DisableCertificateVerification bool   `json:"disableCertificateVerification"`
	Username                       string `json:"username"`
	Password                       string `json:"password"`
}

BMC ...

type BareMetalAPIKey

type BareMetalAPIKey struct {
	ClusterName                  string   `json:"clusterName"`
	BaseDNSDomain                string   `json:"baseDnsDomain"`
	LibvirtURI                   string   `json:"libvirtURI"`
	ProvisioningNetworkCIDR      string   `json:"provisioningNetworkCIDR"`
	ProvisioningNetworkInterface string   `json:"provisioningNetworkInterface"`
	ProvisioningBridge           string   `json:"provisioningBridge"`
	ExternalBridge               string   `json:"externalBridge"`
	APIVIP                       string   `json:"apiVIP"`
	IngressVIP                   string   `json:"ingressVIP"`
	SSHKnownHostsList            []string `json:"sshKnownHostsList"`
	ImageRegistryMirror          string   `json:"imageRegistryMirror"`
	BootstrapOSImage             string   `json:"bootstrapOSImage"`
	ClusterOSImage               string   `json:"clusterOSImage"`
	TrustBundle                  string   `json:"trustBundle"`
	Hosts                        []Hosts  `json:"hosts"`
}

BareMetalAPIKey ...

type CloudConnection

type CloudConnection struct {
	PullSecret    string  `json:"pullSecret"`
	SSHPrivateKey string  `json:"sshPrivatekey"`
	SSHPublicKey  string  `json:"sshPublickey"`
	APIKeys       APIKeys `json:"apiKeys,omitempty"`
}

CloudConnection struct for bits having to do with Connections

type Cluster

type Cluster struct {
	Name         string          `json:"name,omitempty"`
	Namespace    string          `json:"namespace,omitempty"`
	Tags         map[string]bool `json:"tags,omitempty"`
	BaseDomain   string          `json:"baseDomain"`
	User         string          `json:"user,omitempty"`
	Password     string          `json:"password,omitempty"`
	KubeContext  string          `json:"kubecontext,omitempty"`
	ApiServerURL string          `json:"apiServerURL,omitempty"`
	KubeConfig   string          `json:"kubeconfig,omitempty"`
}

Cluster ... Define the shape of clusters that may be added under management

type ClusterName

type ClusterName struct {
	Owner string
	Cloud string
	// contains filtered or unexported fields
}

ClusterName ...

func NewClusterName

func NewClusterName(cloud string) (*ClusterName, error)

NewClusterName returns a new ClusterName with a uid.

func (*ClusterName) GetUID

func (c *ClusterName) GetUID() string

GetUID return the uid for that ClusterName

func (*ClusterName) String

func (c *ClusterName) String() string

String format the clusterName as string

type GCPAPIKey

type GCPAPIKey struct {
	ProjectID             string `json:"gcpProjectID"`
	ServiceAccountJSONKey string `json:"gcpServiceAccountJsonKey"`
	BaseDNSDomain         string `json:"baseDnsDomain"`
	Region                string `json:"region"`
}

GCPAPIKey ...

type Hosts

type Hosts struct {
	Name            string `json:"name"`
	Namespace       string `json:"namespace"`
	Role            string `json:"role"`
	Bmc             BMC    `json:"bmc"`
	BootMACAddress  string `json:"bootMACAddress"`
	HardwareProfile string `json:"hardwareProfile"`
}

Hosts ...

type ImageRegistry

type ImageRegistry struct {
	Server   string `json:"server"`
	User     string `json:"user"`
	Password string `json:"password"`
}

ImageRegistry - define the image repo information

type TestOptionsContainer

type TestOptionsContainer struct {
	Options TestOptionsT `json:"options"`
}
var TestOptions TestOptionsContainer

type TestOptionsT

type TestOptionsT struct {
	Hub               Cluster         `json:"hub"`
	ManagedClusters   []Cluster       `json:"clusters"`
	ImageRegistry     ImageRegistry   `json:"imageRegistry,omitempty"`
	OCPReleaseVersion string          `json:"ocpReleaseVersion,omitempty"`
	IdentityProvider  string          `json:"identityProvider,omitempty"`
	CloudConnection   CloudConnection `json:"cloudConnection,omitempty"`
}

TestOptions ... Define options available for Tests to consume

Jump to

Keyboard shortcuts

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