Files
chart/library/ix-dev/community/odoo/templates/_odoo.tpl
Stavros Kois 56445771a5 NAS-123658 / 24.04 / add odoo to community apps (#1468)
* add `odoo` to `community` apps

* add pg

* add config, svc, persistence

* add basic values for test

* add tmp and validation

* use the odoo user

* update readme

* remove interface config

* switch db name

* init

* do init

* extra values

* update UI

* remove redundant group

* fix typo

* bump common
2023-08-30 14:22:20 +03:00

69 lines
2.3 KiB
Smarty

{{- 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 -}}