1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 06:46:36 +01:00

Change defaultNetworkType to ovn-kubernetes

In 4.12, the default CNI will be OVNKubernetes.
This change will deploy ovnk by default as well
as adjust tests, docs and comments to reflect
the same.

Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
This commit is contained in:
Jamo Luhrsen
2022-06-15 13:25:04 -07:00
parent 01228cdfbd
commit 74486c10c6
16 changed files with 30 additions and 33 deletions

View File

@@ -1477,9 +1477,9 @@ spec:
type: object
type: array
networkType:
default: OVNKubernetes
description: NetworkType is the type of network to install. The default
value is OVNKubernetes for Single Node OpenShift and OpenShiftSDN
for all other platforms.
value is OVNKubernetes.
type: string
serviceCIDR:
description: Deprecated way to configure an IP address pool for services.

View File

@@ -44,7 +44,7 @@ The following `install-config.yaml` properties are available:
The default is 10.0.0.0/16 for all platforms other than libvirt.
For libvirt, the default is 192.168.126.0/24.
* `networkType` (optional string): The type of network to install.
The default is [OVNKubernetes][ovn-kubernetes] for Single Node OpenShift and [OpenShiftSDN][openshift-sdn] for all other platforms.
The default is [OVNKubernetes][ovn-kubernetes].
* `serviceNetwork` (optional array of [IP networks](#ip-networks)): The IP address pools for services.
The default is 172.30.0.0/16.
* `platform` (required object): The configuration for the specific platform upon which to perform the installation.

View File

@@ -1,7 +1,7 @@
# OpenStack Platform Support
This document discusses the requirements, current expected behavior, and how to try out what exists so far.
In addition, it covers the installation with the default CNI (OpenShiftSDN), as well as with the Kuryr SDN.
In addition, it covers the installation with the default CNI (OVNKubernetes), as well as with the Kuryr SDN.
## Table of Contents

View File

@@ -382,7 +382,7 @@ open(path, "w").write(yaml.dump(data, default_flow_style=False))'
### Modify NetworkType (Required for Kuryr SDN)
By default the `networkType` is set to `OpenShiftSDN` on the `install-config.yaml`.
By default the `networkType` is set to `OVNKubernetes` on the `install-config.yaml`.
If an installation with Kuryr is desired, you must modify the `networkType` field.

View File

@@ -464,7 +464,7 @@ spec:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
networkType: OpenShiftSDN
networkType: OVNKubernetes
```
If it doesn't exist, the installer didn't create it. You'll have to run `openshift-install create manifests` to determine why.

View File

@@ -52,7 +52,7 @@ func TestInstallConfigGenerate_FillsInDefaults(t *testing.T) {
MachineNetwork: []types.MachineNetworkEntry{
{CIDR: *ipnet.MustParseCIDR("10.0.0.0/16")},
},
NetworkType: "OpenShiftSDN",
NetworkType: "OVNKubernetes",
ServiceNetwork: []ipnet.IPNet{*ipnet.MustParseCIDR("172.30.0.0/16")},
ClusterNetwork: []types.ClusterNetworkEntry{
{
@@ -118,7 +118,7 @@ pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
MachineNetwork: []types.MachineNetworkEntry{
{CIDR: *ipnet.MustParseCIDR("10.0.0.0/16")},
},
NetworkType: "OpenShiftSDN",
NetworkType: "OVNKubernetes",
ServiceNetwork: []ipnet.IPNet{*ipnet.MustParseCIDR("172.30.0.0/16")},
ClusterNetwork: []types.ClusterNetworkEntry{
{
@@ -203,7 +203,7 @@ wrong_key: wrong_value
MachineNetwork: []types.MachineNetworkEntry{
{CIDR: *ipnet.MustParseCIDR("10.0.0.0/16")},
},
NetworkType: "OpenShiftSDN",
NetworkType: "OVNKubernetes",
ServiceNetwork: []ipnet.IPNet{*ipnet.MustParseCIDR("172.30.0.0/16")},
ClusterNetwork: []types.ClusterNetworkEntry{
{
@@ -260,7 +260,7 @@ pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
MachineNetwork: []types.MachineNetworkEntry{
{CIDR: *ipnet.MustParseCIDR("10.0.0.0/16")},
},
NetworkType: "OpenShiftSDN",
NetworkType: "OVNKubernetes",
ServiceNetwork: []ipnet.IPNet{*ipnet.MustParseCIDR("172.30.0.0/16")},
ClusterNetwork: []types.ClusterNetworkEntry{
{
@@ -319,7 +319,7 @@ pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
MachineNetwork: []types.MachineNetworkEntry{
{CIDR: *ipnet.MustParseCIDR("10.0.0.0/16")},
},
NetworkType: "OpenShiftSDN",
NetworkType: "OVNKubernetes",
ServiceNetwork: []ipnet.IPNet{*ipnet.MustParseCIDR("172.30.0.0/16")},
ClusterNetwork: []types.ClusterNetworkEntry{
{
@@ -379,7 +379,7 @@ pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
MachineNetwork: []types.MachineNetworkEntry{
{CIDR: *ipnet.MustParseCIDR("10.0.0.0/16")},
},
NetworkType: "OpenShiftSDN",
NetworkType: "OVNKubernetes",
ServiceNetwork: []ipnet.IPNet{*ipnet.MustParseCIDR("172.30.0.0/16")},
ClusterNetwork: []types.ClusterNetworkEntry{
{
@@ -439,7 +439,7 @@ pullSecret: "{\"auths\":{\"example.com\":{\"auth\":\"authorization value\"}}}"
MachineNetwork: []types.MachineNetworkEntry{
{CIDR: *ipnet.MustParseCIDR("10.0.0.0/16")},
},
NetworkType: "OpenShiftSDN",
NetworkType: "OVNKubernetes",
ServiceNetwork: []ipnet.IPNet{*ipnet.MustParseCIDR("172.30.0.0/16")},
ClusterNetwork: []types.ClusterNetworkEntry{
{

View File

@@ -20,7 +20,7 @@ func validPlatform() *alibabacloud.Platform {
func validNetworking() *types.Networking {
return &types.Networking{
NetworkType: "OpenShiftSDN",
NetworkType: "OVNKubernetes",
MachineNetwork: []types.MachineNetworkEntry{{
CIDR: *ipnet.MustParseCIDR("10.0.0.0/16"),
}},
@@ -29,7 +29,7 @@ func validNetworking() *types.Networking {
func invalidMachineNetwork() *types.Networking {
return &types.Networking{
NetworkType: "OpenShiftSDN",
NetworkType: "OVNKubernetes",
MachineNetwork: []types.MachineNetworkEntry{{
CIDR: *ipnet.MustParseCIDR("100.100.100.0/24"),
}},
@@ -38,7 +38,7 @@ func invalidMachineNetwork() *types.Networking {
func invalidServiceNetwork() *types.Networking {
return &types.Networking{
NetworkType: "OpenShiftSDN",
NetworkType: "OVNKubernetes",
ServiceNetwork: []ipnet.IPNet{{
IPNet: net.IPNet{
IP: net.IP{0x64, 0x64, 0x64, 0x00},
@@ -50,7 +50,7 @@ func invalidServiceNetwork() *types.Networking {
func invalidClusterNetwork() *types.Networking {
return &types.Networking{
NetworkType: "OpenShiftSDN",
NetworkType: "OVNKubernetes",
ClusterNetwork: []types.ClusterNetworkEntry{{
CIDR: ipnet.IPNet{
IPNet: net.IPNet{

View File

@@ -76,7 +76,7 @@ func convertNetworking(config *types.InstallConfig) {
netconf.NetworkType = netconf.DeprecatedType
}
// Recognize the default network plugin name regardless of capitalization, for
// Recognize the OpenShiftSDN network plugin name regardless of capitalization, for
// backward compatibility
if strings.ToLower(netconf.NetworkType) == strings.ToLower(string(operv1.NetworkTypeOpenShiftSDN)) {
netconf.NetworkType = string(operv1.NetworkTypeOpenShiftSDN)

View File

@@ -24,7 +24,7 @@ var (
defaultServiceNetwork = ipnet.MustParseCIDR("172.30.0.0/16")
defaultClusterNetwork = ipnet.MustParseCIDR("10.128.0.0/14")
defaultHostPrefix = 23
defaultNetworkType = string(operv1.NetworkTypeOpenShiftSDN)
defaultNetworkType = string(operv1.NetworkTypeOVNKubernetes)
)
// SetInstallConfigDefaults sets the defaults for the install config.
@@ -48,11 +48,7 @@ func SetInstallConfigDefaults(c *types.InstallConfig) {
}
}
if c.Networking.NetworkType == "" {
if c.IsOKD() || c.IsSingleNodeOpenShift() {
c.Networking.NetworkType = string(operv1.NetworkTypeOVNKubernetes)
} else {
c.Networking.NetworkType = defaultNetworkType
}
c.Networking.NetworkType = defaultNetworkType
}
if len(c.Networking.ServiceNetwork) == 0 {
c.Networking.ServiceNetwork = []ipnet.IPNet{*defaultServiceNetwork}

View File

@@ -281,8 +281,9 @@ func (p *Platform) Name() string {
// Networking defines the pod network provider in the cluster.
type Networking struct {
// NetworkType is the type of network to install.
// The default value is OVNKubernetes for Single Node OpenShift
// and OpenShiftSDN for all other platforms.
// The default value is OVNKubernetes.
//
// +kubebuilder:default=OVNKubernetes
// +optional
NetworkType string `json:"networkType,omitempty"`

View File

@@ -23,7 +23,7 @@ func validPlatform() *openstack.Platform {
func validNetworking() *types.Networking {
return &types.Networking{
NetworkType: "OpenShiftSDN",
NetworkType: "OVNKubernetes",
MachineNetwork: []types.MachineNetworkEntry{{
CIDR: *ipnet.MustParseCIDR("10.0.0.0/16"),
}},

View File

@@ -180,7 +180,7 @@ func validNutanixPlatform() *nutanix.Platform {
func validIPv4NetworkingConfig() *types.Networking {
return &types.Networking{
NetworkType: "OpenShiftSDN",
NetworkType: "OVNKubernetes",
MachineNetwork: []types.MachineNetworkEntry{
{
CIDR: *ipnet.MustParseCIDR("10.0.0.0/16"),
@@ -455,7 +455,7 @@ func TestValidateInstallConfig(t *testing.T) {
name: "cluster network host prefix unset",
installConfig: func() *types.InstallConfig {
c := validInstallConfig()
c.Networking.NetworkType = "OpenShiftSDN"
c.Networking.NetworkType = "OVNKubernetes"
c.Networking.ClusterNetwork[0].CIDR = *ipnet.MustParseCIDR("192.168.1.0/24")
c.Networking.ClusterNetwork[0].HostPrefix = 0
return c

View File

@@ -26,7 +26,7 @@ networking:
hostPrefix: 23
machineNetwork:
- cidr: 10.0.128.0/17
networkType: OpenShiftSDN
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
platform:

View File

@@ -32,7 +32,7 @@ networking:
hostPrefix: 23
machineNetwork:
- cidr: 10.0.128.0/17
networkType: OpenShiftSDN
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
platform:

View File

@@ -30,7 +30,7 @@ networking:
hostPrefix: 23
machineNetwork:
- cidr: 10.0.128.0/17
networkType: OpenShiftSDN
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
platform:

View File

@@ -29,7 +29,7 @@ networking:
hostPrefix: 23
machineNetwork:
- cidr: 10.0.128.0/17
networkType: OpenShiftSDN
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
platform: