diff --git a/kustomize/pgadmin/kustomization.yaml b/kustomize/pgadmin/kustomization.yaml index 629978c1..bdfdc027 100644 --- a/kustomize/pgadmin/kustomization.yaml +++ b/kustomize/pgadmin/kustomization.yaml @@ -9,7 +9,7 @@ resources: secretGenerator: - name: pgadmin-password-secret literals: - - rhino-password=pgadmin + - admin-password="*************" type: Opaque generatorOptions: diff --git a/kustomize/pgadmin/pgadmin.yaml b/kustomize/pgadmin/pgadmin.yaml index 4357c4f2..78e976f4 100644 --- a/kustomize/pgadmin/pgadmin.yaml +++ b/kustomize/pgadmin/pgadmin.yaml @@ -1,20 +1,20 @@ apiVersion: postgres-operator.crunchydata.com/v1beta1 kind: PGAdmin metadata: - name: rhino + name: pgadmin spec: users: - - username: rhino@example.com + - username: nazar.stefaniuk@leibniz-ipht.de role: Administrator passwordRef: name: pgadmin-password-secret - key: rhino-password + key: admin-password dataVolumeClaimSpec: accessModes: - "ReadWriteOnce" resources: requests: - storage: 1Gi + storage: 10Gi serverGroups: - name: supply # An empty selector selects all postgresclusters in the Namespace diff --git a/kustomize/postgres/postgres.yaml b/kustomize/postgres/postgres.yaml index a832aa5a..747a6ee6 100644 --- a/kustomize/postgres/postgres.yaml +++ b/kustomize/postgres/postgres.yaml @@ -1,21 +1,23 @@ apiVersion: postgres-operator.crunchydata.com/v1beta1 kind: PostgresCluster metadata: - name: hippo + name: gitlab spec: postgresVersion: 17 users: - - name: rhino + - name: nazarstefaniuk databases: - - zoo + - gitlab + options: 'SUPERUSER' instances: - name: instance1 dataVolumeClaimSpec: accessModes: - "ReadWriteOnce" + storageClassName: 'longhorn' resources: requests: - storage: 1Gi + storage: 10Gi backups: pgbackrest: repos: @@ -26,4 +28,4 @@ spec: - "ReadWriteOnce" resources: requests: - storage: 1Gi + storage: 10Gi diff --git a/pgadmin-ingress.yaml b/pgadmin-ingress.yaml new file mode 100644 index 00000000..ca11bc17 --- /dev/null +++ b/pgadmin-ingress.yaml @@ -0,0 +1,20 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: pgadmin-ingress + namespace: postgres-operator + annotations: + nginx.ingress.kubernetes.io/rewrite-target: / +spec: + ingressClassName: nginx + rules: + - host: pgadmin.k8s.leibniz-ipht.de + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: pgadmin-service + port: + number: 5050 diff --git a/pgadmin-service.yaml b/pgadmin-service.yaml new file mode 100644 index 00000000..0e92cdf2 --- /dev/null +++ b/pgadmin-service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + namespace: postgres-operator + name: pgadmin-service +spec: + type: ClusterIP + ports: + - name: pgadmin-port + port: 5050 + protocol: TCP + selector: + postgres-operator.crunchydata.com/pgadmin: pgadmin