fix(odoo) odoo rootless (#11906)

**Description**
default to rootless + remove dbfilter
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [X] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [X] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [X] ⚖️ My code follows the style guidelines of this project
- [X] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [X] ⬆️ I increased versions for any altered app according to semantic
versioning

**➕ App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Xstar97TheNoob
2023-09-16 11:47:02 +03:00
committed by GitHub
parent c44257e090
commit 12076a3c39
4 changed files with 73 additions and 72 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/odoo - https://github.com/truecharts/charts/tree/master/charts/incubator/odoo
- https://github.com/odoo/docker - https://github.com/odoo/docker
type: application type: application
version: 14.0.0 version: 14.0.1
annotations: annotations:
truecharts.org/catagories: | truecharts.org/catagories: |
- media - media
+14 -17
View File
@@ -34,18 +34,6 @@ questions:
required: true required: true
private: true private: true
default: "" default: ""
- variable: db
label: DB Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: filter
label: DB Filter
schema:
type: string
required: true
default: "^mycompany.*$"
- variable: smtp - variable: smtp
label: SMTP Configuration label: SMTP Configuration
schema: schema:
@@ -108,9 +96,9 @@ questions:
type: int type: int
default: 8069 default: 8069
required: true required: true
- variable: odoo - variable: xmlrpcs
label: "Odoo Service" label: "XMLR PCS Service"
description: "Odoo Services" description: "XMLR PCS Service"
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -130,6 +118,15 @@ questions:
type: int type: int
default: 8071 default: 8071
required: true required: true
- variable: longpolling
label: "Long Polling Service"
description: "Long Polling Service"
schema:
additional_attrs: true
type: dict
attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
- variable: longpolling - variable: longpolling
label: "Long Polling Service Port Configuration" label: "Long Polling Service Port Configuration"
schema: schema:
@@ -183,13 +180,13 @@ questions:
description: "The UserID of the user running the application" description: "The UserID of the user running the application"
schema: schema:
type: int type: int
default: 0 default: 568
- variable: runAsGroup - variable: runAsGroup
label: "runAsGroup" label: "runAsGroup"
description: "The groupID this App of the user running the application" description: "The groupID this App of the user running the application"
schema: schema:
type: int type: int
default: 0 default: 568
# Include{securityContextContainer} # Include{securityContextContainer}
# Include{securityContextAdvanced} # Include{securityContextAdvanced}
# Include{securityContextPod} # Include{securityContextPod}
@@ -3,13 +3,12 @@
{{- $fullname := (include "tc.v1.common.lib.chart.names.fullname" $) -}} {{- $fullname := (include "tc.v1.common.lib.chart.names.fullname" $) -}}
{{- $admin := .Values.odoo.admin -}} {{- $admin := .Values.odoo.admin -}}
{{- $db := .Values.odoo.db -}}
{{- $smtp := .Values.odoo.smtp -}} {{- $smtp := .Values.odoo.smtp -}}
{{- $pgdb := .Values.cnpg.main.database -}} {{- $pgdb := .Values.cnpg.main.database -}}
{{- $pguser := .Values.cnpg.main.user -}} {{- $pguser := .Values.cnpg.main.user -}}
{{- $pgpassword := .Values.cnpg.main.creds.password | trimAll "\"" -}} {{- $pgpassword := .Values.cnpg.main.creds.password | trimAll "\"" -}}
{{- $pghost := .Values.cnpg.main.creds.host | trimAll "\"" -}} {{- $pghost := .Values.cnpg.main.creds.host -}}
odoo-config: odoo-config:
enabled: true enabled: true
@@ -19,18 +18,13 @@ odoo-config:
addons_path = {{ .Values.persistence.addons.mountPath }} addons_path = {{ .Values.persistence.addons.mountPath }}
data_dir = {{ .Values.persistence.odoo.mountPath }} data_dir = {{ .Values.persistence.odoo.mountPath }}
admin_passwd = {{ $admin.passwd }} admin_passwd = {{ $admin.passwd }}
longpolling_port = {{ .Values.service.odoo.ports.longpolling.port }} longpolling_port = {{ .Values.service.longpolling.ports.longpolling.port }}
xmlrpc = True xmlrpc = True
xmlrpc_interface = xmlrpc_interface =
xmlrpc_port = {{ .Values.service.main.ports.main.port }} xmlrpc_port = {{ .Values.service.main.ports.main.port }}
xmlrpcs = True xmlrpcs = True
xmlrpcs_interface = xmlrpcs_interface =
xmlrpcs_port = {{ .Values.service.odoo.ports.xmlrpcs.port }} xmlrpcs_port = {{ .Values.service.xmlrpcs.ports.xmlrpcs.port }}
db_host = {{ $pghost }}
db_port = 5432
db_user = {{ $pguser }}
db_password = {{ $pgpassword }}
dbfilter = {{ $db.dbfilter }}
csv_internal_sep = , csv_internal_sep = ,
db_maxconn = 64 db_maxconn = 64
debug_mode = False debug_mode = False
+23 -13
View File
@@ -1,35 +1,29 @@
image: image:
repository: tccr.io/truecharts/odoo repository: tccr.io/truecharts/odoo
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
tag: v16.0.0@sha256:c1936984eeb8f504f5ebe74cf972319d6cd619ecbdf09249179ecdee2feeecf3 tag: v16.0.0@sha256:9a0e0d913dc6c4ed5904ae233dc2de7fa1a00f10eb5a66f21e1f695c62933a1d
# test for root
securityContext:
container:
runAsNonRoot: false
readOnlyRootFilesystem: false
runAsUser: 0
runAsGroup: 0
service: service:
main: main:
ports: ports:
main: main:
port: 8069 port: 8069
odoo: xmlrpcs:
enabled: true enabled: true
ports: ports:
xmlrpcs: xmlrpcs:
enabled: true enabled: true
port: 8071 port: 8071
longpolling:
enabled: true
ports:
longpolling: longpolling:
enabled: true enabled: true
port: 8072 port: 8072
odoo: odoo:
admin: admin:
passwd: admin passwd: admin
db:
filter: ^mycompany.*$
smtp: smtp:
server: "" server: ""
port: 587 port: 587
@@ -38,6 +32,23 @@ odoo:
ssl: "False" ssl: "False"
from: "" from: ""
workload:
main:
podSpec:
containers:
main:
env:
USER: "{{ .Values.cnpg.main.user }}"
PORT: 5432
PASSWORD:
secretKeyRef:
name: cnpg-main-user
key: password
HOST:
secretKeyRef:
name: cnpg-main-urls
key: host
persistence: persistence:
odoo: odoo:
enabled: true enabled: true
@@ -54,7 +65,6 @@ persistence:
main: main:
mountPath: /etc/odoo/odoo.conf mountPath: /etc/odoo/odoo.conf
subPath: odoo.conf subPath: odoo.conf
readOnly: true
# Enabled postgres # Enabled postgres
cnpg: cnpg: