[Backport release-1.1] [platform] Fix VM MAC address not preserved during migration (#2190)
# Description Backport of #2169 to `release-1.1`.
This commit is contained in:
commit
109b4a333e
1 changed files with 6 additions and 0 deletions
|
|
@ -34,6 +34,12 @@ spec:
|
|||
metadata:
|
||||
annotations:
|
||||
kubevirt.io/allow-pod-bridge-network-live-migration: "true"
|
||||
{{- $ovnIPName := printf "%s.%s" (include "virtual-machine.fullname" .) .Release.Namespace }}
|
||||
{{- $ovnIP := lookup "kubeovn.io/v1" "IP" "" $ovnIPName }}
|
||||
{{- if $ovnIP }}
|
||||
ovn.kubernetes.io/mac_address: {{ $ovnIP.spec.macAddress | quote }}
|
||||
ovn.kubernetes.io/ip_address: {{ $ovnIP.spec.ipAddress | quote }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "virtual-machine.labels" . | nindent 8 }}
|
||||
spec:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue