config

package
v0.0.0-...-31caefe Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Overview

Package config provides the configuration for tests run as part of the osde2e suite.

Package config provides the configuration for tests run as part of the osde2e suite.

GCP config provides the gcp configuration for tests run as part of the osde2e suite.

Index

Constants

View Source
const (
	Success = 0
	Failure = 1
	Aborted = 130

	// KrknAIModeDiscover is the mode for discover mode
	KrknAIModeDiscover = "discover"

	// KrknAIModeRun is the mode for run mode
	KrknAIModeRun = "run"

	// KrknAIVerboseLevel is the verbosity level for krkn-ai output
	KrknAIVerboseLevel = "2"

	// Provider is what provider to use to create/delete clusters.
	// Env: PROVIDER
	Provider = "provider"

	// OcmConfig is the path for the ocm.json file.
	// Env: OCM_CONFIG
	OcmConfig = "ocmConfig"

	// JobName lets you name the current e2e job run
	// Env: JOB_NAME
	JobName = "jobName"

	// JobID is the ID designated by prow for this run
	// Env: BUILD_ID
	JobID = "jobID"

	// ProwJobId is the ID designated by prow for this run
	// Env: PROW_JOB_ID
	ProwJobId = "prowJobId"

	// JobType is the type of job according to prow for this run
	// Env: JOB_TYPE
	JobType = "jobType"

	// BaseJobURL is the root location for all job artifacts
	// For example, https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/logs/osde2e-prod-gcp-e2e-next/61/build-log.txt would be
	// https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/logs -- This is also our default
	// Env: BASE_JOB_URL
	BaseJobURL = "baseJobURL"

	// BaseProwURL is the root location of Prow
	// Env: BASE_PROW_URL
	BaseProwURL = "baseProwURL"

	// Artifacts is the artifacts location on prow. It is an alias for report dir.
	// Env: ARTIFACTS
	Artifacts = "artifacts"

	// ReportDir is the location JUnit XML results are written.
	// Env: REPORT_DIR
	ReportDir = "reportDir"

	// Suffix is used at the end of test names to identify them.
	// Env: SUFFIX
	Suffix = "suffix"

	// DryRun lets you run osde2e all the way up to the e2e tests then skips them.
	// Env: DRY_RUN
	DryRun = "dryRun"

	// SkipMustGather will skip the Must-Gather process upon completion of the tests.
	// Env: SKIP_MUST_GATHER
	SkipMustGather = "skipMustGather"

	// InstalledWorkloads is an internal variable used to track currently installed workloads in this test run.
	InstalledWorkloads = "installedWorkloads"

	// Phase is an internal variable used to track the current set of tests being run (install, upgrade).
	Phase = "phase"

	// Project is both the project and SA automatically created to house all objects created during an osde2e-run
	Project = "project"

	CanaryChance = "canaryChance"

	// DefaultNetworkProvider Default network provider for OSD
	// env: CLUSTER_NETWORK_PROVIDER
	DefaultNetworkProvider = "OVNKubernetes"

	// NonOSDe2eSecrets is an internal-only Viper Key.
	// End users should not be using this key, there may be unforeseen consequences.
	NonOSDe2eSecrets = "nonOSDe2eSecrets"

	// JobStartedAt tracks when the job began running.
	JobStartedAt = "JobStartedAt"

	// Hypershift enables the use of hypershift for cluster creation.
	Hypershift = "Hypershift"

	// SharedDir is the location where files to be used by other processes/programs are stored.
	// This is primarily used when running within Prow and using additional steps after osde2e finishes.
	SharedDir = "sharedDir"

	KonfluxTestOutputFile = "konfluxResultsPath"

	// SlackMessageLength TotalSlackMessageLength is about 10000 characters
	// Summary: 1500 Characters
	// Build file comment: 500 Characters
	// Other comments(s3, ec2, elasticIP, iam): 2000 * 4 = 8000
	SlackMessageLength int = 2000
)

Variables

View Source
var (
	// AWSAccountId is the AWS account (Env var: AWS_ACCOUNT_ID)
	AWSAccountId = "config.aws.account"

	// HCPBillingAccountId is the billing account for HCP (Env var: HCP_BILLING_ACCOUNT_ID). Defaults to given AWS account creds.
	HCPBillingAccountId = "config.aws.hcpBillingAccount"

	// AWSAccessKey is the AWS access key
	AWSAccessKey = "config.aws.accessKey"

	// AWSSecretAccessKey is the AWS secret access key
	AWSSecretAccessKey = "config.aws.secretAccessKey"

	// AWSSharedCredentials is the base64 encoded AWS credentials file content.
	// This is used to optimize AWS resource spending
	// by nuking each of the 2 accounts alternately.
	// Should contain two named profiles: "profile-a" and "profile-b"
	// If provided, supersedes AWS secret set in env.
	AWSSharedCredentials = "config.aws.sharedCredentials"

	// AWSCredentialsFile is the custom AWS credentials full file path including filename
	// This is where the provided credentials will be saved
	// AWS client uses this as a custom shared credentials file
	AWSCredentialsFile = "config.aws.sharedCredentialsFilePath"

	// AWSProfile is the AWS profile to use
	AWSProfile = "config.aws.profile"

	// AWSRegion is the AWS region to use
	AWSRegion = "config.aws.region"

	// AWSVPCSubnetIDs is comma-separated list of strings to specify the subnets for cluster provision
	AWSVPCSubnetIDs = "config.aws.vpcSubnetIDs"
)
View Source
var (
	// GCPCredsJSON GCP CCS Credential json
	// Env: GCP_CREDS_JSON
	GCPCredsJSON = "gcp.credsJSON"
	// GCPCredsType GCP creds json internals
	GCPCredsType               = "gcp.credsType"
	GCPProjectID               = "gcp.projectID"
	GCPPrivateKey              = "gcp.privateKey"
	GCPPrivateKeyID            = "gcp.privateKeyID"
	GCPClientEmail             = "gcp.clientEmail"
	GCPClientID                = "gcp.clientID"
	GCPAuthURI                 = "gcp.authURI"
	GCPTokenURI                = "gcp.tokenURI"
	GCPAuthProviderX509CertURL = "gcp.authProviderX509CertURL"
	GCPClientX509CertURL       = "gcp.clientX509CertURL"
)
View Source
var Addons = struct {
	// IDsAtCreation is a comma separated list of IDs to create at cluster creation time.
	// Env: ADDON_IDS_AT_CREATION
	IDsAtCreation string

	// IDs is a comma separated list of IDs to install after a cluster is created.
	// Env: ADDON_IDS
	IDs string

	// Parameters is a nested json object. Top-level keys should be addon
	// IDs provided in the IDs field. The values should be objects with
	// string key-value pairs of parameters to provide to the addon with
	// the associated top-level ID.
	// An example:
	// {"AddonA": {"paramName":"paramValue"}, "AddonB": {"paramName": "paramValue"}}
	// Env: ADDON_PARAMETERS
	Parameters string

	// SkipAddonList is a boolean to indicate whether the listing of addons has to be disabled or not.
	// Env: SKIP_ADDON_LIST
	SkipAddonList string
}{
	IDsAtCreation: "addons.idsAtCreation",
	IDs:           "addons.ids",
	SkipAddonList: "addons.skipAddonlist",
	Parameters:    "addons.parameters",
}

Addons config keys.

View Source
var Cad = struct {
	// Env: CAD_PAGERDUTY_ROUTING_KEY
	CADPagerDutyRoutingKey string
}{
	CADPagerDutyRoutingKey: "cad.pagerDutyRoutingKey",
}

Cad Configuration Anomaly Detection config

View Source
var CloudProvider = struct {
	// CloudProviderID is the cloud provider ID to use to provision the cluster.
	// Env: CLOUD_PROVIDER_ID
	CloudProviderID string

	// Region is the cloud provider region to use to provision the cluster.
	// Env: CLOUD_PROVIDER_REGION
	Region string
}{
	CloudProviderID: "cloudProvider.providerId",
	Region:          "cloudProvider.region",
}

CloudProvider config keys.

View Source
var Cluster = struct {
	// Reserve  creates a reserve of testing-ready cluster and skips all tests.
	// Env: RESERVE
	// Arg --reserve
	Reserve string

	// MultiAZ deploys a cluster across multiple availability zones.
	// Env: MULTI_AZ
	MultiAZ string

	// Channel dictates which install/upgrade edges will be available to the cluster
	// Env: CHANNEL
	Channel string

	// SkipDestroyCluster indicates whether cluster should be destroyed after test completion.
	// Env: SKIP_DESTROY_CLUSTER
	SkipDestroyCluster string

	// ExpiryInMinutes is how long before a cluster expires and is deleted by OSD.
	// Env: CLUSTER_EXPIRY_IN_MINUTES
	ExpiryInMinutes string

	// AfterTestWait is how long to keep a cluster around after tests have run.
	// Env: AFTER_TEST_CLUSTER_WAIT
	AfterTestWait string

	// InstallTimeout is how long to wait before failing a cluster launch.
	// Env: CLUSTER_UP_TIMEOUT
	InstallTimeout string

	// ReleaseImageLatest is used when we're testing versions not-yet-accepted from the release controller.
	ReleaseImageLatest string

	// UseLatestVersionForInstall will select the latest cluster image set available for a fresh install.
	// Env: USE_LATEST_VERSION_FOR_INSTALL
	UseLatestVersionForInstall string

	// UseMiddleClusterImageSetForInstall will select the cluster image set that is in the middle of the list of ordered cluster versions known to OCM.
	// Env: USE_MIDDLE_CLUSTER_IMAGE_SET_FOR_INSTALL
	UseMiddleClusterImageSetForInstall string

	// UseOldestClusterImageSetForInstall will select the cluster image set that is in the end of the list of ordered cluster versions known to OCM.
	// Env: USE_OLDEST_CLUSTER_IMAGE_SET_FOR_INSTALL
	UseOldestClusterImageSetForInstall string

	// DeltaReleaseFromDefault will select the cluster image set that is the given number of releases from the current default in either direction.
	// Env: DELTA_RELEASE_FROM_DEFAULT
	DeltaReleaseFromDefault string

	// NextReleaseAfterProdDefault will select the cluster image set that the given number of releases away from the the production default.
	// Env: NEXT_RELEASE_AFTER_PROD_DEFAULT
	NextReleaseAfterProdDefault string

	// LatestYReleaseAfterProdDefault will select the next minor version CIS for an environment given the production default
	LatestYReleaseAfterProdDefault string

	// LatestZReleaseAfterProdDefault will select the next patch version CIS for an environment given the production default
	LatestZReleaseAfterProdDefault string

	// InstallSpecificNightly will select a nightly using a specific nightly given an "X.Y" formatted string
	InstallSpecificNightly string

	// InstallLatestXY will select the latest version available given an "X.Y" formatted string
	InstallLatestXY string

	// InstallLatestYFromDelta will select the latest Y from the delta (+/-) given
	InstallLatestYFromDelta string

	// InstallLatestZFromDelta will select the latest Z from the delta (+/-) given
	InstallLatestZFromDelta string

	// CleanCheckRuns lets us set the number of osd-verify checks we want to run before deeming a cluster "healthy"
	// Env: CLEAN_CHECK_RUNS
	CleanCheckRuns string

	// ID identifies the cluster. If set at start, an existing cluster is tested.
	// Env: CLUSTER_ID
	ID string

	// Name is the name of the cluster being created.
	// Env: CLUSTER_NAME
	Name string

	// Version is the version of the cluster being deployed.
	// Env: CLUSTER_VERSION
	Version string

	// EnoughVersionsForOldestOrMiddleTest is true if there were enough versions for an older/middle test.
	EnoughVersionsForOldestOrMiddleTest string

	// PreviousVersionFromDefaultFound is true if a previous version from default was found.
	PreviousVersionFromDefaultFound string

	// ProvisionShardID is the shard ID that is set to provision a shard for the cluster.
	ProvisionShardID string

	// NumWorkerNodes overrides the flavour's number of worker nodes specified
	NumWorkerNodes string

	// NetworkProvider chooses the network driver powering the cluster.
	NetworkProvider string

	// Specify a key in the pre-defined imageContentSource array in the ocmprovider
	// Blank will default to a randomized option
	ImageContentSource string

	// InstallConfig overrides merges on top of the installer's default OCP installer config
	// Blank will do nothing
	// Cannot specify imageContentSources within this config
	InstallConfig string

	// HibernateAfterUse will tell the provider to attempt to hibernate the cluster after
	// the test run, assuming the provider supports hibernation
	HibernateAfterUse string

	// UseClusterReserve will allow the test run to use an existing cluster if available
	// ENV: USE_CLUSTER_RESERVE, will also accept obsoleted var name: USE_EXISTING_CLUSTER
	// Default: True
	UseClusterReserve string

	// Passing tracks the internal status of the tests: Pass or Fail
	Passing string

	// ClaimedFromReserve tracks whether this cluster's test run used a new or recycled cluster
	ClaimedFromReserve string

	// InspectNamespaces is a comma-delimited list of namespaces to perform an inspect on during test cleanup
	InspectNamespaces string

	// UseProxyForInstall will attempt to use a cluster-wide proxy for cluster installation, provided that a cluster-wide proxy config is supplied
	UseProxyForInstall string

	// EnableFips enables the FIPS test suite
	// Env: ENABLE_FIPS
	EnableFips string

	// FedRamp will enable OSDe2e to run in a FedRamp environment
	// Env: FEDRAMP
	FedRamp string
}{
	MultiAZ:                             "cluster.multiAZ",
	Channel:                             "cluster.channel",
	SkipDestroyCluster:                  "cluster.skipDestroyCluster",
	Reserve:                             "cluster.reserve",
	ExpiryInMinutes:                     "cluster.expiryInMinutes",
	AfterTestWait:                       "cluster.afterTestWait",
	InstallTimeout:                      "cluster.installTimeout",
	ReleaseImageLatest:                  "cluster.releaseImageLatest",
	UseProxyForInstall:                  "cluster.useProxyForInstall",
	UseLatestVersionForInstall:          "cluster.useLatestVersionForInstall",
	UseMiddleClusterImageSetForInstall:  "cluster.useMiddleClusterVersionForInstall",
	UseOldestClusterImageSetForInstall:  "cluster.useOldestClusterVersionForInstall",
	DeltaReleaseFromDefault:             "cluster.deltaReleaseFromDefault",
	NextReleaseAfterProdDefault:         "cluster.nextReleaseAfterProdDefault",
	LatestYReleaseAfterProdDefault:      "cluster.latestYReleaseAfterProdDefault",
	LatestZReleaseAfterProdDefault:      "cluster.latestZReleaseAfterProdDefault",
	InstallSpecificNightly:              "cluster.installLatestNightly",
	InstallLatestXY:                     "cluster.installLatestXY",
	InstallLatestYFromDelta:             "cluster.installLatestYFromDelta",
	InstallLatestZFromDelta:             "cluster.installLatestZFromDelta",
	CleanCheckRuns:                      "cluster.cleanCheckRuns",
	ID:                                  "cluster.id",
	Name:                                "cluster.name",
	Version:                             "cluster.version",
	EnoughVersionsForOldestOrMiddleTest: "cluster.enoughVersionForOldestOrMiddleTest",
	PreviousVersionFromDefaultFound:     "cluster.previousVersionFromDefaultFound",
	ProvisionShardID:                    "cluster.provisionshardID",
	NumWorkerNodes:                      "cluster.numWorkerNodes",
	NetworkProvider:                     "cluster.networkProvider",
	ImageContentSource:                  "cluster.imageContentSource",
	InstallConfig:                       "cluster.installConfig",
	UseClusterReserve:                   "cluster.useClusterReserve",
	Passing:                             "cluster.passing",
	ClaimedFromReserve:                  "cluster.claimedFromReserve",
	InspectNamespaces:                   "cluster.inspectNamespaces",
	EnableFips:                          "cluster.enableFips",
	FedRamp:                             "cluster.fedRamp",
}

Cluster config keys.

View Source
var KrknAI = struct {
	// Namespace is the target namespace for chaos testing
	// Env: KRKN_NAMESPACE
	Namespace string

	// PodLabel is the label selector for targeting pods
	// Env: KRKN_POD_LABEL
	PodLabel string

	// NodeLabel is the label selector for targeting nodes
	// Env: KRKN_NODE_LABEL
	NodeLabel string

	// SkipPodName is a pattern to skip specific pods
	// Env: KRKN_SKIP_POD_NAME
	SkipPodName string

	// FitnessQuery is the Prometheus query for the fitness function
	// Env: KRKN_FITNESS_QUERY
	FitnessQuery string

	// Scenarios is a comma-separated list of scenarios to enable
	// Env: KRKN_SCENARIOS
	Scenarios string

	// Generations is the number of generations for the genetic algorithm
	// Env: KRKN_GENERATIONS
	Generations string

	// Population is the population size per generation for the genetic algorithm
	// Env: KRKN_POPULATION
	Population string

	// HealthCheck is a comma-separated list of health check endpoints in name=url format
	// Env: KRKN_HEALTH_CHECK
	HealthCheck string

	// TopScenariosCount is the number of top scenarios to include in analysis
	// Env: KRKN_TOP_SCENARIOS_COUNT
	TopScenariosCount string
}{
	Namespace:         "krknAI.namespace",
	PodLabel:          "krknAI.podLabel",
	NodeLabel:         "krknAI.nodeLabel",
	SkipPodName:       "krknAI.skipPodName",
	FitnessQuery:      "krknAI.fitnessQuery",
	Scenarios:         "krknAI.scenarios",
	Generations:       "krknAI.generations",
	Population:        "krknAI.population",
	HealthCheck:       "krknAI.healthCheck",
	TopScenariosCount: "krknAI.topScenariosCount",
}

KrknAI config keys for Kraken AI chaos testing.

View Source
var Kubeconfig = struct {
	// Path is the filepath of an existing Kubeconfig
	// Env: TEST_KUBECONFIG
	Path string

	// Contents is the actual contents of a valid Kubeconfig
	Contents string
}{
	Path:     "kubeconfig.path",
	Contents: "kubeconfig.contents",
}

Kubeconfig configBUILD_NUMBER keys.

View Source
var LogAnalysis = struct {
	// EnableAnalysis enables log analysis powered failure analysis
	EnableAnalysis string

	// APIKey is the API key for the LLM service (e.g., Gemini)
	// Env: GEMINI_API_KEY
	APIKey string

	// Model specifies which LLM model to use
	// Env: LLM_MODEL
	Model string

	// SlackWebhook is the Slack webhook URL for log analysis notifications
	// Env: LOG_ANALYSIS_SLACK_WEBHOOK
	SlackWebhook string

	// SlackChannel is the default Slack channel for OSDE2E notifications
	// Env: LOG_ANALYSIS_SLACK_CHANNEL
	SlackChannel string
}{
	EnableAnalysis: "logAnalysis.enableAnalysis",
	APIKey:         "logAnalysis.apiKey",
	Model:          "logAnalysis.model",
	SlackWebhook:   "logAnalysis.slackWebhook",
	SlackChannel:   "logAnalysis.slackChannel",
}
View Source
var Proxy = struct {
	// The HTTPS Proxy address to use for proxy tests,
	HttpsProxy string
	// The HTTP Proxy address to use for proxy tests.
	HttpProxy string
	// The User CA Bundle to use for proxy tests.
	UserCABundle string
}{
	HttpsProxy:   "proxy.https_proxy",
	HttpProxy:    "proxy.http_proxy",
	UserCABundle: "proxy.user_ca_bundle",
}

Proxy config keys

View Source
var Tests = struct {
	// SuiteTimeout is how long (in hours) to wait for the entire suite to finish before timing out
	// Env: SUITE_TIMEOUT
	SuiteTimeout string

	// AdHocTestContainerTimeout is how long (in seconds) to wait for the individual adHocTestImage to finish before timing out. If unspecified, POLLING_TIMEOUT is used.
	// Env: AD_HOC_TEST_CONTAINER_TIMEOUT
	AdHocTestContainerTimeout string

	// AdHocTestImages is a list of test adHocTestImages to run (DEPRECATED - use TestSuites).
	// Env: AD_HOC_TEST_IMAGES
	AdHocTestImages string

	// TestSuites is a list of test suites to run with optional slack channels.
	// Env: TEST_SUITES_YAML
	TestSuites string

	// PollingTimeout is how long (in seconds) to wait for an object to be created before failing the test.
	// Env: POLLING_TIMEOUT
	PollingTimeout string

	// TestUser is the OpenShift user that the tests will run as
	// If "%s" is detected in the TestUser string, it will evaluate that as the project namespace
	// Example: "system:serviceaccount:%s:dedicated-admin"
	// Evaluated: "system:serviceaccount:osde2e-abc123:dedicated-admin"
	// Env: TEST_USER
	TestUser string

	// SlackChannel is the name of a slack channel in the Internal Red hat slack workspace that will
	// receive an alert if the tests fail.
	// Env: SLACK_CHANNEL
	SlackChannel string

	// Slack Webhook is the URL to osde2e owner channel for Cloud Account Cleanup Report workflow to send notifications.
	// Env: SLACK_WEBHOOK
	SlackWebhook string

	// SlackNotify is a boolean that determines if Slack notifications should be sent.
	// Env: SLACK_NOTIFY
	EnableSlackNotify string

	// GinkgoSkip is a regex passed to Ginkgo that skips any test suites matching the regex. ex. "Operator"
	// Env: GINKGO_SKIP
	GinkgoSkip string

	// GinkgoFocus is a regex passed to Ginkgo that focus on any test suites matching the regex. ex. "Operator"
	// Env: GINKGO_FOCUS
	GinkgoFocus string

	// GinkgoLogLevel controls the logging level used by ginkgo when providing test output
	// Env: GINKGO_LOG_LEVEL
	GinkgoLogLevel string

	// GinkgoLabelFilter controls which test suites or tests to run
	// Env: GINKGO_LABEL_FILTER
	GinkgoLabelFilter string

	// TestsToRun is a list of files which should be executed as part of a test suite
	// Env: TESTS_TO_RUN
	TestsToRun string

	// SuppressSkipNotifications suppresses the notifications of skipped tests
	// Env: SUPPRESS_SKIP_NOTIFICATIONS
	SuppressSkipNotifications string

	// CleanRuns is the number of times the test-version is run before skipping.
	// Env: CLEAN_RUNS
	CleanRuns string

	// OperatorSkip is a comma-delimited list of operator names to ignore health checks from. ex. "insights,telemetry"
	// Env: OPERATOR_SKIP
	OperatorSkip string

	// SkipClusterHealthChecks skips the cluster health checks. Useful when developing against a running cluster.
	// Env: SKIP_CLUSTER_HEALTH_CHECKS
	SkipClusterHealthChecks string

	// ClusterHealthChecksTimeout defines the duration for which the test will
	// wait for the cluster to indicate it is healthy before cancelling the test
	// run. This value should be formatted for use with time.ParseDuration.
	// Env: CLUSTER_HEALTH_CHECKS_TIMEOUT
	ClusterHealthChecksTimeout string

	// LogBucket is the s3 bucket that log file/s will be uploaded to.
	// Env: LOG_BUCKET
	LogBucket string

	// ServiceAccount defines what user the tests should run as. By default, osde2e uses system:admin
	// Env: SERVICE_ACCOUNT
	ServiceAccount string

	// OnlyHealthcheckNodes focuses pre-install validation only on the nodes
	// Env: ONLY_HEALTH_CHECK_NODES
	OnlyHealthCheckNodes string
}{
	AdHocTestImages:            "tests.adHocTestImages",
	TestSuites:                 "tests.testSuites",
	SuiteTimeout:               "tests.suiteTimeout",
	AdHocTestContainerTimeout:  "tests.adHocTestContainerTimeout",
	PollingTimeout:             "tests.pollingTimeout",
	ServiceAccount:             "tests.serviceAccount",
	SlackChannel:               "tests.slackChannel",
	SlackWebhook:               "tests.slackWebhook",
	EnableSlackNotify:          "tests.enableSlackNotify",
	GinkgoSkip:                 "tests.ginkgoSkip",
	GinkgoFocus:                "tests.focus",
	GinkgoLogLevel:             "tests.ginkgoLogLevel",
	GinkgoLabelFilter:          "tests.ginkgoLabelFilter",
	TestsToRun:                 "tests.testsToRun",
	SuppressSkipNotifications:  "tests.suppressSkipNotifications",
	CleanRuns:                  "tests.cleanRuns",
	OperatorSkip:               "tests.operatorSkip",
	SkipClusterHealthChecks:    "tests.skipClusterHealthChecks",
	LogBucket:                  "tests.logBucket",
	ClusterHealthChecksTimeout: "tests.clusterHealthChecksTimeout",
	OnlyHealthCheckNodes:       "tests.onlyHealthCheckNodes",
}

Tests config keys

View Source
var Upgrade = struct {
	// UpgradeToLatest will look for the newest-possible version and select that
	// Env: UPGRADE_TO_LATEST
	UpgradeToLatest string

	// UpgradeToLatestY will look for the latest Y version for the cluster and select that
	// Env: UPGRADE_TO_LATEST_Y
	UpgradeToLatestY string

	// UpgradeToLatestZ will look for the latest Z version for the cluster and select that
	// Env: UPGRADE_TO_LATEST_Z
	UpgradeToLatestZ string

	// ReleaseName is the name of the release in a release stream.
	// Env: UPGRADE_RELEASE_NAME
	ReleaseName string

	// Image is the release image a cluster is upgraded to. If set, it overrides the release stream and upgrades.
	// Env: UPGRADE_IMAGE
	Image string

	// Type of upgrader to use when upgrading (OSD or ARO)
	// ENV: UPGRADE_TYPE
	Type string

	// UpgradeVersionEqualToInstallVersion is true if the install version and upgrade versions are the same.
	UpgradeVersionEqualToInstallVersion string

	// Create disruptive Pod Disruption Budget workloads to test the Managed Upgrade Operator's ability to handle them.
	ManagedUpgradeTestPodDisruptionBudgets string

	// Create disruptive Node Drain workload to test the Managed Upgrade Operator's ability to handle them.
	ManagedUpgradeTestNodeDrain string

	// Reschedule the upgrade via provider before commence
	ManagedUpgradeRescheduled string

	// Toggle on/off running pre upgrade tests
	RunPreUpgradeTests string

	// Toggle on/off running post upgrade tests
	RunPostUpgradeTests string
}{
	UpgradeToLatest:                        "upgrade.toLatest",
	UpgradeToLatestZ:                       "upgrade.ToLatestZ",
	UpgradeToLatestY:                       "upgrade.ToLatestY",
	ReleaseName:                            "upgrade.releaseName",
	Image:                                  "upgrade.image",
	Type:                                   "upgrade.type",
	UpgradeVersionEqualToInstallVersion:    "upgrade.upgradeVersionEqualToInstallVersion",
	ManagedUpgradeTestPodDisruptionBudgets: "upgrade.managedUpgradeTestPodDisruptionBudgets",
	ManagedUpgradeTestNodeDrain:            "upgrade.managedUpgradeTestNodeDrain",
	ManagedUpgradeRescheduled:              "upgrade.managedUpgradeRescheduled",
	RunPreUpgradeTests:                     "upgrade.runPreUpgradeTests",
	RunPostUpgradeTests:                    "upgrade.runPostUpgradeTests",
}

Upgrade config keys.

Functions

func GetAdHocTestImagesAsString

func GetAdHocTestImagesAsString() string

GetAdHocTestImagesAsString returns only the images from the test suites configuration as a comma-separated string

func InitAWSViper

func InitAWSViper() error

func InitGCPViper

func InitGCPViper()

func InitOSDe2eViper

func InitOSDe2eViper()

func LoadClusterId

func LoadClusterId() error

LoadClusterId given a path to a shared directoru, if a cluster id is written to it, will attempt to load it into the Viper config. No error if shared cluster-id file doesn't exist.

func LoadKubeconfig

func LoadKubeconfig() error

LoadKubeconfig will, given a path to a kubeconfig, attempt to load it into the Viper config.

func PostProcess

func PostProcess()

PostProcess is a variety of post-processing commands that is intended to be run after a config is loaded.

func RegisterSecret

func RegisterSecret(key string, secretFileName string)

RegisterSecret will register the secret filename that will be used for the corresponding Viper string.

Types

type Secret

type Secret struct {
	FileLocation string
	Key          string
}

func GetAllSecrets

func GetAllSecrets() []Secret

GetAllSecrets will return Viper config keys and their corresponding secret filenames.

type TestSuite

type TestSuite struct {
	Image        string `yaml:"image" json:"image" mapstructure:"image"`
	SlackChannel string `yaml:"slackChannel,omitempty" json:"slackChannel,omitempty" mapstructure:"slackChannel,omitempty"`
}

TestSuite represents a test image with optional slack channel

func GetTestSuites

func GetTestSuites() ([]TestSuite, error)

GetTestSuites returns test suites, supporting both new TestSuites and legacy AdHocTestImages formats. Checks TestSuites first, then falls back to legacy AdHocTestImages string slice.

Jump to

Keyboard shortcuts

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