Add PostgreSQL manifests

This commit is contained in:
Rob Watson 2022-05-05 17:44:44 +02:00
parent 7944501fa2
commit b998b6b13d
5 changed files with 102 additions and 0 deletions

View File

@ -2,6 +2,20 @@
namePrefix: dev-
resources:
- ../base
- svc-db.yaml
helmCharts:
- name: postgresql
version: "11.1.25"
repo: https://charts.bitnami.com/bitnami
releaseName: postgresql
valuesInline:
metrics:
enabled: true
auth:
database: default
postgresPassword: testme
patchesJson6902:
# Patch the ingress-nginx deployment to allow it to use a service with a
# namePrefix. See https://github.com/kubernetes/ingress-nginx/issues/2599#issuecomment-601170289.

16
deploy/dev/svc-db.yaml Normal file
View File

@ -0,0 +1,16 @@
---
apiVersion: v1
kind: Service
metadata:
name: "db"
spec:
type: ExternalName
externalName: "dev-postgresql.default.svc.cluster.local"
---
apiVersion: v1
kind: Service
metadata:
name: "db-metrics"
spec:
type: ExternalName
externalName: "dev-postgresql-metrics.default.svc.cluster.local"

View File

@ -1,6 +1,9 @@
namePrefix: prod-
resources:
- ../base
- svc-db.yaml
- svc-netflux.yaml
patchesJson6902:
# Patch the ingress-nginx deployment to allow it to use a service with a
# namePrefix. See https://github.com/kubernetes/ingress-nginx/issues/2599#issuecomment-601170289.

46
deploy/prod/svc-db.yaml Normal file
View File

@ -0,0 +1,46 @@
---
apiVersion: v1
kind: Service
metadata:
name: db
spec:
clusterIP: None
ports:
- name: postgres
port: 5432
protocol: TCP
---
kind: Endpoints
apiVersion: v1
metadata:
name: db
subsets:
- addresses:
- ip: ${POSTGRESQL_IP}
ports:
- port: 5432
name: postgres
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: db-metrics
spec:
clusterIP: None
ports:
- name: postgres-exporter
port: 9187
protocol: TCP
---
kind: Endpoints
apiVersion: v1
metadata:
name: db-metrics
subsets:
- addresses:
- ip: ${POSTGRESQL_IP}
ports:
- port: 9187
name: postgres-exporter
protocol: TCP

View File

@ -0,0 +1,23 @@
---
apiVersion: v1
kind: Service
metadata:
name: netflux
spec:
clusterIP: None
ports:
- name: metrics
port: 9100
protocol: TCP
---
kind: Endpoints
apiVersion: v1
metadata:
name: netflux
subsets:
- addresses:
- ip: ${NETFLUX_PRIVATE_IP}
ports:
- port: 9100
name: metrics
protocol: TCP