Documentation
¶
Overview ¶
Package objectstore contains the functions to deploy the S3-compatible object storage service used by the e2e tests (currently RustFS) and to query it through an AWS CLI client pod
Index ¶
- Constants
- func CleanFiles(storeEnv *Env, path string) (string, error)
- func CountFiles(storeEnv *Env, path string) (value int, err error)
- func Deploy(storeEnv *Env, env *environment.TestingEnvironment) (*appsv1.Deployment, error)
- func GetFilePath(serverName, fileName string) string
- func ListFiles(storeEnv *Env, path string) (string, error)
- func TestBarmanConnectivity(namespace, clusterName, primaryPodName, id, key string, svcName string) (bool, error)
- type Env
- type Setup
- type TagSet
Constants ¶
const ( // AccessKeyID is the access key used to authenticate against the object store AccessKeyID = "objectstore" // SecretAccessKey is the secret key used to authenticate against the object store SecretAccessKey = "objectstore123" )
Variables ¶
This section is empty.
Functions ¶
func CleanFiles ¶
CleanFiles removes every object under the given `bucket[/prefix]` path
func CountFiles ¶
CountFiles uses the client pod to count the amount of files matching the given `path`
func Deploy ¶
func Deploy(storeEnv *Env, env *environment.TestingEnvironment) (*appsv1.Deployment, error)
Deploy will create a full object storage deployment defined in the storeEnv variable
func GetFilePath ¶
GetFilePath gets the glob matching WAL/backup objects in a configured bucket
Types ¶
type Env ¶
type Env struct {
Client *appsv1.Deployment
CaPair *certs.KeyPair
CaSecretObj corev1.Secret
ServiceName string
Namespace string
CaSecretName string
TLSSecret string
Timeout uint
}
Env contains all the information related or required by the object storage deployment and used by the functions on every test
func (*Env) ClientPodRef ¶
ClientPodRef returns the kubectl resource reference used to exec commands against the S3 client. It targets the Deployment rather than a fixed Pod name so the command is routed to the current Pod even after the original one is rescheduled (e.g. following a node drain).
func (*Env) CreateCaSecret ¶
func (m *Env) CreateCaSecret(env *environment.TestingEnvironment, namespace string) error
CreateCaSecret creates the certificates required to authenticate against the object storage service
type Setup ¶
type Setup struct {
PersistentVolumeClaim corev1.PersistentVolumeClaim
Deployment appsv1.Deployment
Service corev1.Service
}
Setup contains the resources needed for a working object storage server deployment: a PersistentVolumeClaim, a Deployment and a Service