configure PG pods to use Minio bucket
This commit is contained in:
parent
8cddc148f2
commit
b79e17a279
|
|
@ -1,3 +1,4 @@
|
||||||
kubernetes==11.0.0
|
kubernetes==11.0.0
|
||||||
timeout_decorator==0.4.1
|
timeout_decorator==0.4.1
|
||||||
pyyaml==5.3.1
|
pyyaml==5.3.1
|
||||||
|
minio=6.0.0
|
||||||
|
|
@ -55,6 +55,7 @@ function deploy_minio(){
|
||||||
echo "Deploying MinIO object storage..."
|
echo "Deploying MinIO object storage..."
|
||||||
/tmp/helm-postgres-operator-e2e-tests/helm repo update
|
/tmp/helm-postgres-operator-e2e-tests/helm repo update
|
||||||
/tmp/helm-postgres-operator-e2e-tests/helm install --generate-name minio/minio
|
/tmp/helm-postgres-operator-e2e-tests/helm install --generate-name minio/minio
|
||||||
|
kubectl create file manifests/minio-configmap.yaml
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_tests(){
|
function run_tests(){
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,9 @@ import yaml
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from kubernetes import client, config
|
from kubernetes import client, config
|
||||||
|
|
||||||
|
from minio import Minio
|
||||||
|
from minio.error import ResponseError
|
||||||
|
|
||||||
|
|
||||||
def to_selector(labels):
|
def to_selector(labels):
|
||||||
return ",".join(["=".join(l) for l in labels.items()])
|
return ",".join(["=".join(l) for l in labels.items()])
|
||||||
|
|
@ -36,6 +39,18 @@ class EndToEndTestCase(unittest.TestCase):
|
||||||
'''
|
'''
|
||||||
print("Test Setup being executed")
|
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
|
# set a single K8s wrapper for all tests
|
||||||
k8s = cls.k8s = K8s()
|
k8s = cls.k8s = K8s()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ data:
|
||||||
pdb_name_format: "postgres-{cluster}-pdb"
|
pdb_name_format: "postgres-{cluster}-pdb"
|
||||||
# pod_antiaffinity_topology_key: "kubernetes.io/hostname"
|
# pod_antiaffinity_topology_key: "kubernetes.io/hostname"
|
||||||
pod_deletion_wait_timeout: 10m
|
pod_deletion_wait_timeout: 10m
|
||||||
# pod_environment_configmap: "default/my-custom-config"
|
pod_environment_configmap: "default/minio-configmap" # example used in e2e tests
|
||||||
# pod_environment_secret: "my-custom-secret"
|
# pod_environment_secret: "my-custom-secret"
|
||||||
pod_label_wait_timeout: 10m
|
pod_label_wait_timeout: 10m
|
||||||
pod_management_policy: "ordered_ready"
|
pod_management_policy: "ordered_ready"
|
||||||
|
|
@ -112,6 +112,6 @@ data:
|
||||||
# teams_api_url: http://fake-teams-api.default.svc.cluster.local
|
# teams_api_url: http://fake-teams-api.default.svc.cluster.local
|
||||||
# toleration: ""
|
# toleration: ""
|
||||||
# wal_gs_bucket: ""
|
# wal_gs_bucket: ""
|
||||||
# wal_s3_bucket: ""
|
wal_s3_bucket: "minio/wal"
|
||||||
watched_namespace: "*" # listen to all namespaces
|
watched_namespace: "*" # listen to all namespaces
|
||||||
workers: "8"
|
workers: "8"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: minio-configmap
|
||||||
|
data:
|
||||||
|
MINIO_ACCESS_KEY: WU9VUkFDQ0VTU0tFWQo=
|
||||||
|
MINIO_SECRET_KEY: WU9VUlNFQ1JFVEtFWQo=
|
||||||
Loading…
Reference in New Issue