Skip to content

Commit a67c096

Browse files
committed
[FIX] change patch for old version
1 parent e438116 commit a67c096

2 files changed

Lines changed: 26 additions & 8 deletions

File tree

charts/adhoc-odoo/v0.2.8/templates/ingress.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{{- $fullName := include "adhoc-odoo.serviceNameSuffix" . -}}
33
{{- $svcPort := .Values.service.port -}}
44
{{- $usewebsocket := .Values.odoo.performance.workers | toString | int -}}
5+
{{- $odooVersion := include "adhoc-odoo.odoo-version" . | replace "." "" | int -}}
56
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
67
apiVersion: networking.k8s.io/v1
78
{{- else -}}
@@ -60,8 +61,12 @@ spec:
6061
port:
6162
number: 80
6263
{{- if gt $usewebsocket 0 }}
63-
- path: /websocket
64-
pathType: Prefix
64+
- pathType: Prefix
65+
{{- if le $odooVersion 150 }}
66+
path: /longpolling
67+
{{- else }}
68+
path: /websocket
69+
{{- end }}
6570
backend:
6671
service:
6772
name: {{ $fullName }}-websocket
@@ -83,8 +88,12 @@ spec:
8388
port:
8489
number: 80
8590
{{- if gt $usewebsocket 0 }}
86-
- path: /websocket
87-
pathType: Prefix
91+
- pathType: Prefix
92+
{{- if le $odooVersion 150 }}
93+
path: /longpolling
94+
{{- else }}
95+
path: /websocket
96+
{{- end }}
8897
backend:
8998
service:
9099
name: {{ $fullName }}-websocket

charts/adhoc-odoo/v0.2.9/templates/ingress.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{{- $fullName := include "adhoc-odoo.serviceNameSuffix" . -}}
33
{{- $svcPort := .Values.service.port -}}
44
{{- $usewebsocket := .Values.odoo.performance.workers | toString | int -}}
5+
{{- $odooVersion := include "adhoc-odoo.odoo-version" . | replace "." "" | int -}}
56
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
67
apiVersion: networking.k8s.io/v1
78
{{- else -}}
@@ -60,8 +61,12 @@ spec:
6061
port:
6162
number: 80
6263
{{- if gt $usewebsocket 0 }}
63-
- path: /websocket
64-
pathType: Prefix
64+
- pathType: Prefix
65+
{{- if le $odooVersion 150 }}
66+
path: /longpolling
67+
{{- else }}
68+
path: /websocket
69+
{{- end }}
6570
backend:
6671
service:
6772
name: {{ $fullName }}-websocket
@@ -83,8 +88,12 @@ spec:
8388
port:
8489
number: 80
8590
{{- if gt $usewebsocket 0 }}
86-
- path: /websocket
87-
pathType: Prefix
91+
- pathType: Prefix
92+
{{- if le $odooVersion 150 }}
93+
path: /longpolling
94+
{{- else }}
95+
path: /websocket
96+
{{- end }}
8897
backend:
8998
service:
9099
name: {{ $fullName }}-websocket

0 commit comments

Comments
 (0)