mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 18:18:41 +00:00
[virtual-machine] fix: specify ports even for wholeIP mode (#1000)
There is an issue with wholeIP services: internal communication from pods doesn't work as expected. Cilium intercepts pod-to-pod traffic, preventing cozy-proxy from rewriting the source IP in return packets. This PR allows Cilium to handle specified ports, enabling hairpin traffic to work correctly at least for these cases. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved service port configuration to ensure explicit port definitions are respected when using the "WholeIP" method. Now, custom external ports will not be overridden, providing more accurate and expected service exposure. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -17,7 +17,7 @@ spec:
|
||||
selector:
|
||||
{{- include "virtual-machine.selectorLabels" . | nindent 4 }}
|
||||
ports:
|
||||
{{- if eq .Values.externalMethod "WholeIP" }}
|
||||
{{- if and (eq .Values.externalMethod "WholeIP") (not .Values.externalPorts) }}
|
||||
- port: 65535
|
||||
{{- else }}
|
||||
{{- range .Values.externalPorts }}
|
||||
|
||||
@@ -17,7 +17,7 @@ spec:
|
||||
selector:
|
||||
{{- include "virtual-machine.selectorLabels" . | nindent 4 }}
|
||||
ports:
|
||||
{{- if eq .Values.externalMethod "WholeIP" }}
|
||||
{{- if and (eq .Values.externalMethod "WholeIP") (not .Values.externalPorts) }}
|
||||
- port: 65535
|
||||
{{- else }}
|
||||
{{- range .Values.externalPorts }}
|
||||
|
||||
Reference in New Issue
Block a user