Documentation ¶
Index ¶
- Constants
- Variables
- func GetEnvWithDefault(key string, defaultValue string) string
- func GetKubeConfigDir() string
- func GetRHCSOutputDir() string
- func GrantClusterManifestDir(manifestDir string) string
- func GrantTFstateFile(manifestDir string) string
- func GrantTFvarsFile(manifestDir string) string
- type RHCSconfig
Constants ¶
View Source
const ( TokenURL = "https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token" ClientID = "cloud-services" ClientSecret = "" SkipAuth = true Integration = false HealthcheckURL = "http://localhost:8083" )
View Source
const ( X = "x" Y = "y" Z = "z" )
OCP version streams
View Source
const ( UnderscoreConnector string = "_" DotConnector string = "." HyphenConnector string = "-" )
View Source
const ( Pending = "pending" Scheduled = "scheduled" Started = "started" Completed = "completed" Delayed = "delayed" Failed = "failed" Cancelled = "cancelled" Waiting = "waiting" )
Upgrade Policy States
View Source
const ( TokenENVName = "RHCS_TOKEN" ClusterIDEnv = "CLUSTER_ID" RHCSENV = "RHCS_ENV" RhcsClusterProfileENV = "CLUSTER_PROFILE" QEUsage = "QE_USAGE" ClusterTypeManifestDirEnv = "CLUSTER_ROSA_TYPE" MajorVersion = "MAJOR_VERSION_ENV" RHCSVersion = "RHCS_VERSION" RHCSSource = "RHCS_SOURCE" WaitOperators = "WAIT_OPERATORS" )
Below constants is the env variable name defined to run on different testing requirements
View Source
const ( AWSProviderDIR = "aws" AZUREProviderDIR = "azure" RHCSProviderDIR = "rhcs" )
Provider dirs' name definition
View Source
const ( NoExecute = "NoExecute" NoSchedule = "NoSchedule" PreferNoSchedule = "PreferNoSchedule" )
Machine pool taints effect
View Source
const (
DefaultAWSRegion = "us-east-2"
)
View Source
const (
DefaultVPCCIDR = "10.0.0.0/16"
)
View Source
const (
Ready = "ready"
)
Cluster state
Variables ¶
View Source
var ( AutomaticScheduleType cmv1.ScheduleType = "automatic" ManualScheduleType cmv1.ScheduleType = "manual" )
View Source
var ( DefaultMajorVersion = "4.14" CharsBytes = "abcdefghijklmnopqrstuvwxyz123456789" WorkSpace = "WORKSPACE" RHCSPrefix = "rhcs" TFYAMLProfile = "tf_cluster_profile.yml" ConfigSuffix = "kubeconfig" DefaultAccountRolesPrefix = "account-role-" ManifestsDirENV = os.Getenv("MANIFESTS_FOLDER") )
View Source
var ( AccountRolesDir = path.Join(ConfigrationDir, AWSProviderDIR, "account-roles") AddAccountRolesDir = path.Join(ConfigrationDir, AWSProviderDIR, "add-account-roles") OIDCProviderOperatorRolesManifestDir = path.Join(ConfigrationDir, AWSProviderDIR, "oidc-provider-operator-roles") AWSVPCDir = path.Join(ConfigrationDir, AWSProviderDIR, "vpc") AWSVPCTagDir = path.Join(ConfigrationDir, AWSProviderDIR, "vpc-tags") AWSSecurityGroupDir = path.Join(ConfigrationDir, AWSProviderDIR, "security-groups") ProxyDir = path.Join(ConfigrationDir, AWSProviderDIR, "proxy") KMSDir = path.Join(ConfigrationDir, AWSProviderDIR, "kms") )
Dirs of aws provider
View Source
var ( ClusterDir = path.Join(ConfigrationDir, RHCSProviderDIR, "clusters") ImportResourceDir = path.Join(ConfigrationDir, RHCSProviderDIR, "resource-import") IDPsDir = path.Join(ConfigrationDir, RHCSProviderDIR, "idps") MachinePoolDir = path.Join(ConfigrationDir, RHCSProviderDIR, "machine-pools") DNSDir = path.Join(ConfigrationDir, RHCSProviderDIR, "dns") RhcsInfoDir = path.Join(ConfigrationDir, RHCSProviderDIR, "rhcs-info") DefaultMachinePoolDir = path.Join(ConfigrationDir, RHCSProviderDIR, "default-machine-pool") KubeletConfigDir = path.Join(ConfigrationDir, RHCSProviderDIR, "kubelet-config") )
Dirs of rhcs provider
View Source
var ( ROSAClassic = path.Join(ClusterDir, "rosa-classic") OSDCCS = path.Join(ClusterDir, "osd-ccs") )
Dirs of different types of clusters
View Source
var ( HtpasswdDir = path.Join(IDPsDir, "htpasswd") GitlabDir = path.Join(IDPsDir, "gitlab") GithubDir = path.Join(IDPsDir, "github") LdapDir = path.Join(IDPsDir, "ldap") OpenidDir = path.Join(IDPsDir, "openid") GoogleDir = path.Join(IDPsDir, "google") MultiIDPDir = path.Join(IDPsDir, "multi-idp") )
Dirs of identity providers
View Source
var ( NilMap map[string]string Tags = map[string]string{"tag1": "test_tag1", "tag2": "test_tag2"} ClusterAdminUser = "rhcs-clusteradmin" DefaultMPLabels = map[string]string{ "test1": "testdata1", } CustomProperties = map[string]string{"custom_property": "test", "qe_usage": GetEnvWithDefault(QEUsage, "")} LdapURL = "ldap://ldap.forumsys.com/dc=example,dc=com?uid" GitLabURL = "https://gitlab.cee.redhat.com" Organizations = []string{"openshift"} HostedDomain = "redhat.com" )
View Source
var ConfigrationDir = initDIR()
View Source
var GateWayURL, OCMENV = gatewayURL()
View Source
var RHCS = new(RHCSconfig)
Functions ¶
func GetEnvWithDefault ¶ added in v1.4.0
func GetKubeConfigDir ¶ added in v1.5.0
func GetKubeConfigDir() string
func GetRHCSOutputDir ¶ added in v1.5.0
func GetRHCSOutputDir() string
func GrantClusterManifestDir ¶ added in v1.3.0
Supports abs and relatives
func GrantTFstateFile ¶ added in v1.5.1
func GrantTFvarsFile ¶ added in v1.5.0
Types ¶
type RHCSconfig ¶ added in v1.4.0
type RHCSconfig struct { // Env is the OpenShift Cluster Management environment used to provision clusters. RHCSEnv string `env:"RHCS_ENV" default:"staging" yaml:"env"` ClusterProfile string `env:"CLUSTER_PROFILE" yaml:"clusterProfile,omitempty"` ClusterProfileDir string `env:"CLUSTER_PROFILE_DIR" yaml:"clusterProfileDir,omitempty"` RhcsOutputDir string YAMLProfilesDir string RootDir string KubeConfigDir string RHCSSource string `env:"RHCS_SOURCE" default:"staging" yaml:"env"` RHCSVersion string `env:"RHCS_VERSION" default:"staging" yaml:"env"` }
RHCSConfig contains platforms info for the RHCS testing
Click to show internal directories.
Click to hide internal directories.