objectstore

package
v1.30.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

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

View Source
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

func CleanFiles(storeEnv *Env, path string) (string, error)

CleanFiles removes every object under the given `bucket[/prefix]` path

func CountFiles

func CountFiles(storeEnv *Env, path string) (value int, err error)

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

func GetFilePath(serverName, fileName string) string

GetFilePath gets the glob matching WAL/backup objects in a configured bucket

func ListFiles

func ListFiles(storeEnv *Env, path string) (string, error)

ListFiles uses the client pod to list the paths matching the given `path`

func TestBarmanConnectivity

func TestBarmanConnectivity(
	namespace,
	clusterName,
	primaryPodName,
	id,
	key string,
	svcName string,
) (bool, error)

TestBarmanConnectivity validates the barman connectivity to the object storage endpoint

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

func (m *Env) ClientPodRef() string

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

type TagSet

type TagSet struct {
	Tags map[string]string
}

TagSet contains the tags of an object in the object store

func GetFileTags

func GetFileTags(storeEnv *Env, path string) (TagSet, error)

GetFileTags will use the client pod to retrieve the tags in a specified path

Jump to

Keyboard shortcuts

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