NAS-121749 / 23.10 / Apply a partial fix for hostnetwork toggling (#1166)

* Apply a partial fix for hostnetwork toggling

* gh hightlighting

* fix test

* apply it to few more apps

* update comment

* bump changed apps

* add mail attrib

* bump apps
This commit is contained in:
Stavros Kois authored and GitHub committed 2023-05-09 14:21:00 +03:00
1 parent 745724b30e
commit 5132df548c
14 files changed
+69 -8

No files matched your search

@@ -45,7 +45,7 @@ objectData: The object data to be used to render the container.
{{- end -}}
{{- else -}}
{{/* If no selector is defined but contaienr is primary */}}
{{/* If no selector is defined but container is primary */}}
{{- if $objectData.primary -}}
{{- $containerSelected = true -}}
{{- end -}}
@@ -68,8 +68,10 @@ objectData: The object data to be used to render the container.
- name: {{ $portName }}
containerPort: {{ $containerPort }}
protocol: {{ $protocol | upper }}
{{- with $portValues.hostPort }}
{{- with $portValues.hostPort }}
hostPort: {{ . }}
{{- else }}
hostPort: null
{{- end -}}
{{- end -}}
@@ -78,3 +80,8 @@ objectData: The object data to be used to render the container.
{{- end -}}
{{- end -}}
{{/* Turning hostNetwork on, it creates hostPort automatically and turning it back off does not remove them. Setting hostPort explicitly to null will remove them.
There are still cases that hostPort is not removed, for example, if you have a TCP and UDP port with the same port number. Only the one of the hostPorts will
be removed. This is due to how merging is happening, (See kubernetes/kubernetes#105610). Also note that setting hostPort to null always, it will NOT affect
hostNetwork, as it will still create the hostPorts. It only helps to remove them when hostNetwork is turned off.
*/}}