Deployment: use Kubernetes deployment
This commit is contained in:
parent
f624802df3
commit
4b91badf30
1 changed files with 90 additions and 80 deletions
|
@ -14,52 +14,57 @@ spec:
|
||||||
app: gisaf-database
|
app: gisaf-database
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: apps/v1
|
||||||
kind: Pod
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: gisaf-database
|
name: gisaf-database-deployment
|
||||||
annotations:
|
|
||||||
io.kubernetes.cri-o.SandboxID/gisaf-database: gisaf-cri-o
|
|
||||||
io.kubernetes.cri-o.SandboxID/gisaf-redis: gisaf-cri-o
|
|
||||||
io.podman.annotations.infra.name: gisaf-infra
|
|
||||||
labels:
|
labels:
|
||||||
app: gisaf-database
|
app: gisaf-database
|
||||||
spec:
|
spec:
|
||||||
hostAliases:
|
replicas: 1
|
||||||
- ip: "127.0.0.1"
|
selector:
|
||||||
hostnames:
|
matchLabels:
|
||||||
- "gisaf-redis"
|
app: gisaf-database
|
||||||
- "gisaf-database"
|
template:
|
||||||
containers:
|
metadata:
|
||||||
- name: gisaf-database
|
labels:
|
||||||
image: code.philo.ydns.eu/philorg/gisaf-database:latest
|
app: gisaf-database
|
||||||
imagePullPolicy: Always
|
spec:
|
||||||
args:
|
hostAliases:
|
||||||
- postgres
|
- ip: "127.0.0.1"
|
||||||
volumeMounts:
|
hostnames:
|
||||||
- mountPath: /var/lib/postgresql/data
|
- "gisaf-redis"
|
||||||
name: gisaf-pgdata
|
- "gisaf-database"
|
||||||
ports:
|
containers:
|
||||||
- containerPort: 5432
|
- name: gisaf-database
|
||||||
name: psql
|
image: code.philo.ydns.eu/philorg/gisaf-database:latest
|
||||||
- image: docker.io/library/redis:alpine
|
imagePullPolicy: Always
|
||||||
imagePullPolicy: Always
|
args:
|
||||||
name: gisaf-redis
|
- postgres
|
||||||
args:
|
volumeMounts:
|
||||||
- redis-server
|
- mountPath: /var/lib/postgresql/data
|
||||||
volumeMounts:
|
name: gisaf-pgdata
|
||||||
- mountPath: /data
|
ports:
|
||||||
|
- containerPort: 5432
|
||||||
|
name: psql
|
||||||
|
- image: docker.io/library/redis:alpine
|
||||||
|
imagePullPolicy: Always
|
||||||
name: gisaf-redis
|
name: gisaf-redis
|
||||||
ports:
|
args:
|
||||||
- containerPort: 6379
|
- redis-server
|
||||||
name: redis
|
volumeMounts:
|
||||||
volumes:
|
- mountPath: /data
|
||||||
- name: gisaf-pgdata
|
name: gisaf-redis
|
||||||
persistentVolumeClaim:
|
ports:
|
||||||
claimName: gisaf-pgdata-pvc
|
- containerPort: 6379
|
||||||
- name: gisaf-redis
|
name: redis
|
||||||
persistentVolumeClaim:
|
volumes:
|
||||||
claimName: gisaf-redis-pvc
|
- name: gisaf-pgdata
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: gisaf-pgdata-pvc
|
||||||
|
- name: gisaf-redis
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: gisaf-redis-pvc
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -78,49 +83,54 @@ spec:
|
||||||
#type: NodePort
|
#type: NodePort
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: apps/v1
|
||||||
kind: Pod
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: gisaf-server
|
name: gisaf-server-deployment
|
||||||
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:
|
labels:
|
||||||
app: gisaf-server
|
app: gisaf-server
|
||||||
spec:
|
spec:
|
||||||
hostAliases:
|
replicas: 2
|
||||||
- ip: "127.0.0.1"
|
selector:
|
||||||
hostnames:
|
matchLabels:
|
||||||
- "gisaf-frontend"
|
app: gisaf-server
|
||||||
- "gisaf-backend"
|
template:
|
||||||
initContainers:
|
metadata:
|
||||||
- name: gisaf-backend-initdb
|
labels:
|
||||||
image: code.philo.ydns.eu/philorg/gisaf-backend:latest
|
app: gisaf-server
|
||||||
imagePullPolicy: Always
|
spec:
|
||||||
command: ["gisaf", "create-db"]
|
hostAliases:
|
||||||
env:
|
- ip: "127.0.0.1"
|
||||||
- name: GISAF__DB__HOST
|
hostnames:
|
||||||
value: gisaf-database
|
- "gisaf-frontend"
|
||||||
containers:
|
- "gisaf-backend"
|
||||||
- name: gisaf-backend
|
initContainers:
|
||||||
image: code.philo.ydns.eu/philorg/gisaf-backend:latest
|
- name: gisaf-backend-initdb
|
||||||
imagePullPolicy: Always
|
image: code.philo.ydns.eu/philorg/gisaf-backend:0.5.0-alpha.5
|
||||||
env:
|
imagePullPolicy: Always
|
||||||
- name: GISAF__GISAF_LIVE__REDIS
|
command: ["gisaf", "create-db"]
|
||||||
value: redis://gisaf-database
|
env:
|
||||||
- name: GISAF__DB__HOST
|
- name: GISAF__DB__HOST
|
||||||
value: gisaf-database
|
value: gisaf-database
|
||||||
- name: gisaf-frontend
|
containers:
|
||||||
image: code.philo.ydns.eu/philorg/gisaf-frontend:latest
|
- name: gisaf-backend
|
||||||
imagePullPolicy: Always
|
image: code.philo.ydns.eu/philorg/gisaf-backend:0.5.0-alpha.5
|
||||||
args:
|
imagePullPolicy: Always
|
||||||
- nginx
|
env:
|
||||||
- -g
|
- name: GISAF__GISAF_LIVE__REDIS
|
||||||
- daemon off;
|
value: redis://gisaf-database
|
||||||
ports:
|
- name: GISAF__DB__HOST
|
||||||
- containerPort: 80
|
value: gisaf-database
|
||||||
hostPort: 8899
|
- name: gisaf-frontend
|
||||||
|
image: code.philo.ydns.eu/philorg/gisaf-frontend:0.5.0-alpha.12
|
||||||
|
imagePullPolicy: Always
|
||||||
|
args:
|
||||||
|
- nginx
|
||||||
|
- -g
|
||||||
|
- daemon off;
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
#hostPort: 8899
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue