Initial chart import from local infrastructure/
This commit is contained in:
69
templates/odoo-deployment.yaml
Normal file
69
templates/odoo-deployment.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "instance.fullname" . }}-odoo
|
||||
labels:
|
||||
{{- include "instance.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: 1
|
||||
# ReadWriteOnce filestore volume + Odoo's session locks rule out
|
||||
# rolling deploys with two pods overlapping. Recreate is safe and
|
||||
# only causes brief downtime.
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: {{ .Values.instance.code | quote }}
|
||||
odoosky.io/role: odoo
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "instance.labels" . | nindent 8 }}
|
||||
odoosky.io/role: odoo
|
||||
spec:
|
||||
containers:
|
||||
- name: odoo
|
||||
image: "{{ .Values.odoo.image }}:{{ .Values.odoo.tag }}"
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8069
|
||||
env:
|
||||
- name: HOST
|
||||
value: {{ include "instance.fullname" . }}-pg
|
||||
- name: PORT
|
||||
value: "5432"
|
||||
- name: USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "instance.fullname" . }}-pg
|
||||
key: POSTGRES_USER
|
||||
- name: PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "instance.fullname" . }}-pg
|
||||
key: POSTGRES_PASSWORD
|
||||
volumeMounts:
|
||||
- name: filestore
|
||||
mountPath: /var/lib/odoo
|
||||
resources:
|
||||
{{- toYaml .Values.odoo.resources | nindent 12 }}
|
||||
# /web/login is the most stable health endpoint across Odoo
|
||||
# 16/17/18/19 — /web/health is 17+. Use login HTTP 200 as
|
||||
# readiness signal.
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /web/login
|
||||
port: 8069
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 8069
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 30
|
||||
volumes:
|
||||
- name: filestore
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "instance.fullname" . }}-odoo
|
||||
Reference in New Issue
Block a user