1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- {{- define "odoo.workload" -}}
- workload:
- odoo:
- enabled: true
- primary: true
- type: Deployment
- podSpec:
- hostNetwork: {{ .Values.odooNetwork.hostNetwork }}
- containers:
- odoo:
- enabled: true
- primary: true
- imageSelector: image
- securityContext:
- runAsUser: 101
- runAsGroup: 101
- env:
- ODOO_RC: /etc/odoo/odoo.conf
- {{ with .Values.odooConfig.additionalEnvs }}
- envList:
- {{ range $env := . }}
- - name: {{ $env.name }}
- value: {{ $env.value }}
- {{ end }}
- {{ end }}
- probes:
- liveness:
- enabled: true
- type: http
- path: /web/health
- port: {{ .Values.odooNetwork.webPort }}
- readiness:
- enabled: true
- type: http
- path: /web/health
- port: {{ .Values.odooNetwork.webPort }}
- startup:
- enabled: true
- type: http
- path: /web/health
- port: {{ .Values.odooNetwork.webPort }}
- initContainers:
- {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
- "UID" 101
- "GID" 101
- "type" "install") | nindent 8 }}
- {{- include "ix.v1.common.app.postgresWait" (dict "name" "02-postgres-wait"
- "secretName" "postgres-creds") | nindent 8 }}
- {{- if .Release.IsInstall }} {{/* If we use type: install it will run before the postgres wait and fail */}}
- 03-db-init:
- enabled: true
- type: init
- imageSelector: image
- securityContext:
- runAsUser: 101
- runAsGroup: 101
- env:
- ODOO_RC: /etc/odoo/odoo.conf
- command:
- - /bin/bash
- - -c
- - |
- /usr/bin/odoo --config=/etc/odoo/odoo.conf \
- --stop-after-init \
- --without-demo=all \
- --init=base
- {{- end -}}
- {{- end -}}
|