diff --git a/charts/incubator/odoo/Chart.yaml b/charts/incubator/odoo/Chart.yaml index 76ae5ac989c..000ea673e40 100644 --- a/charts/incubator/odoo/Chart.yaml +++ b/charts/incubator/odoo/Chart.yaml @@ -3,7 +3,7 @@ appVersion: "16.0.0" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 14.0.1 + version: 14.0.3 deprecated: false description: All-in-one business software. Beautiful. Easy-to-use. CRM, Accounting, PM, HR, Procurement, Point of Sale, MRP, Marketing, etc. home: https://truecharts.org/charts/incubator/odoo @@ -26,8 +26,8 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/odoo - https://github.com/odoo/docker type: application -version: 14.0.2 +version: 14.0.3 annotations: truecharts.org/catagories: | - - media + - productivity truecharts.org/SCALE-support: "true" diff --git a/charts/incubator/odoo/questions.yaml b/charts/incubator/odoo/questions.yaml index f2aeb460eb0..bc4f1464289 100644 --- a/charts/incubator/odoo/questions.yaml +++ b/charts/incubator/odoo/questions.yaml @@ -106,13 +106,13 @@ questions: description: "The UserID of the user running the application" schema: type: int - default: 568 + default: 101 - variable: runAsGroup label: "runAsGroup" description: "The groupID this App of the user running the application" schema: type: int - default: 568 + default: 101 # Include{securityContextContainer} # Include{securityContextAdvanced} # Include{securityContextPod} diff --git a/charts/incubator/odoo/templates/_configmap.tpl b/charts/incubator/odoo/templates/_configmap.tpl index 70998fc6f66..c024223fec4 100644 --- a/charts/incubator/odoo/templates/_configmap.tpl +++ b/charts/incubator/odoo/templates/_configmap.tpl @@ -6,13 +6,13 @@ {{- $smtp := .Values.odoo.smtp -}} {{- $mainPort := .Values.service.main.ports.main.port -}} -{{- $odooPath := .Values.persistence.odoo.mountPath -}} -{{- $addonsPath := .Values.persistence.addons.mountPath -}} +{{- $odooPath := .Values.persistence.odoo.targetSelector.main.main.mountPath -}} +{{- $addonsPath := .Values.persistence.addons.targetSelector.main.main.mountPath -}} {{- $pgdb := .Values.cnpg.main.database -}} {{- $pguser := .Values.cnpg.main.user -}} {{- $pgpassword := .Values.cnpg.main.creds.password | trimAll "\"" -}} -{{- $pghost := .Values.cnpg.main.creds.host -}} +{{- $pghost := .Values.cnpg.main.creds.host | trimAll "\"" -}} {{/* xmlrpc* keys are deprecated and http* keys are used in their place */}} {{- $reservedKeys := (list "data_dir" "addons_path" "http_enable" "http_interface" diff --git a/charts/incubator/odoo/values.yaml b/charts/incubator/odoo/values.yaml index 77ae1b530ae..aafe73df9d7 100644 --- a/charts/incubator/odoo/values.yaml +++ b/charts/incubator/odoo/values.yaml @@ -3,6 +3,12 @@ image: pullPolicy: IfNotPresent tag: v16.0.0@sha256:9a0e0d913dc6c4ed5904ae233dc2de7fa1a00f10eb5a66f21e1f695c62933a1d +securityContext: + container: + readOnlyRootFilesystem: false + runAsUser: 101 + runAsGroup: 101 + service: main: ports: @@ -15,6 +21,22 @@ odoo: workload: main: podSpec: + initContainers: + init-db: + type: install + enabled: true + imageSelector: "image" + env: + ODOO_RC: /etc/odoo/odoo.conf + command: + - /bin/bash + args: + - -c + - | + /usr/bin/odoo --config=/etc/odoo/odoo.conf \ + --stop-after-init \ + --without-demo=all \ + --init=base containers: main: probes: @@ -31,38 +53,46 @@ workload: type: http path: /web/health env: - USER: "{{ .Values.cnpg.main.user }}" - PORT: 5432 - PASSWORD: - secretKeyRef: - name: cnpg-main-user - key: password - HOST: - secretKeyRef: - name: cnpg-main-urls - key: host + ODOO_RC: /etc/odoo/odoo.conf persistence: odoo: enabled: true - mountPath: "/var/lib/odoo" + targetSelector: + main: + main: + mountPath: "/var/lib/odoo" + init-db: + mountPath: "/var/lib/odoo" addons: enabled: true - mountPath: "/mnt/extra-addons" + targetSelector: + main: + main: + mountPath: "/mnt/extra-addons" + init-db: + mountPath: "/mnt/extra-addons" odoo-config: enabled: true type: configmap objectName: odoo-config - mountPath: /etc/odoo/odoo.conf - subPath: odoo.conf - readOnly: true + targetSelector: + main: + main: + mountPath: /etc/odoo/odoo.conf + subPath: odoo.conf + readOnly: true + init-db: + mountPath: /etc/odoo/odoo.conf + subPath: odoo.conf + readOnly: true # Enabled postgres cnpg: main: enabled: true user: odoo - database: postgres + database: odoo portal: open: