44 lines
917 B
YAML
44 lines
917 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: postgresql
|
|
namespace: odoo
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: postgresql
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: postgresql
|
|
spec:
|
|
containers:
|
|
- name: postgres
|
|
image: docker.io/bitnami/postgresql:15
|
|
ports:
|
|
- containerPort: 5432
|
|
env:
|
|
- name: POSTGRESQL_DATABASE
|
|
value: k8smaestro
|
|
- name: POSTGRESQL_PASSWORD
|
|
value: k8smaestro
|
|
- name: POSTGRESQL_USERNAME
|
|
value: odoo
|
|
volumeMounts:
|
|
- name: postgres-storage
|
|
mountPath: /bitnami/postgresql
|
|
volumes:
|
|
- name: postgres-storage
|
|
emptyDir: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: postgresql
|
|
namespace: odoo
|
|
spec:
|
|
ports:
|
|
- port: 5432
|
|
selector:
|
|
app: postgresql |