Commit 3ca9bfd2 authored by Noé Gaumont's avatar Noé Gaumont 🐙
Browse files

WIP: chore: add several deployment

--HG--
branch : seda21
parent 80168d1970ff
Pipeline #65882 failed with stages
in 32 seconds
apiVersion: v1
kind: ConfigMap
metadata:
name: config
data:
default.conf: |
server {
listen 8081 default_server;
location /data {
alias /etc/cubicweb.d/instance/data;
expires 1d;
}
location /robots.txt {
return 200 "User-agent: *\nDisallow: /";
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: saemref
spec:
selector:
matchLabels:
app: saemref
replicas: 1
template:
metadata:
labels:
app: saemref
spec:
volumes:
- name: static
emptyDir: {}
- name: config
configMap:
name: config
containers:
- name: saemref
image: logilab/saemref
imagePullPolicy: Always
envFrom:
- secretRef:
name: saemref-env
env:
- name: CW_BASE_URL
value: "https://saemref.demo.logilab.fr"
volumeMounts:
- name: static
mountPath: /etc/cubicweb.d/instance/data
readinessProbe:
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 30
failureThreshold: 60
httpGet:
path: /login
port: 8080
resources:
requests:
cpu: 200m
memory: 300Mi
limits:
memory: 500Mi
- name: nginx
image: registry.logilab.fr/logilab/infra/dockerfiles/nginx
imagePullPolicy: Always
volumeMounts:
- name: config
mountPath: /etc/nginx/conf.d/default.conf
subPath: default.conf
- name: static
mountPath: /etc/cubicweb.d/instance/data
resources:
requests:
cpu: 50m
memory: 50Mi
limits:
memory: 50Mi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: scheduler
spec:
selector:
matchLabels:
app: scheduler
replicas: 1
template:
metadata:
labels:
app: scheduler
spec:
containers:
- name: saemref
image: logilab/saemref
imagePullPolicy: Always
envFrom:
- secretRef:
name: saemref-env
env:
- name: CW_BASE_URL
value: "https://saemref.demo.logilab.fr"
command: ["cubicweb-ctl", "scheduler", "-l", "info", "instance"]
resources:
requests:
cpu: 100m
memory: 250Mi
limits:
memory: 250Mi
resources:
- service.yaml
- deployment.yaml
images:
- name: saemref
newName: __CI_REGISTRY_IMAGE__
newTag: __CI_COMMIT_HG_SHORT_SHA__
---
apiVersion: v1
kind: Service
metadata:
name: saemref
spec:
selector:
app: saemref
ports:
- protocol: TCP
port: 8080
name: saemref
- protocol: TCP
port: 8081
name: nginx
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: saemref.demo.logilab.fr
spec:
tls:
- hosts:
- saemref.demo.logilab.fr
rules:
- host: saemref.demo.logilab.fr
http:
paths:
- path: /
backend:
serviceName: saemref
servicePort: 8080
- path: /data
backend:
serviceName: saemref
servicePort: 8081
- path: /robots.txt
backend:
serviceName: saemref
servicePort: 8081
bases:
- ../../base
resources:
- ingress.yaml
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: saemref-seda21.demo.logilab.fr
spec:
tls:
- hosts:
- saemref-seda21.demo.logilab.fr
rules:
- host: saemref-seda21.demo.logilab.fr
http:
paths:
- path: /
backend:
serviceName: saemrefseda21
servicePort: 8080
- path: /data
backend:
serviceName: saemrefseda21
servicePort: 8081
- path: /robots.txt
backend:
serviceName: saemrefseda21
servicePort: 8081
bases:
- ../../base
resources:
- ingress.yaml
patches:
- ./patches/deployment.yaml
- ./patches/service.yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: saemref
spec:
selector:
matchLabels:
app: saemrefseda21
template:
metadata:
labels:
app: saemrefseda21
spec:
containers:
- name: saemref
envFrom:
- secretRef:
name: saemrefseda21
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: scheduler
spec:
selector:
matchLabels:
app: scheduler-seda21
template:
metadata:
labels:
app: scheduler-seda21
spec:
containers:
- name: scheduler
envFrom:
- secretRef:
name: saemrefseda21
---
apiVersion: v1
kind: Service
metadata:
name: saemref
spec:
selector:
app: saemrefseda21
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment