Documentation
¶
Index ¶
Constants ¶
const ( // Kubernetes distributions DistroK8s = "k8s" DistroOcp = "ocp" // ClusterSet DefaultClusterSetName = "default" )
Variables ¶
var K8sNamespaces = Namespaces{
RamenHubNamespace: "ramen-system",
RamenDRClusterNamespace: "ramen-system",
RamenOpsNamespace: "ramen-ops",
ArgocdNamespace: "argocd",
}
Default namespace mappings for Kubernetes (k8s) clusters.
var OcpNamespaces = Namespaces{
RamenHubNamespace: "openshift-operators",
RamenDRClusterNamespace: "openshift-dr-system",
RamenOpsNamespace: "openshift-dr-ops",
ArgocdNamespace: "openshift-gitops",
}
Default namespace mappings for OpenShift (ocp) clusters.
Functions ¶
func DeployersMap ¶
DeployersMap returns a mapping from Deployer.Name to Deployer.
func PVCSpecsMap ¶
PVCSpecMap returns a mapping from PVCSpec.Name to PVCSpec.
Types ¶
type Channel ¶
Channel defines the name and namespace for the channel CR. This is not user-configurable and always uses default values.
type Config ¶
type Config struct {
// User configurable values.
Clusters map[string]Cluster `json:"clusters"`
ClusterSet string `json:"clusterSet"`
Distro string `json:"distro"`
Repo Repo `json:"repo"`
DRPolicy string `json:"drPolicy"`
NamespacePrefix string `json:"namespacePrefix"`
PVCSpecs []PVCSpec `json:"pvcSpecs"`
Deployers []Deployer `json:"deployers"`
Tests []Test `json:"tests"`
// Generated values
Channel Channel `json:"channel"`
Namespaces Namespaces `json:"namespaces"`
}
Config keeps configuration for e2e tests.
type Deployer ¶
type Deployer struct {
// Name of the deployer instance. Refer to this name in tests.
Name string `json:"name"`
// Type specifies the type of deployer.
// Available types: appset, subscr, and disapp.
Type string `json:"type"`
// Description is a human-readable description of the deployer.
Description string `json:"description"`
Recipe *Recipe `json:"recipe,omitempty"`
}
Deployer is a deployer configuration.
type Namespaces ¶
type Namespaces struct {
RamenHubNamespace string `json:"ramenHubNamespace"`
RamenDRClusterNamespace string `json:"ramenDRClusterNamespace"`
RamenOpsNamespace string `json:"ramenOpsNamespace"`
ArgocdNamespace string `json:"argocdNamespace"`
}
Namespaces are determined by distro and are not user-configurable.
type Recipe ¶
type Recipe struct {
// Type is the name of the recipe to use.
// If Type is "generate", a recipe is generated to match the workload.
// If Type is "vm", ramen internal recipe for the vm will be used.
Type string `json:"type"`
CheckHook bool `json:"checkHook,omitempty"`
ExecHook bool `json:"execHook,omitempty"`
}
type Repo ¶
Repo represents the user-configurable git repository settings. It includes the repository url and branch to be used for deploying workload.
type Test ¶
type Test struct {
// Name is an optional unique name for the test. If empty, ContextName()
// generates a name from the deployer, workload, and pvcSpec fields.
// Use an explicit name to create multiple tests with the same
// deployer, workload, and pvcSpec.
Name string `json:"name,omitempty"`
Workload string `json:"workload"`
Deployer string `json:"deployer"`
PVCSpec string `json:"pvcSpec"`
}
func (Test) ContextName ¶
ContextName returns the test context name. If Name is set, it is returned as-is. Otherwise, a name is generated from the deployer, workload, and pvcSpec.