Files
wild-directory/odoo/versions/18/deployment.yaml
2026-06-19 21:33:17 +00:00

96 lines
2.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: odoo
namespace: {{ .namespace }}
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
component: web
template:
metadata:
labels:
component: web
spec:
securityContext:
runAsNonRoot: true
runAsUser: 100
runAsGroup: 101
fsGroup: 101
seccompProfile:
type: RuntimeDefault
containers:
- name: odoo
image: odoo:18.0
ports:
- name: http
containerPort: 8069
protocol: TCP
args: ["-d", "{{ .db.name }}", "-i", "base"]
env:
- name: HOST
value: {{ .db.host }}
- name: PORT
value: "{{ .db.port }}"
- name: USER
value: {{ .db.user }}
- name: PASSWORD
valueFrom:
secretKeyRef:
name: odoo-secrets
key: dbPassword
- name: ADMIN_PASSWD
valueFrom:
secretKeyRef:
name: odoo-secrets
key: adminPassword
volumeMounts:
- name: odoo-data
mountPath: /var/lib/odoo
startupProbe:
httpGet:
path: /web/health
port: 8069
failureThreshold: 40
periodSeconds: 30
timeoutSeconds: 10
livenessProbe:
httpGet:
path: /web/health
port: 8069
initialDelaySeconds: 0
timeoutSeconds: 10
periodSeconds: 30
failureThreshold: 6
readinessProbe:
httpGet:
path: /web/health
port: 8069
initialDelaySeconds: 0
timeoutSeconds: 5
periodSeconds: 15
failureThreshold: 3
resources:
requests:
cpu: 250m
memory: 512Mi
ephemeral-storage: 50Mi
limits:
cpu: 1000m
memory: 2Gi
ephemeral-storage: 2Gi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
volumes:
- name: odoo-data
persistentVolumeClaim:
claimName: odoo-data
restartPolicy: Always