This commit is contained in:
parent
f94ffdd6fb
commit
b530213f6a
1 changed files with 240 additions and 0 deletions
240
deployment/kubernetes/gisaf.yaml
Normal file
240
deployment/kubernetes/gisaf.yaml
Normal file
|
@ -0,0 +1,240 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gisaf
|
||||
labels:
|
||||
app: gisaf
|
||||
spec:
|
||||
ports:
|
||||
- name: "80"
|
||||
nodePort: 32080
|
||||
port: 80
|
||||
targetPort: 80
|
||||
- name: "4532"
|
||||
nodePort: 32432
|
||||
port: 4532
|
||||
targetPort: 4532
|
||||
selector:
|
||||
app: gisaf
|
||||
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
|
||||
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
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: gisaf-pgdata-pv
|
||||
labels:
|
||||
type: local
|
||||
app: gisaf-postgres
|
||||
spec:
|
||||
storageClassName: manual
|
||||
capacity:
|
||||
storage: 2Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
hostPath:
|
||||
path: /data/gisaf-postgresql
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: gisaf-redis-pv
|
||||
labels:
|
||||
type: local
|
||||
app: gisaf-redis
|
||||
spec:
|
||||
storageClassName: manual
|
||||
capacity:
|
||||
storage: 2Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
hostPath:
|
||||
path: /data/gisaf-redis
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: gisaf-pgdata-pvc
|
||||
spec:
|
||||
storageClassName: manual
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: gisaf-redis-pvc
|
||||
spec:
|
||||
storageClassName: manual
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Mi
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: gisaf
|
||||
namespace: default
|
||||
#annotations:
|
||||
# kubernetes.io/ingress.class: traefik
|
||||
# #traefik.ingress.kubernetes.io/router.middlewares: default-strip-prefix@kubernetescrd
|
||||
spec:
|
||||
rules:
|
||||
- http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: gisaf-frontend
|
||||
port:
|
||||
number: 80
|
||||
- path: /api
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: gisaf-backend
|
||||
port:
|
||||
number: 8081
|
Loading…
Add table
Add a link
Reference in a new issue