mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-04 17:51:56 +02:00
configure PG pods to use Minio bucket
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
kubernetes==11.0.0
|
||||
timeout_decorator==0.4.1
|
||||
pyyaml==5.3.1
|
||||
minio=6.0.0
|
||||
@@ -55,6 +55,7 @@ function deploy_minio(){
|
||||
echo "Deploying MinIO object storage..."
|
||||
/tmp/helm-postgres-operator-e2e-tests/helm repo update
|
||||
/tmp/helm-postgres-operator-e2e-tests/helm install --generate-name minio/minio
|
||||
kubectl create file manifests/minio-configmap.yaml
|
||||
}
|
||||
|
||||
function run_tests(){
|
||||
|
||||
@@ -10,6 +10,9 @@ import yaml
|
||||
from datetime import datetime
|
||||
from kubernetes import client, config
|
||||
|
||||
from minio import Minio
|
||||
from minio.error import ResponseError
|
||||
|
||||
|
||||
def to_selector(labels):
|
||||
return ",".join(["=".join(l) for l in labels.items()])
|
||||
@@ -36,6 +39,18 @@ class EndToEndTestCase(unittest.TestCase):
|
||||
'''
|
||||
print("Test Setup being executed")
|
||||
|
||||
# create Minio bucket to store WAL
|
||||
minioClient = Minio(
|
||||
'play.min.io',
|
||||
access_key=os.environ['ACCESS_KEY'],
|
||||
secret_key=os.environ['SECRET_KEY']
|
||||
)
|
||||
|
||||
try:
|
||||
minioClient.make_bucket("minio/wal", location="us-east-1")
|
||||
except ResponseError as err:
|
||||
raise
|
||||
|
||||
# set a single K8s wrapper for all tests
|
||||
k8s = cls.k8s = K8s()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user