diff --git a/Chart.yaml b/Chart.yaml index d1d2c41..cf38ee9 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 name: odoo description: An opiniated Helm Chart for deploying Odoo type: application -version: 0.2.7 +version: 0.3.0 appVersion: "16.0" sources: - https://github.com/odoo/odoo diff --git a/templates/configmap.yaml b/templates/configmap.yaml index a873135..5893f14 100644 --- a/templates/configmap.yaml +++ b/templates/configmap.yaml @@ -1,54 +1,6 @@ --- apiVersion: v1 kind: ConfigMap -metadata: - name: {{ include "..fullname" . }}-nginx-conf -data: - nginx.conf: |- - upstream odoo { - server 0.0.0.0:8069; - } - upstream odoochat { - server 0.0.0.0:8072; - } - map $http_upgrade $connection_upgrade { - default upgrade; - '' close; - } - server { - listen 80; - - client_max_body_size 0; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-SSL on; - proxy_set_header X-Forwarded-Protocol ssl; - proxy_set_header X-Forwarded-Proto https; - - location /websocket { - proxy_pass http://odoochat; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Real-IP $remote_addr; - } - - location / { - proxy_redirect off; - proxy_pass http://odoo; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Real-IP $remote_addr; - } - gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript; - gzip on; - } ---- -apiVersion: v1 -kind: ConfigMap metadata: name: {{ include "..fullname" . }}-default-conf data: diff --git a/templates/deployment.yaml b/templates/deployment.yaml index dfdc353..6decbc8 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -49,17 +49,6 @@ spec: - name: {{ .Values.image.pullSecret }} {{- end }} containers: - - name: {{ include "..fullname" . }}-proxy - image: nginx - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: nginx-http - containerPort: {{ .Values.service.port }} - protocol: TCP - volumeMounts: - - name: {{ include "..fullname" . }}-nginx-conf - mountPath: /etc/nginx/conf.d/default.conf - subPath: nginx.conf - name: {{ include "..fullname" . }}-service image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" {{- if .Values.odoo.update.enabled }} @@ -97,9 +86,6 @@ spec: startupProbe: {{- toYaml .Values.startupProbe | nindent 12 }} volumes: - - name: {{ include "..fullname" . }}-nginx-conf - configMap: - name: "{{ include "..fullname" . }}-nginx-conf" - name: {{ include "..fullname" . }}-odoo-conf secret: secretName: "{{ include "..fullname" . }}-odoo-conf" diff --git a/templates/ingress.yaml b/templates/ingress.yaml index feb7d5f..ae1292c 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -41,7 +41,7 @@ spec: port: number: 80 {{- else }} - name: {{ $fullName }}-nginx + name: {{ $fullName }} port: number: {{ $svcPort }} {{- end}} diff --git a/templates/service.yaml b/templates/service.yaml index 5ccf0bf..7633e61 100644 --- a/templates/service.yaml +++ b/templates/service.yaml @@ -2,15 +2,15 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "..fullname" . }}-nginx + name: {{ include "..fullname" . }} labels: {{- include "..labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: - - name: nginx-http + - name: odoo-http port: {{ .Values.service.port }} - targetPort: nginx-http + targetPort: odoo-http protocol: TCP selector: {{- include "..selectorLabels" . | nindent 4 }} diff --git a/values.yaml b/values.yaml index 533ccad..b5dbbf5 100644 --- a/values.yaml +++ b/values.yaml @@ -23,7 +23,6 @@ image: repository: odoo # Pull policy can be set to Always, IfNotPresent, or Never # ref: https://kubernetes.io/docs/concepts/containers/images/#updating-images - # Will set the policy for Odoo and Nginx pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "16.0" @@ -146,7 +145,7 @@ securityContext: service: type: ClusterIP - port: 80 + port: 8069 ingress: enabled: false @@ -155,6 +154,15 @@ ingress: cert-manager.io/cluster-issuer: letsencrypt nginx.ingress.kubernetes.io/backend-protocol: HTTP nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + nginx.ingress.kubernetes.io/proxy-body-size: "0" + nginx.ingress.kubernetes.io/proxy-connect-timeout: "300" + nginx.ingress.kubernetes.io/proxy-send-timeout: "300" + nginx.ingress.kubernetes.io/proxy-read-timeout: "300" + nginx.ingress.kubernetes.io/configuration-snippet: | + proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; hosts: - host: odoo.example.com paths: