constants

package
v1.6.2-prerelease.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 (
	NoExecute        = "NoExecute"
	NoSchedule       = "NoSchedule"
	PreferNoSchedule = "PreferNoSchedule"
)

Machine pool taints effect

View Source
const (
	AWSProviderDir  = "aws"
	RHCSProviderDir = "rhcs"
)

Provider dirs' name definition

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"
	ConfigSuffix                         = "kubeconfig"
	DefaultAccountRolesPrefix            = "account-role-"
	ManifestsDirENV                      = os.Getenv("MANIFESTS_FOLDER")
	SharedVpcAWSSharedCredentialsFileENV = os.Getenv("SHARED_VPC_AWS_SHARED_CREDENTIALS_FILE")
)
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 (
	ROSA_CLASSIC = ClusterType{Name: "rosa-classic"}
	ROSA_HCP     = ClusterType{Name: "rosa-hcp", HCP: true}
)
View Source
var (
	AccountRolesClassicDir                      = path.Join(ManifestsConfigurationDir, AWSProviderDir, "account-roles", "rosa-classic")
	AccountRolesHCPDir                          = path.Join(ManifestsConfigurationDir, AWSProviderDir, "account-roles", "rosa-hcp")
	AddAccountRolesClassicDir                   = path.Join(ManifestsConfigurationDir, AWSProviderDir, "add-account-roles", "rosa-classic")
	AddAccountRolesHCPDir                       = path.Join(ManifestsConfigurationDir, AWSProviderDir, "add-account-roles", "rosa-hcp")
	OIDCProviderOperatorRolesClassicManifestDir = path.Join(ManifestsConfigurationDir, AWSProviderDir, "oidc-provider-operator-roles", "rosa-classic")
	OIDCProviderOperatorRolesHCPManifestDir     = path.Join(ManifestsConfigurationDir, AWSProviderDir, "oidc-provider-operator-roles", "rosa-hcp")
	AWSVPCDir                                   = path.Join(ManifestsConfigurationDir, AWSProviderDir, "vpc")
	AWSVPCTagDir                                = path.Join(ManifestsConfigurationDir, AWSProviderDir, "vpc-tags")
	AWSSecurityGroupDir                         = path.Join(ManifestsConfigurationDir, AWSProviderDir, "security-groups")
	ProxyDir                                    = path.Join(ManifestsConfigurationDir, AWSProviderDir, "proxy")
	KMSDir                                      = path.Join(ManifestsConfigurationDir, AWSProviderDir, "kms")
	SharedVpcPolicyAndHostedZoneDir             = path.Join(ManifestsConfigurationDir, AWSProviderDir, "shared-vpc-policy-and-hosted-zone")
)

Dirs of aws provider

View Source
var (
	ClusterDir            = path.Join(ManifestsConfigurationDir, RHCSProviderDir, "clusters")
	ImportResourceDir     = path.Join(ManifestsConfigurationDir, RHCSProviderDir, "resource-import")
	IDPsDir               = path.Join(ManifestsConfigurationDir, RHCSProviderDir, "idps")
	MachinePoolDir        = path.Join(ManifestsConfigurationDir, RHCSProviderDir, "machine-pools")
	DNSDir                = path.Join(ManifestsConfigurationDir, RHCSProviderDir, "dns")
	RhcsInfoDir           = path.Join(ManifestsConfigurationDir, RHCSProviderDir, "rhcs-info")
	DefaultMachinePoolDir = path.Join(ManifestsConfigurationDir, RHCSProviderDir, "default-machine-pool")
	KubeletConfigDir      = path.Join(ManifestsConfigurationDir, RHCSProviderDir, "kubelet-config")
)

Dirs of rhcs provider

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 GateWayURL, OCMENV = gatewayURL()
View Source
var ManifestsConfigurationDir = initManifestsDir()
View Source
var RHCS = new(RHCSconfig)

Functions

func GetAccountRoleDefaultManifestDir added in v1.6.0

func GetAccountRoleDefaultManifestDir(clusterType ClusterType) string

func GetAddAccountRoleDefaultManifestDir added in v1.6.0

func GetAddAccountRoleDefaultManifestDir(clusterType ClusterType) string

func GetClusterManifestsDir added in v1.6.0

func GetClusterManifestsDir(clusterType ClusterType) string

func GetEnvWithDefault added in v1.4.0

func GetEnvWithDefault(key string, defaultValue string) string

func GetKubeConfigDir added in v1.5.0

func GetKubeConfigDir() string

func GetOIDCProviderOperatorRolesDefaultManifestDir added in v1.6.0

func GetOIDCProviderOperatorRolesDefaultManifestDir(clusterType ClusterType) string

func GetRHCSOutputDir added in v1.5.0

func GetRHCSOutputDir() string

func GrantClusterManifestDir added in v1.3.0

func GrantClusterManifestDir(manifestDir string) string

Supports abs and relatives

func GrantTFstateFile added in v1.5.1

func GrantTFstateFile(manifestDir string) string

func GrantTFvarsFile added in v1.5.0

func GrantTFvarsFile(manifestDir string) string

Types

type ClusterType added in v1.6.0

type ClusterType struct {
	Name string
	HCP  bool
}

func FindClusterType added in v1.6.0

func FindClusterType(clusterTypeName string) ClusterType

func (*ClusterType) String added in v1.6.0

func (ct *ClusterType) String() string

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

Jump to

Keyboard shortcuts

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