diff --git a/bindata/network/ovn-kubernetes/common/008-script-lib.yaml b/bindata/network/ovn-kubernetes/common/008-script-lib.yaml index 7e0bcea88a..c4792f8be6 100644 --- a/bindata/network/ovn-kubernetes/common/008-script-lib.yaml +++ b/bindata/network/ovn-kubernetes/common/008-script-lib.yaml @@ -332,6 +332,11 @@ data: ipsec_encapsulation=true fi {{ end }} + +{{ if .OVNIPsecEncapEnable }} + ipsec_encapsulation=true +{{ end }} + IPSEC_OPTION="ipsec=${ipsec} options:ipsec_encapsulation=${ipsec_encapsulation}" # set all the NB_GLOBAL options diff --git a/pkg/network/ovn_kubernetes.go b/pkg/network/ovn_kubernetes.go index 5221c8a43d..765d4b3430 100644 --- a/pkg/network/ovn_kubernetes.go +++ b/pkg/network/ovn_kubernetes.go @@ -290,6 +290,8 @@ func renderOVNKubernetes(conf *operv1.NetworkSpec, bootstrapResult *bootstrap.Bo data.Data["IPsecMachineConfigEnable"] = IPsecMachineConfigEnable data.Data["OVNIPsecDaemonsetEnable"] = OVNIPsecDaemonsetEnable data.Data["OVNIPsecEnable"] = OVNIPsecEnable + data.Data["OVNIPsecEncapEnable"] = OVNIPsecEnable && c.IPsecConfig.Full != nil && + c.IPsecConfig.Full.Encap == operv1.EnableEncapsulation // Set progressing to true until IPsec DaemonSet is rendered when EW IPsec config is enabled. // TODO Do a poor man's job mapping machine config pool status to CNO progressing state for now.