|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * installing/installing_openstack/installing-openstack-installer-kuryr.adoc |
| 4 | +// * installing/installing_openstack/installing-openstack-user-kuryr.adoc |
| 5 | + |
| 6 | +[id="installation-osp-kuryr-settings-installing_{context}"] |
| 7 | += Adjusting Kuryr ports pools during installation |
| 8 | + |
| 9 | +During installation, you can configure how Kuryr manages {rh-openstack-first} Neutron ports to control the speed and efficiency of pod creation. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | + |
| 13 | +* Create and modify the `install-config.yaml` file. |
| 14 | + |
| 15 | +.Procedure |
| 16 | + |
| 17 | +. From a command line, create the manifest files: |
| 18 | ++ |
| 19 | +[source,terminal] |
| 20 | +---- |
| 21 | +$ ./openshift-install create manifests --dir=<installation_directory> <1> |
| 22 | +---- |
| 23 | +<1> For `<installation_directory>`, specify the name of the directory that |
| 24 | +contains the `install-config.yaml` file for your cluster. |
| 25 | + |
| 26 | +. Create a file that is named `cluster-network-03-config.yml` in the |
| 27 | +`<installation_directory>/manifests/` directory: |
| 28 | ++ |
| 29 | +[source,terminal] |
| 30 | +---- |
| 31 | +$ touch <installation_directory>/manifests/cluster-network-03-config.yml <1> |
| 32 | +---- |
| 33 | +<1> For `<installation_directory>`, specify the directory name that contains the |
| 34 | +`manifests/` directory for your cluster. |
| 35 | ++ |
| 36 | +After creating the file, several network configuration files are in the |
| 37 | +`manifests/` directory, as shown: |
| 38 | ++ |
| 39 | +[source,terminal] |
| 40 | +---- |
| 41 | +$ ls <installation_directory>/manifests/cluster-network-* |
| 42 | +---- |
| 43 | ++ |
| 44 | +.Example output |
| 45 | +[source,terminal] |
| 46 | +---- |
| 47 | +cluster-network-01-crd.yml |
| 48 | +cluster-network-02-config.yml |
| 49 | +cluster-network-03-config.yml |
| 50 | +---- |
| 51 | + |
| 52 | +. Open the `cluster-network-03-config.yml` file in an editor, and enter a custom resource (CR) that describes the Cluster Network Operator configuration that you want: |
| 53 | ++ |
| 54 | +[source,terminal] |
| 55 | +---- |
| 56 | +$ oc edit networks.operator.openshift.io cluster |
| 57 | +---- |
| 58 | + |
| 59 | +. Edit the settings to meet your requirements. The following file is provided as an example: |
| 60 | ++ |
| 61 | +[source,yaml] |
| 62 | +---- |
| 63 | +apiVersion: operator.openshift.io/v1 |
| 64 | +kind: Network |
| 65 | +metadata: |
| 66 | + name: cluster |
| 67 | +spec: |
| 68 | + clusterNetwork: |
| 69 | + - cidr: 10.128.0.0/14 |
| 70 | + hostPrefix: 23 |
| 71 | + serviceNetwork: |
| 72 | + - 172.30.0.0/16 |
| 73 | + defaultNetwork: |
| 74 | + type: Kuryr |
| 75 | + kuryrConfig: |
| 76 | + enablePortPoolsPrepopulation: false <1> |
| 77 | + poolMinPorts: 1 <2> |
| 78 | + poolBatchPorts: 3 <3> |
| 79 | + poolMaxPorts: 5 <4> |
| 80 | + openstackServiceNetwork: 172.30.0.0/15 <5> |
| 81 | +---- |
| 82 | +<1> Set the value of `enablePortPoolsPrepopulation` to `true` to make Kuryr create new Neutron ports after a namespace is created or a new node is added to the cluster. This setting raises the Neutron ports quota but can reduce the time that is required to spawn pods. The default value is `false`. |
| 83 | +<2> Kuryr creates new ports for a pool if the number of free ports in that pool is lower than the value of `poolMinPorts`. The default value is `1`. |
| 84 | +<3> `poolBatchPorts` controls the number of new ports that are created if the number of free ports is lower than the value of `poolMinPorts`. The default value is `3`. |
| 85 | +<4> If the number of free ports in a pool is higher than the value of `poolMaxPorts`, Kuryr deletes them until the number matches that value. Setting this value to `0` disables this upper bound, preventing pools from shrinking. The default value is `0`. |
| 86 | +<5> The `openStackServiceNetwork` parameter defines the CIDR range of the network from which IP addresses are allocated to {rh-openstack} Octavia's LoadBalancers. |
| 87 | ++ |
| 88 | +If this parameter is used with the Amphora driver, Octavia takes two IP addresses from this network for each load balancer: one for OpenShift and the other for VRRP connections. Because these IP addresses are managed by {product-title} and Neutron respectively, they must come from different pools. |
| 89 | +Therefore, the value of `openStackServiceNetwork` must be at least twice the size of the value of `serviceNetwork`, and the value of `serviceNetwork` must overlap entirely with the range that is defined by `openStackServiceNetwork`. |
| 90 | ++ |
| 91 | +The CNO verifies that VRRP IP addresses that are taken from the range that is defined by this parameter do not overlap with the range that is defined by the `serviceNetwork` parameter. |
| 92 | ++ |
| 93 | +If this parameter is not set, the CNO uses an expanded value of `serviceNetwork` that is determined by decrementing the prefix size by 1. |
| 94 | + |
| 95 | +. Save the `cluster-network-03-config.yml` file, and exit the text editor. |
| 96 | + |
| 97 | +. Optional: Back up the `manifests/cluster-network-03-config.yml` file. The installation program deletes the `manifests/` directory while creating the cluster. |
0 commit comments