Skip to content

Commit 83f2f78

Browse files
committed
Use CloudNativePG for testing
1 parent 3022fa6 commit 83f2f78

File tree

3 files changed

+28
-29
lines changed

3 files changed

+28
-29
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ Optionally create your OMERO.server and OMERO.web Helm configuration files.
1515
You can use [`test-omero-server.yaml`](test-omero-server.yaml) and [`test-omero-web.yaml`](test-omero-web.yaml) as examples.
1616

1717
Create a PostgreSQL database, and add the credentials to your OMERO.server chart configuration file.
18-
For testing you could use the `bitnami/postgresql` Helm chart:
18+
For testing you can use the [CloudNativePG](https://cloudnative-pg.io/) operator:
1919

20-
helm repo add bitnami https://charts.bitnami.com/bitnami
21-
helm upgrade --install postgresql bitnami/postgresql -f test-postgresql.yaml
20+
kubectl apply --server-side=true -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/main/releases/cnpg-1.28.1.yaml
21+
kubectl apply -f test-postgresql.yaml
2222

2323
Install OMERO.server and OMERO.web
2424

test-omero-server.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
database:
2-
host: postgresql
2+
host: postgresql-rw
33
username: omero
44
password: ChAnGeMe
55
name: omero
@@ -34,9 +34,9 @@ ingress:
3434
enabled: true
3535
hosts:
3636
# If you only have an IP add `.xip.io` since bare IPs aren't supported
37-
# - 192.168.99.100.xip.io
37+
# - 192.168.99.100.nip.io
3838
- localhost
3939
tls:
4040
- hosts:
41-
# - 192.168.99.100.xip.io
41+
# - 192.168.99.100.nip.io
4242
- localhost

test-postgresql.yaml

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
# See https://github.com/bitnami/charts/tree/master/bitnami/postgresql#parameters
2-
# image:
3-
# tag: 15.0.0-debian-11-r1
4-
image:
5-
# Temporary workaround for https://github.com/manics/kubernetes-omero/issues/55
6-
repository: bitnamilegacy/postgresql
7-
8-
# TODO: Use the autogenerated postgres secret instead
9-
10-
# Bitnami chart v11:
11-
auth:
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: postgresql-omero
5+
type: kubernetes.io/basic-auth
6+
stringData:
127
username: omero
138
password: ChAnGeMe
14-
database: omero
15-
# primary:
16-
# persistence:
17-
# enabled:
18-
# existingClaim:
19-
# storageClass:
20-
# accessModes:
21-
# annotations:
22-
# size:
23-
# subPath:
24-
# mountPath:
25-
# resources:
9+
10+
---
11+
apiVersion: postgresql.cnpg.io/v1
12+
kind: Cluster
13+
metadata:
14+
name: postgresql
15+
spec:
16+
instances: 1
17+
storage:
18+
size: 1Gi
19+
bootstrap:
20+
initdb:
21+
database: omero
22+
owner: omero
23+
secret:
24+
name: postgresql-omero

0 commit comments

Comments
 (0)