mirror of
https://github.com/zoriya/Aeris.git
synced 2025-12-06 06:36:12 +00:00
feat: organise yamls
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
.env
|
||||
|
||||
*.secret.yaml
|
||||
.DS_Store
|
||||
.idea
|
||||
1
k8s/aeris/templates/back/back.deployment.yaml
Normal file
1
k8s/aeris/templates/back/back.deployment.yaml
Normal file
@@ -0,0 +1 @@
|
||||
version
|
||||
9
k8s/aeris/templates/postgres/postgres.configmap.yaml
Normal file
9
k8s/aeris/templates/postgres/postgres.configmap.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: configmap-postgres
|
||||
data:
|
||||
POSTGRES_HOST: "postgres-service"
|
||||
POSTGRES_PORT: "5432"
|
||||
POSTGRES_DB: "aeris"
|
||||
PGDATA: /var/lib/postgresql/data/d
|
||||
34
k8s/aeris/templates/postgres/postgres.deployment.yaml
Normal file
34
k8s/aeris/templates/postgres/postgres.deployment.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: postgres-deployment
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: postgres
|
||||
template:
|
||||
metadata:
|
||||
name: postgres
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:12
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
hostPort: 5432
|
||||
volumeMounts:
|
||||
- mountPath: "/var/lib/postgresql/data"
|
||||
name: postgres-volume-claim
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: configmap-postgres
|
||||
- secretRef:
|
||||
name: secret-postgres
|
||||
volumes:
|
||||
- name: postgres-volume-claim
|
||||
persistentVolumeClaim:
|
||||
claimName: volume-claim-postgres
|
||||
restartPolicy: Always
|
||||
11
k8s/aeris/templates/postgres/postgres.service.yaml
Normal file
11
k8s/aeris/templates/postgres/postgres.service.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: postgres-service
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: postgres
|
||||
ports:
|
||||
- port: 5432
|
||||
targetPort: 5432
|
||||
26
k8s/aeris/templates/postgres/postgres.volume.yaml
Normal file
26
k8s/aeris/templates/postgres/postgres.volume.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: volume-postgres
|
||||
labels:
|
||||
type: local
|
||||
name: volume-postgres
|
||||
spec:
|
||||
storageClassName: manual
|
||||
capacity:
|
||||
storage: 200M
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
hostPath:
|
||||
path: "/mnt/data"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: volume-claim-postgres
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200M
|
||||
Reference in New Issue
Block a user