Documentation
¶
Index ¶
- Constants
- Variables
- func By(format string, args ...interface{})
- func DumpEventsInNamespace(ctx context.Context, c kubernetes.Interface, namespace string)
- func DumpNamespace(ctx context.Context, restConfig *rest.Config, ...) error
- func DumpResource(ctx context.Context, restConfig *rest.Config, ...) error
- func Errorf(format string, args ...interface{})
- func Failf(format string, args ...interface{})
- func FieldManager(userAgent, namespace string) string
- func Infof(format string, args ...interface{})
- func Skipf(format string, args ...interface{})
- func WaitForObjectDeletion(ctx context.Context, dynamicClient dynamic.Interface, ...) error
- func WaitForServiceAccount(ctx context.Context, c corev1client.CoreV1Interface, namespace, name string) (*corev1.ServiceAccount, error)
- func WaitForServiceAccountTokenSecret(ctx context.Context, c corev1client.CoreV1Interface, namespace, name string) (*corev1.Secret, error)
- func Warnf(format string, args ...interface{})
- type AdminClient
- func (ac *AdminClient) AdminClientConfig() *restclient.Config
- func (ac *AdminClient) DiscoveryClient() *discovery.DiscoveryClient
- func (ac *AdminClient) DynamicAdminClient() dynamic.Interface
- func (ac *AdminClient) KubeAdminClient() *kubernetes.Clientset
- func (ac *AdminClient) PrometheusOperatorAdminClient() *promclient.Clientset
- func (ac *AdminClient) ScyllaAdminClient() *scyllaclientset.Clientset
- type AdminClientInterface
- type Cleaner
- type CleanupPolicyType
- type Client
- type ClientInterface
- type Cluster
- func (c *Cluster) AddCleaners(cleaners ...Cleaner)
- func (c *Cluster) AddCollectors(collectors ...Collector)
- func (c *Cluster) Cleanup(ctx context.Context)
- func (c *Cluster) Collect(ctx context.Context, ginkgoNamespace string)
- func (c *Cluster) CreateUserNamespace(ctx context.Context) (*corev1.Namespace, Client)
- func (c *Cluster) DefaultNamespaceIfAny() (*corev1.Namespace, Client, bool)
- func (c *Cluster) GetArtifactsDir() string
- func (c *Cluster) Name() string
- type ClusterInterface
- type ClusterObjectStorageSettings
- type Collector
- type ExposeOptions
- type Framework
- func (f *Framework) AddCleaners(cleaners ...Cleaner)
- func (f *Framework) AddCollectors(collectors ...Collector)
- func (f *Framework) Cluster() ClusterInterface
- func (f *Framework) CommonLabels() map[string]string
- func (f *Framework) CreateUserNamespace(ctx context.Context) (*corev1.Namespace, Client)
- func (f *Framework) DefaultNamespaceIfAny() (*corev1.Namespace, Client, bool)
- func (f *Framework) FieldManager() string
- func (f *Framework) GetClusterObjectStorageSettings() (ClusterObjectStorageSettings, bool)
- func (f *Framework) GetDefaultArtifactsDir() string
- func (f *Framework) GetDefaultScyllaCluster() *scyllav1.ScyllaCluster
- func (f *Framework) GetDefaultScyllaDBCluster(rkcMap map[string]*scyllav1alpha1.RemoteKubernetesCluster) *scyllav1alpha1.ScyllaDBCluster
- func (f *Framework) GetDefaultScyllaDBDatacenter() *scyllav1alpha1.ScyllaDBDatacenter
- func (f *Framework) GetDefaultZonalScyllaClusterWithThreeRacks() *scyllav1.ScyllaCluster
- func (f *Framework) GetIngressAddress(hostname string) string
- func (f *Framework) GetObjectStorageSettingsForWorkerCluster(workerName string) ClusterObjectStorageSettings
- func (f *Framework) Name() string
- func (f *Framework) Namespace() string
- func (f *Framework) WorkerClusters() map[string]ClusterInterface
- type FullClient
- type FullClientInterface
- type GenericClientInterface
- type IngressController
- type NamespaceCleanerCollector
- type NotFoundTolerantNamespaceCollector
- type ObjectStorageType
- type RestoreStrategy
- type RestoringCleaner
- func (rc *RestoringCleaner) Cleanup(ctx context.Context)
- func (rc *RestoringCleaner) Collect(ctx context.Context, clusterArtifactsDir string, ginkgoNamespace string)
- func (rc *RestoringCleaner) CollectToLog(ctx context.Context)
- func (rc *RestoringCleaner) DeleteObject(ctx context.Context, ignoreNotFound bool)
- type ScyllaClusterOptions
- type TestContextType
Constants ¶
const ( ServiceAccountName = "e2e-user" ServiceAccountTokenSecretName = "e2e-user-token" )
const ( SerialLabelName = "Serial" MultiDatacenterLabelName = "MultiDatacenter" RequiresObjectStorageLabelName = "RequiresObjectStorage" NotSupportedOnOpenShiftLabelName = "NotSupportedOnOpenShift" SupportedOnlyOnOpenShiftLabelName = "SupportedOnlyOnOpenShift" )
Variables ¶
var ( Serial = []interface{}{ g.Serial, g.Label(SerialLabelName), } MultiDatacenter = g.Label(MultiDatacenterLabelName) RequiresObjectStorage = g.Label(RequiresObjectStorageLabelName) NotSupportedOnOpenShift = g.Label(NotSupportedOnOpenShiftLabelName) SupportedOnlyOnOpenShift = g.Label(SupportedOnlyOnOpenShiftLabelName) )
Functions ¶
func DumpEventsInNamespace ¶
func DumpEventsInNamespace(ctx context.Context, c kubernetes.Interface, namespace string)
func DumpNamespace ¶ added in v1.3.0
func DumpNamespace(ctx context.Context, restConfig *rest.Config, discoveryClient discovery.DiscoveryInterface, dynamicClient dynamic.Interface, corev1Client corev1client.CoreV1Interface, artifactsDir string, name string) error
func DumpResource ¶ added in v1.3.0
func DumpResource(ctx context.Context, restConfig *rest.Config, discoveryClient discovery.DiscoveryInterface, dynamicClient dynamic.Interface, corev1Client corev1client.CoreV1Interface, artifactsDir string, resourceInfo *collect.ResourceInfo, namespace string, name string) error
func FieldManager ¶ added in v1.13.0
func WaitForObjectDeletion ¶
func WaitForServiceAccount ¶
func WaitForServiceAccount(ctx context.Context, c corev1client.CoreV1Interface, namespace, name string) (*corev1.ServiceAccount, error)
func WaitForServiceAccountTokenSecret ¶ added in v1.9.0
func WaitForServiceAccountTokenSecret(ctx context.Context, c corev1client.CoreV1Interface, namespace, name string) (*corev1.Secret, error)
Types ¶
type AdminClient ¶ added in v1.13.0
type AdminClient struct {
Config *restclient.Config
}
func (*AdminClient) AdminClientConfig ¶ added in v1.13.0
func (ac *AdminClient) AdminClientConfig() *restclient.Config
func (*AdminClient) DiscoveryClient ¶ added in v1.13.0
func (ac *AdminClient) DiscoveryClient() *discovery.DiscoveryClient
func (*AdminClient) DynamicAdminClient ¶ added in v1.13.0
func (ac *AdminClient) DynamicAdminClient() dynamic.Interface
func (*AdminClient) KubeAdminClient ¶ added in v1.13.0
func (ac *AdminClient) KubeAdminClient() *kubernetes.Clientset
func (*AdminClient) PrometheusOperatorAdminClient ¶ added in v1.19.0
func (ac *AdminClient) PrometheusOperatorAdminClient() *promclient.Clientset
func (*AdminClient) ScyllaAdminClient ¶ added in v1.13.0
func (ac *AdminClient) ScyllaAdminClient() *scyllaclientset.Clientset
type AdminClientInterface ¶ added in v1.13.0
type AdminClientInterface interface {
GenericClientInterface
AdminClientConfig() *restclient.Config
KubeAdminClient() *kubernetes.Clientset
DynamicAdminClient() dynamic.Interface
ScyllaAdminClient() *scyllaclientset.Clientset
PrometheusOperatorAdminClient() *promclient.Clientset
}
type CleanupPolicyType ¶ added in v1.14.0
type CleanupPolicyType string
var ( CleanupPolicyAlways CleanupPolicyType = "Always" CleanupPolicyOnSuccess CleanupPolicyType = "OnSuccess" CleanupPolicyNever CleanupPolicyType = "Never" )
type Client ¶ added in v1.13.0
type Client struct {
Config *restclient.Config
}
func (*Client) ClientConfig ¶ added in v1.13.0
func (c *Client) ClientConfig() *restclient.Config
func (*Client) DiscoveryClient ¶ added in v1.13.0
func (c *Client) DiscoveryClient() *discovery.DiscoveryClient
func (*Client) DynamicClient ¶ added in v1.13.0
func (*Client) KubeClient ¶ added in v1.13.0
func (c *Client) KubeClient() *kubernetes.Clientset
func (*Client) ScyllaClient ¶ added in v1.13.0
func (c *Client) ScyllaClient() *scyllaclientset.Clientset
type ClientInterface ¶ added in v1.13.0
type ClientInterface interface {
GenericClientInterface
ClientConfig() *restclient.Config
KubeClient() *kubernetes.Clientset
DynamicClient() dynamic.Interface
ScyllaClient() *scyllaclientset.Clientset
}
type Cluster ¶ added in v1.13.0
type Cluster struct {
AdminClient
// contains filtered or unexported fields
}
func NewCluster ¶ added in v1.13.0
func NewCluster(name string, artifactsDir string, restConfig *restclient.Config, createNamespace createNamespaceFunc) *Cluster
func (*Cluster) AddCleaners ¶ added in v1.14.0
func (*Cluster) AddCollectors ¶ added in v1.17.0
func (*Cluster) CreateUserNamespace ¶ added in v1.13.0
func (*Cluster) DefaultNamespaceIfAny ¶ added in v1.13.0
func (*Cluster) GetArtifactsDir ¶ added in v1.14.0
type ClusterInterface ¶ added in v1.13.0
type ClusterObjectStorageSettings ¶ added in v1.18.0
type ClusterObjectStorageSettings struct {
// contains filtered or unexported fields
}
ClusterObjectStorageSettings holds the object storage settings for a cluster.
func NewGCSClusterObjectStorageSettings ¶ added in v1.18.0
func NewGCSClusterObjectStorageSettings(bucketName string, serviceAccountKey []byte) (ClusterObjectStorageSettings, error)
NewGCSClusterObjectStorageSettings creates a new ClusterObjectStorageSettings for a cluster using a GCS bucket.
func NewS3ClusterObjectStorageSettings ¶ added in v1.18.0
func NewS3ClusterObjectStorageSettings(bucketName string, credentials []byte) (ClusterObjectStorageSettings, error)
NewS3ClusterObjectStorageSettings creates a new ClusterObjectStorageSettings for a cluster using an S3 bucket.
func (ClusterObjectStorageSettings) BucketName ¶ added in v1.18.0
func (s ClusterObjectStorageSettings) BucketName() string
BucketName returns the name of the object storage bucket.
func (ClusterObjectStorageSettings) GCSServiceAccountKey ¶ added in v1.18.0
func (s ClusterObjectStorageSettings) GCSServiceAccountKey() []byte
GCSServiceAccountKey returns the GCS service account key in JSON format. It's up to the caller to ensure that this is only called when Type is ObjectStorageTypeGCS.
func (ClusterObjectStorageSettings) S3CredentialsFile ¶ added in v1.18.0
func (s ClusterObjectStorageSettings) S3CredentialsFile() []byte
S3CredentialsFile returns the AWS credentials in JSON format. It's up to the caller to ensure that this is only called when Type is ObjectStorageTypeS3.
func (ClusterObjectStorageSettings) Type ¶ added in v1.18.0
func (s ClusterObjectStorageSettings) Type() ObjectStorageType
Type returns the type of object storage used by the cluster.
type ExposeOptions ¶ added in v1.12.0
type ExposeOptions struct {
NodeServiceType scyllav1.NodeServiceType
NodesBroadcastAddressType scyllav1.BroadcastAddressType
ClientsBroadcastAddressType scyllav1.BroadcastAddressType
}
type Framework ¶
type Framework struct {
FullClient
// contains filtered or unexported fields
}
func NewFramework ¶
func (*Framework) AddCleaners ¶ added in v1.14.0
func (*Framework) AddCollectors ¶ added in v1.17.0
func (*Framework) Cluster ¶ added in v1.13.0
func (f *Framework) Cluster() ClusterInterface
func (*Framework) CommonLabels ¶ added in v1.9.0
func (*Framework) CreateUserNamespace ¶ added in v1.13.0
func (*Framework) DefaultNamespaceIfAny ¶ added in v1.13.0
func (*Framework) FieldManager ¶ added in v1.8.0
func (*Framework) GetClusterObjectStorageSettings ¶ added in v1.18.0
func (f *Framework) GetClusterObjectStorageSettings() (ClusterObjectStorageSettings, bool)
func (*Framework) GetDefaultArtifactsDir ¶ added in v1.14.0
func (*Framework) GetDefaultScyllaCluster ¶ added in v1.12.0
func (f *Framework) GetDefaultScyllaCluster() *scyllav1.ScyllaCluster
func (*Framework) GetDefaultScyllaDBCluster ¶ added in v1.16.0
func (f *Framework) GetDefaultScyllaDBCluster(rkcMap map[string]*scyllav1alpha1.RemoteKubernetesCluster) *scyllav1alpha1.ScyllaDBCluster
func (*Framework) GetDefaultScyllaDBDatacenter ¶ added in v1.15.0
func (f *Framework) GetDefaultScyllaDBDatacenter() *scyllav1alpha1.ScyllaDBDatacenter
func (*Framework) GetDefaultZonalScyllaClusterWithThreeRacks ¶ added in v1.14.0
func (f *Framework) GetDefaultZonalScyllaClusterWithThreeRacks() *scyllav1.ScyllaCluster
func (*Framework) GetIngressAddress ¶ added in v1.9.0
func (*Framework) GetObjectStorageSettingsForWorkerCluster ¶ added in v1.18.0
func (f *Framework) GetObjectStorageSettingsForWorkerCluster(workerName string) ClusterObjectStorageSettings
func (*Framework) WorkerClusters ¶ added in v1.18.0
func (f *Framework) WorkerClusters() map[string]ClusterInterface
type FullClient ¶ added in v1.13.0
type FullClient struct {
Client
AdminClient
}
func (*FullClient) DiscoveryClient ¶ added in v1.13.0
func (c *FullClient) DiscoveryClient() *discovery.DiscoveryClient
type FullClientInterface ¶ added in v1.13.0
type FullClientInterface interface {
ClientInterface
AdminClientInterface
}
type GenericClientInterface ¶ added in v1.13.0
type GenericClientInterface interface {
DiscoveryClient() *discovery.DiscoveryClient
}
type IngressController ¶ added in v1.11.0
type NamespaceCleanerCollector ¶ added in v1.17.0
type NamespaceCleanerCollector struct {
// contains filtered or unexported fields
}
func NewNamespaceCleanerCollector ¶ added in v1.17.0
func NewNamespaceCleanerCollector(restConfig *rest.Config, client kubernetes.Interface, dynamicClient dynamic.Interface, namespace *corev1.Namespace) *NamespaceCleanerCollector
func (NamespaceCleanerCollector) CollectToLog ¶ added in v1.17.0
type NotFoundTolerantNamespaceCollector ¶ added in v1.18.0
type NotFoundTolerantNamespaceCollector struct {
// contains filtered or unexported fields
}
func NewNotFoundTolerantNamespaceCollector ¶ added in v1.18.0
func NewNotFoundTolerantNamespaceCollector(restConfig *rest.Config, client kubernetes.Interface, dynamicClient dynamic.Interface, namespace string) *NotFoundTolerantNamespaceCollector
func (*NotFoundTolerantNamespaceCollector) Collect ¶ added in v1.18.0
func (nc *NotFoundTolerantNamespaceCollector) Collect(ctx context.Context, artifactsDir string, _ string)
func (NotFoundTolerantNamespaceCollector) CollectToLog ¶ added in v1.18.0
type ObjectStorageType ¶ added in v1.13.0
type ObjectStorageType string
const ( ObjectStorageTypeNone ObjectStorageType = "None" ObjectStorageTypeGCS ObjectStorageType = "GCS" ObjectStorageTypeS3 ObjectStorageType = "S3" )
type RestoreStrategy ¶ added in v1.14.0
type RestoreStrategy string
const ( RestoreStrategyRecreate RestoreStrategy = "Recreate" RestoreStrategyUpdate RestoreStrategy = "Update" )
type RestoringCleaner ¶ added in v1.14.0
type RestoringCleaner struct {
// contains filtered or unexported fields
}
func NewRestoringCleaner ¶ added in v1.14.0
func NewRestoringCleaner(ctx context.Context, restConfig *rest.Config, client kubernetes.Interface, dynamicClient dynamic.Interface, resourceInfo collect.ResourceInfo, namespace string, name string, strategy RestoreStrategy) *RestoringCleaner
func (*RestoringCleaner) Cleanup ¶ added in v1.14.0
func (rc *RestoringCleaner) Cleanup(ctx context.Context)
func (*RestoringCleaner) Collect ¶ added in v1.14.0
func (rc *RestoringCleaner) Collect(ctx context.Context, clusterArtifactsDir string, ginkgoNamespace string)
func (*RestoringCleaner) CollectToLog ¶ added in v1.14.0
func (rc *RestoringCleaner) CollectToLog(ctx context.Context)
func (*RestoringCleaner) DeleteObject ¶ added in v1.14.0
func (rc *RestoringCleaner) DeleteObject(ctx context.Context, ignoreNotFound bool)
type ScyllaClusterOptions ¶ added in v1.12.0
type ScyllaClusterOptions struct {
ExposeOptions ExposeOptions
StorageClassName string
}
type TestContextType ¶
type TestContextType struct {
// RestConfig is the restclient.Config for the main cluster.
// It also represents the "meta" or "control-plane" cluster in multi-datacenter setups.
RestConfig *restclient.Config
// WorkerRestConfigs contains a map of restclient.Configs for each worker cluster, keyed by the cluster identifier. Used in multi-datacenter setups.
WorkerRestConfigs map[string]*restclient.Config
ArtifactsDir string
CleanupPolicy CleanupPolicyType
IngressController *IngressController
ScyllaClusterOptions *ScyllaClusterOptions
ScyllaDBVersion string
ScyllaDBManagerVersion string
ScyllaDBManagerAgentVersion string
ScyllaDBUpdateFrom string
ScyllaDBUpgradeFrom string
WorkerClusterObjectStorageSettings map[string]ClusterObjectStorageSettings
ClusterObjectStorageSettings *ClusterObjectStorageSettings
}
var TestContext *TestContextType