Skip to content
Snippets Groups Projects
Commit a0ff858d authored by MUNIER Florian's avatar MUNIER Florian
Browse files

[add] k8s files

parent 5dc5210b
No related branches found
No related tags found
No related merge requests found
Pipeline #15778 canceled
{
"auths": {
"https://gitlab-registry.imt-atlantique.fr/f21munie/vapormap/":{
"username":"gitlab+deploy-token-21",
"password":"yg3gvipZRNDTGHVJbwae",
"email":"florian.munier@imt-atlantique.net",
"auth":"Z2l0bGFiK2RlcGxveS10b2tlbi0yMTp5ZzNndmlwWlJORFRHSFZKYndhZQ=="
}
}
}
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: api
name: api
spec:
replicas: 1
selector:
matchLabels:
app: api
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: api
spec:
initContainers:
- name: init-api
image: gitlab-registry.imt-atlantique.fr/f21munie/vapormap/app_api
env:
- name: VAPOR_DBNAME
value: "db_vapormap"
- name: VAPOR_DBUSER
value: "user_vapormap"
- name: VAPOR_DBPASS
value: "vapormap"
- name: VAPOR_DBHOST
value: "mariadb"
- name: SETTINGS_FILE
value: "production"
#value: "vapormap.app.api.settings.production"
- name: PYTHONPATH
value: "/app_api/"
- name: PYTHONDONTWRITEBYTECODE
value: "1"
- name: PYTHONUNBUFFERED
value: "1"
command: ['sh', '-c', 'flask db upgrade']
resources: {}
imagePullSecrets:
- name: registry-credentials
containers:
- image: gitlab-registry.imt-atlantique.fr/f21munie/vapormap/app_api:latest
name: app-api-xjj4j
# ports:
# - containerPort: 8000
# name: web
env:
- name: VAPOR_DBNAME
value: "db_vapormap"
- name: VAPOR_DBUSER
value: "user_vapormap"
- name: VAPOR_DBPASS
value: "vapormap"
- name: VAPOR_DBHOST
value: "mariadb"
- name: SETTINGS_FILE
value: "production"
#value: "vapormap.app.api.settings.production"
- name: PYTHONPATH
value: "/app_api/"
- name: PYTHONDONTWRITEBYTECODE
value: "1"
- name: PYTHONUNBUFFERED
value: "1"
resources: {}
imagePullSecrets:
- name: registry-credentials
status: {}
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app: api
name: api
spec:
ports:
- port: 8001
protocol: TCP
targetPort: 8001
selector:
app: api
status:
loadBalancer: {}
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: front
name: front
spec:
replicas: 1
selector:
matchLabels:
app: front
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: front
spec:
containers:
- image: gitlab-registry.imt-atlantique.fr/f21munie/vapormap/app_front:latest
name: app-front-hb7xl
# ports:
# - containerPort: 8000
env:
- name: VAPORMAP_BACKEND
#value: "10.29.244.232"
value: "localhost"
- name: VAPORMAP_BACKEND_PORT
value: "80"
- name: VAPORMAP_URL_SERVERNAME
value: "0.0.0.0"
- name: VAPORMAP_URL_PORT
value: "8000"
- name: VAPORMAP_FRONTEND_ROOT
value: "/app_fe"
resources: {}
imagePullSecrets:
- name: registry-credentials
status: {}
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app: front
name: front
spec:
ports:
- port: 8000
protocol: TCP
targetPort: 8000
selector:
app: front
status:
loadBalancer: {}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: vapormap
spec:
ingressClassName: public
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: front
port:
number: 8000
- path: /api/points/
pathType: Prefix
backend:
service:
name: api
port:
number: 8001
- path: /geojson
pathType: Prefix
backend:
service:
name: api
port:
number: 8001
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: mariadb
name: mariadb
spec:
replicas: 1
selector:
matchLabels:
app: mariadb
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: mariadb
spec:
containers:
- image: gitlab-registry.imt-atlantique.fr/f21munie/vapormap/mariadb:latest
name: mariadb
env:
- name: MYSQL_ROOT_PASSWORD
value : "root_pw"
- name: MYSQL_USER
value : "user_vapormap"
- name: MYSQL_PASSWORD
value: "vapormap"
- name: MYSQL_DATABASE
value: "db_vapormap"
resources: {}
imagePullSecrets:
- name: registry-credentials
status: {}
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app: mariadb
name: mariadb
spec:
ports:
- port: 3306
protocol: TCP
targetPort: 3306
selector:
app: mariadb
status:
loadBalancer: {}
apiVersion: v1
kind: Secret
metadata:
name: registry-credentials
namespace: default
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: ewogICAgImF1dGhzIjogewogICAgICAgICJodHRwczovL2dpdGxhYi1yZWdpc3RyeS5pbXQtYXRsYW50aXF1ZS5mci9mMjFtdW5pZS92YXBvcm1hcC8iOnsKICAgICAgICAgICAgInVzZXJuYW1lIjoiZ2l0bGFiK2RlcGxveS10b2tlbi0yMSIsCiAgICAgICAgICAgICJwYXNzd29yZCI6InlnM2d2aXBaUk5EVEdIVkpid2FlIiwKICAgICAgICAgICAgImVtYWlsIjoiZmxvcmlhbi5tdW5pZXJAaW10LWF0bGFudGlxdWUubmV0IiwKICAgICAgICAgICAgImF1dGgiOiJaMmwwYkdGaUsyUmxjR3h2ZVMxMGIydGxiaTB5TVRwNVp6Tm5kbWx3V2xKT1JGUkhTRlpLWW5kaFpRPT0iCiAgICAJfQogICAgfQp9
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment