Documentation ¶
Index ¶
- func GetBaseDomain(cloud string) (string, error)
- func GetHubKubeConfig(configDir, kubeConfigPath string) string
- func GetManagedClusterKubeConfigs(configDir, scenario string) (map[string]string, error)
- func GetOwner() string
- func GetRegion(cloud string) (string, error)
- func GetUID() (string, error)
- func LoadOptions(optionsFile string) error
- func StringWithCharset(length int, charset string) (string, error)
- type APIKeys
- type AWSAPIKey
- type AzureAPIKey
- type BMC
- type BareMetalAPIKey
- type CloudConnection
- type Cluster
- type ClusterName
- type GCPAPIKey
- type Hosts
- type ImageRegistry
- type TestOptionsContainer
- type TestOptionsT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBaseDomain ¶
GetBaseDomain returns the BaseDomain for the supported cloud providers
func GetHubKubeConfig ¶
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 ¶
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 GetUID ¶
GetUID returns the UID in the following priority: 1. From command-line 2. From options.yaml 3. Generate a new one
func LoadOptions ¶
LoadOptions load the options in the following priority: 1. The provided file path 2. The OPTIONS environment variable 3. Default "resources/options.yaml"
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 ¶
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