constants

package
v1.6.5-prerelease.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 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"
	RHCSURL                   = "RHCS_URL"
	RhcsClusterProfileENV     = "CLUSTER_PROFILE"
	QEUsage                   = "QE_USAGE"
	ClusterTypeManifestDirEnv = "CLUSTER_ROSA_TYPE"
	MajorVersion              = "MAJOR_VERSION_ENV"
	RHCSVersion               = "RHCS_VERSION"
	RHCSSource                = "RHCS_SOURCE"
	// Set this to update the version for the terraform-redhat/rosa-classic/rhcs module
	ModuleVersion = "MODULE_VERSION"
	// Set this to update the source for the terraform-redhat/rosa-classic/rhcs module
	ModuleSource = "MODULE_SOURCE"
	// Set this to any value if `MODULE_SOURCE` refers to a local path, in which case `MODULE_VERSION` will be ignored
	ModuleSourceLocal        = "MODULE_SOURCE_LOCAL"
	WaitOperators            = "WAIT_OPERATORS"
	RHCS_CLUSTER_NAME        = "RHCS_CLUSTER_NAME"
	RHCS_CLUSTER_NAME_PREFIX = "RHCS_CLUSTER_NAME_PREFIX"
	RHCS_CLUSTER_NAME_SUFFIX = "RHCS_CLUSTER_NAME_SUFFIX"
	COMPUTE_MACHINE_TYPE     = "COMPUTE_MACHINE_TYPE"
)

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 (
	DefaultMachinePoolName = "worker"
	DefaultNodePoolName    = "workers"
)

Machine pool

View Source
const (
	DefaultEc2MetadataHttpTokens  = "optional"
	RequiredEc2MetadataHttpTokens = "required"
	OptionalEc2MetadataHttpTokens = "optional"
)

Ec2MetadataHttpTokens for hcp cluster

View Source
const (

	// MaxExpiration in unit of hour
	ClusterMaxExpiration = 168

	// MaxNodeNumber means max node number per cluster/machinepool
	ClusterMaxNodeNumber = 180

	// MaxNameLength means cluster name will be trimed when request certificate
	ClusterMaxNameLength = 15

	ClusterMaxIngressNumber = 2
)
View Source
const (
	VersionFastChannel      = "fast"
	VersionStableChannel    = "stable"
	VersionNightlyChannel   = "nightly"
	VersionCandidateChannel = "candidate"
)

version channel_groups

View Source
const (
	HTTPOK                  = 200
	HTTPNoContent           = 204
	HTTPNotFound            = 404
	HTTPInternalServerError = 500
)

HTTP response code

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 (
	ROSA_CLASSIC = ClusterType{Name: "rosa-classic"}
	ROSA_HCP     = ClusterType{Name: "rosa-hcp", HCP: true}
)
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 (
	DefaultAWSRegion = "us-east-2"
)
View Source
var RHCS = new(RHCSconfig)

Functions

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 GetRHCSOutputDir added in v1.5.0

func GetRHCSOutputDir() 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 GetHCPClusterTypes added in v1.6.3

func GetHCPClusterTypes() (types []ClusterType)

func (*ClusterType) String added in v1.6.0

func (ct *ClusterType) String() string

type IDPType added in v1.6.5

type IDPType string
const (
	IDPHTPassword IDPType = "htpasswd"
	IDPGitlab     IDPType = "gitlab"
	IDPGithub     IDPType = "github"
	IDPGoogle     IDPType = "google"
	IDPLDAP       IDPType = "ldap"
	IDPOpenID     IDPType = "openid"
	IDPMulti      IDPType = "multi-idp"
)

type RHCSconfig added in v1.4.0

type RHCSconfig struct {
	// Env is the OpenShift Cluster Management environment used to provision clusters.
	RHCSURL               string `env:"RHCS_URL" yaml:"rhcsURL,omitempty"`
	OCMEnv                string `env:"OCM_ENV" default:"staging" yaml:"ocmENV,omitempty"`
	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:"rhcsSource,omitempty"`
	RHCSVersion           string `env:"RHCS_VERSION" default:"staging" yaml:"rhcsVersion,omitempty"`
	RHCSClusterName       string `env:"RHCS_CLUSTER_NAME" yaml:"clusterName,omitempty"`
	RHCSClusterNamePrefix string `env:"RHCS_CLUSTER_NAME_PREFIX" yaml:"clusterNamePrefix,omitempty"`
	RHCSClusterNameSuffix string `env:"RHCS_CLUSTER_NAME_SUFFIX" yaml:"clusterNameSuffix,omitempty"`
	ClusterNameFile       string
	ComputeMachineType    string `env:"COMPUTE_MACHINE_TYPE" yaml:"computeMachineType,omitempty"`
}

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