Documentation ¶
Index ¶
- Constants
- Variables
- func AddNamespaceAnnotationForVolSync(client client.Client, namespace string) error
- func CreateNamespace(client client.Client, namespace string) error
- func CreateNamespaceAndAddAnnotation(namespace string) error
- func DeleteNamespace(client client.Client, namespace string, log *zap.SugaredLogger) error
- func EnsureChannel() error
- func EnsureChannelDeleted() error
- func FindPod(k8sClient client.Client, namespace, labelSelector, podIdentifier string) (*v1.Pod, error)
- func GetChannelName() string
- func GetChannelNamespace() string
- func GetDRPolicy(client client.Client, name string) (*ramen.DRPolicy, error)
- func GetGitURL() string
- func GetRamenNameSpace(k8sClient client.Client) (string, error)
- func IsOpenShiftCluster(k8sClient client.Client) (bool, error)
- func ReadConfig(log *zap.SugaredLogger, configFile string) error
- func ValidateRamenDRClusterOperator(k8sClient client.Client, clusterName string) error
- func ValidateRamenHubOperator(k8sClient client.Client) error
- type Cluster
- type Context
- type PVCSpec
- type TestConfig
Constants ¶
View Source
const ( RamenSystemNamespace = "ramen-system" Timeout = 600 * time.Second RetryInterval = 5 * time.Second ArgocdNamespace = "argocd" RamenOpsNamespace = "ramen-ops" )
View Source
const DefaultDRPolicyName = "dr-policy"
Variables ¶
View Source
var ConfigFile string
Functions ¶
func CreateNamespaceAndAddAnnotation ¶
Problem: currently we must manually add an annotation to application’s namespace to make volsync work. See this link https://volsync.readthedocs.io/en/stable/usage/permissionmodel.html#controlling-mover-permissions Workaround: create ns in both drclusters and add annotation
func DeleteNamespace ¶
func EnsureChannel ¶
func EnsureChannel() error
func EnsureChannelDeleted ¶
func EnsureChannelDeleted() error
func FindPod ¶
func FindPod(k8sClient client.Client, namespace, labelSelector, podIdentifier string) ( *v1.Pod, error, )
FindPod returns the first pod matching the label selector including the pod identifier in the namespace.
func GetChannelName ¶
func GetChannelName() string
func GetChannelNamespace ¶
func GetChannelNamespace() string
func GetDRPolicy ¶
nolint:unparam
func IsOpenShiftCluster ¶
IsOpenShiftCluster checks if the given Kubernetes cluster is an OpenShift cluster. It returns true if the cluster is OpenShift, false otherwise, along with any error encountered.
func ReadConfig ¶
func ReadConfig(log *zap.SugaredLogger, configFile string) error
Types ¶
type Cluster ¶
type Cluster struct {
Client ctrlClient.Client
}
type Context ¶
type Context struct { Log *zap.SugaredLogger Hub Cluster C1 Cluster C2 Cluster }
var Ctx *Context
func NewContext ¶
func NewContext(log *zap.SugaredLogger, configFile string) (*Context, error)
Click to show internal directories.
Click to hide internal directories.