This commit is contained in:
parent
ace0382fe0
commit
e44911db8e
1 changed files with 65 additions and 99 deletions
|
@ -1,111 +1,33 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: gisaf
|
name: gisaf-database
|
||||||
labels:
|
labels:
|
||||||
app: gisaf
|
app: gisaf-database
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: "80"
|
- name: psql
|
||||||
nodePort: 32080
|
port: 5432
|
||||||
port: 80
|
- name: redis
|
||||||
targetPort: 80
|
port: 6379
|
||||||
- name: "4532"
|
|
||||||
nodePort: 32432
|
|
||||||
port: 4532
|
|
||||||
targetPort: 4532
|
|
||||||
selector:
|
selector:
|
||||||
app: gisaf
|
app: gisaf-database
|
||||||
type: NodePort
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: gisaf
|
|
||||||
annotations:
|
|
||||||
io.kubernetes.cri-o.SandboxID/gisaf-backend: gisaf-cri-o
|
|
||||||
io.kubernetes.cri-o.SandboxID/gisaf-database: gisaf-cri-o
|
|
||||||
io.kubernetes.cri-o.SandboxID/gisaf-frontend: gisaf-cri-o
|
|
||||||
io.kubernetes.cri-o.SandboxID/gisaf-redis: gisaf-cri-o
|
|
||||||
io.podman.annotations.infra.name: gisaf-infra
|
|
||||||
labels:
|
|
||||||
app: gisaf
|
|
||||||
spec:
|
|
||||||
hostAliases:
|
|
||||||
- ip: "127.0.0.1"
|
|
||||||
hostnames:
|
|
||||||
- "gisaf-frontend"
|
|
||||||
- "gisaf-backend"
|
|
||||||
- "gisaf-redis"
|
|
||||||
- "gisaf-database"
|
|
||||||
containers:
|
|
||||||
- name: gisaf-database
|
|
||||||
image: code.philo.ydns.eu/philorg/gisaf-database:latest
|
|
||||||
args:
|
|
||||||
- postgres
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /var/lib/postgresql/data
|
|
||||||
name: gisaf-pgdata
|
|
||||||
ports:
|
|
||||||
- containerPort: 4532
|
|
||||||
hostPort: 35432
|
|
||||||
- image: docker.io/library/redis:alpine
|
|
||||||
name: gisaf-redis
|
|
||||||
args:
|
|
||||||
- redis-server
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /data
|
|
||||||
name: gisaf-redis
|
|
||||||
- name: gisaf-backend-initdb
|
|
||||||
image: code.philo.ydns.eu/philorg/gisaf-backend:latest
|
|
||||||
command: ["gisaf", "create-db"]
|
|
||||||
env:
|
|
||||||
- name: GISAF__DB__HOST
|
|
||||||
value: gisaf-database
|
|
||||||
- name: gisaf-backend
|
|
||||||
image: code.philo.ydns.eu/philorg/gisaf-backend:latest
|
|
||||||
env:
|
|
||||||
- name: GISAF__GISAF_LIVE__REDIS
|
|
||||||
value: redis://gisaf-redis
|
|
||||||
- name: GISAF__DB__HOST
|
|
||||||
value: gisaf-database
|
|
||||||
- name: gisaf-frontend
|
|
||||||
image: code.philo.ydns.eu/philorg/gisaf-frontend:latest
|
|
||||||
args:
|
|
||||||
- nginx
|
|
||||||
- -g
|
|
||||||
- daemon off;
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
||||||
hostPort: 8899
|
|
||||||
volumes:
|
|
||||||
- name: gisaf-pgdata
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: gisaf-pgdata-pvc
|
|
||||||
- name: gisaf-redis
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: gisaf-redis-pvc
|
|
||||||
---
|
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: gisaf
|
name: gisaf-database
|
||||||
annotations:
|
annotations:
|
||||||
io.kubernetes.cri-o.SandboxID/gisaf-backend: gisaf-cri-o
|
|
||||||
io.kubernetes.cri-o.SandboxID/gisaf-database: gisaf-cri-o
|
io.kubernetes.cri-o.SandboxID/gisaf-database: gisaf-cri-o
|
||||||
io.kubernetes.cri-o.SandboxID/gisaf-frontend: gisaf-cri-o
|
|
||||||
io.kubernetes.cri-o.SandboxID/gisaf-redis: gisaf-cri-o
|
io.kubernetes.cri-o.SandboxID/gisaf-redis: gisaf-cri-o
|
||||||
io.podman.annotations.infra.name: gisaf-infra
|
io.podman.annotations.infra.name: gisaf-infra
|
||||||
labels:
|
labels:
|
||||||
app: gisaf
|
app: gisaf-database
|
||||||
spec:
|
spec:
|
||||||
hostAliases:
|
hostAliases:
|
||||||
- ip: "127.0.0.1"
|
- ip: "127.0.0.1"
|
||||||
hostnames:
|
hostnames:
|
||||||
- "gisaf-frontend"
|
|
||||||
- "gisaf-backend"
|
|
||||||
- "gisaf-redis"
|
- "gisaf-redis"
|
||||||
- "gisaf-database"
|
- "gisaf-database"
|
||||||
containers:
|
containers:
|
||||||
|
@ -117,8 +39,8 @@ spec:
|
||||||
- mountPath: /var/lib/postgresql/data
|
- mountPath: /var/lib/postgresql/data
|
||||||
name: gisaf-pgdata
|
name: gisaf-pgdata
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 4532
|
- containerPort: 5432
|
||||||
hostPort: 35432
|
name: psql
|
||||||
- image: docker.io/library/redis:alpine
|
- image: docker.io/library/redis:alpine
|
||||||
name: gisaf-redis
|
name: gisaf-redis
|
||||||
args:
|
args:
|
||||||
|
@ -126,17 +48,63 @@ spec:
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /data
|
- mountPath: /data
|
||||||
name: gisaf-redis
|
name: gisaf-redis
|
||||||
|
ports:
|
||||||
|
- containerPort: 6379
|
||||||
|
name: redis
|
||||||
|
volumes:
|
||||||
|
- name: gisaf-pgdata
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: gisaf-pgdata-pvc
|
||||||
|
- name: gisaf-redis
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: gisaf-redis-pvc
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: gisaf-server
|
||||||
|
labels:
|
||||||
|
app: gisaf-server
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
#nodePort: 30080
|
||||||
|
selector:
|
||||||
|
app: gisaf-server
|
||||||
|
#type: NodePort
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: gisaf-server
|
||||||
|
annotations:
|
||||||
|
io.kubernetes.cri-o.SandboxID/gisaf-backend: gisaf-cri-o
|
||||||
|
io.kubernetes.cri-o.SandboxID/gisaf-frontend: gisaf-cri-o
|
||||||
|
io.podman.annotations.infra.name: gisaf-infra
|
||||||
|
labels:
|
||||||
|
app: gisaf-server
|
||||||
|
spec:
|
||||||
|
hostAliases:
|
||||||
|
- ip: "127.0.0.1"
|
||||||
|
hostnames:
|
||||||
|
- "gisaf-frontend"
|
||||||
|
- "gisaf-backend"
|
||||||
|
initContainers:
|
||||||
- name: gisaf-backend-initdb
|
- name: gisaf-backend-initdb
|
||||||
image: code.philo.ydns.eu/philorg/gisaf-backend:latest
|
image: code.philo.ydns.eu/philorg/gisaf-backend:latest
|
||||||
command: ["gisaf", "create-db"]
|
command: ["gisaf", "create-db"]
|
||||||
env:
|
env:
|
||||||
- name: GISAF__DB__HOST
|
- name: GISAF__DB__HOST
|
||||||
value: gisaf-database
|
value: gisaf-database
|
||||||
|
containers:
|
||||||
- name: gisaf-backend
|
- name: gisaf-backend
|
||||||
image: code.philo.ydns.eu/philorg/gisaf-backend:latest
|
image: code.philo.ydns.eu/philorg/gisaf-backend:latest
|
||||||
env:
|
env:
|
||||||
- name: GISAF__GISAF_LIVE__REDIS
|
- name: GISAF__GISAF_LIVE__REDIS
|
||||||
value: redis://gisaf-redis
|
value: redis://gisaf-database
|
||||||
- name: GISAF__DB__HOST
|
- name: GISAF__DB__HOST
|
||||||
value: gisaf-database
|
value: gisaf-database
|
||||||
- name: gisaf-frontend
|
- name: gisaf-frontend
|
||||||
|
@ -148,13 +116,7 @@ spec:
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
hostPort: 8899
|
hostPort: 8899
|
||||||
volumes:
|
|
||||||
- name: gisaf-pgdata
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: gisaf-pgdata-pvc
|
|
||||||
- name: gisaf-redis
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: gisaf-redis-pvc
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolume
|
kind: PersistentVolume
|
||||||
|
@ -171,6 +133,7 @@ spec:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /data/gisaf-postgresql
|
path: /data/gisaf-postgresql
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolume
|
kind: PersistentVolume
|
||||||
|
@ -187,6 +150,7 @@ spec:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /data/gisaf-redis
|
path: /data/gisaf-redis
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
|
@ -199,6 +163,7 @@ spec:
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 2Gi
|
storage: 2Gi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
|
@ -211,6 +176,7 @@ spec:
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 200Mi
|
storage: 200Mi
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
|
@ -228,13 +194,13 @@ spec:
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: gisaf-frontend
|
name: gisaf-server
|
||||||
port:
|
port:
|
||||||
number: 80
|
number: 80
|
||||||
- path: /api
|
- path: /api
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: gisaf-backend
|
name: gisaf-server
|
||||||
port:
|
port:
|
||||||
number: 8081
|
number: 8081
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue