|
| 1 | +# Configuring complex inputs for OpenShift in IBM Cloud projects |
| 2 | + |
| 3 | +Several optional input variables in the Red Hat OpenShift cluster [Deployable Architecture](https://cloud.ibm.com/catalog#deployable_architecture) use complex object types. You can specify these inputs when you configure your deployable architecture. |
| 4 | + |
| 5 | +- [Additional Worker Pools](#options-with-additional-worker-pools) (`additional_worker_pools`) |
| 6 | +- [Add-ons](#options-with-addons) (`addons`) |
| 7 | +- [Infra node selectors](#options-with-infra) (`infra_node_selectors`) |
| 8 | +- [Workloads node selectors](#options-with-workload) (`workloads_node_selectors`) |
| 9 | + |
| 10 | + |
| 11 | +## Options with additional_worker_pools <a name="options-with-additional-worker-pools"></a> |
| 12 | + |
| 13 | +This variable defines the worker node pools for the Red Hat OpenShift cluster, with each pool having its own configuration settings. |
| 14 | + |
| 15 | +- Variable name: `additional_worker_pools`. |
| 16 | +- Type: A list of objects. Each object represents a `worker_pool` configuration. |
| 17 | +- Default value: An empty list (`[]`). |
| 18 | + |
| 19 | +### Options for additional_worker_pools |
| 20 | + |
| 21 | +- `vpc_subnets` (optional): (List) A list of object which specify which all subnets the worker pool should deploy its nodes. |
| 22 | + - `id` (required): A unique identifier for the VPC subnet. |
| 23 | + - `zone` (required): The zone where the subnet is located. |
| 24 | + - `cidr_block` (required): This defines the IP address range for the subnet in CIDR notation. |
| 25 | +- `pool_name` (required): The name of the worker pool. |
| 26 | +- `machine_type` (required): The machine type for worker nodes. |
| 27 | +- `workers_per_zone` (required): Number of worker nodes in each zone of the cluster. |
| 28 | +- `operating_system` (required): The operating system installed on the worker nodes. |
| 29 | +- `labels` (optional): A set of key-value labels assigned to the worker pool for identification. |
| 30 | +- `minSize` (optional): The minimum number of worker nodes allowed in the pool. |
| 31 | +- `maxSize` (optional): The maximum number of worker nodes allowed in the pool. |
| 32 | +- `secondary_storage` (optional): The secondary storage attached to the worker nodes. Secondary storage is immutable and can't be changed after provisioning. |
| 33 | +- `enableAutoscaling` (optional): Set `true` to enable automatic scaling of worker based on workload demand. |
| 34 | +- `additional_security_group_ids` (optional): A list of security group IDs that are attached to the worker nodes for additional network security controls. |
| 35 | + |
| 36 | +### Example for additional_worker_pools configuration |
| 37 | + |
| 38 | +```hcl |
| 39 | +[ |
| 40 | + { |
| 41 | + pool_name = "infra" |
| 42 | + machine_type = "gx3.16x80.l4" |
| 43 | + workers_per_zone = 2 |
| 44 | + secondary_storage = "300gb.5iops-tier" |
| 45 | + operating_system = "RHCOS" |
| 46 | + } |
| 47 | +] |
| 48 | +``` |
| 49 | + |
| 50 | +## Options with `addons` <a name="options-with-addons"></a> |
| 51 | + |
| 52 | +This variable configuration allows you to specify which Red Hat OpenShift add-ons to install on your cluster and the version of each add-on to use. |
| 53 | + |
| 54 | +- Variable name: `addons` |
| 55 | +- Type: An object representing Red Hat OpenShift cluster add-ons. |
| 56 | +- Default value: An empty object (`{}`). |
| 57 | + |
| 58 | +### Supported Add-ons |
| 59 | + |
| 60 | +- `debug-tool` (optional): (Object) The Debug Tool add-on helps diagnose and troubleshoot cluster issues by running tests and gathering information, accessible through the Red Hat OpenShift console. |
| 61 | + - `version` (optional): The add-on version. Omit the version that you want to use as the default version.This is required when you want to update the add-on to specified version. |
| 62 | + - `parameters_json` (optional): Add-On parameters to pass in a JSON string format. |
| 63 | + |
| 64 | +- `image-key-synchronizer` (optional): (Object) The Image Key Synchronizer add-on enables the deployment of containers using encrypted images by synchronizing image keys, ensuring only authorized users can access and run them. |
| 65 | + - `version` (optional): The add-on version. Omit the version that you want to use as the default version.This is required when you want to update the add-on to specified version. |
| 66 | + - `parameters_json` (optional): Add-On parameters to pass in a JSON string format. |
| 67 | + |
| 68 | +- `openshift-data-foundation` (optional): (Object) The Red Hat OpenShift Data Foundation (ODF) add-on manages persistent storage for containerized applications with a highly available storage solution. |
| 69 | + - `version` (optional): The add-on version. Omit the version that you want to use as the default version.This is required when you want to update the add-on to specified version. |
| 70 | + - `parameters_json` (optional): Add-On parameters to pass in a JSON string format. |
| 71 | + |
| 72 | +- `vpc-file-csi-driver` (optional): (Object) The Virtual Private Cloud File Container Storage Interface Driver add-on enables the creation of persistent volume claims for fast, flexible, network-attached, Network File System-based file storage for Virtual Private Cloud. |
| 73 | + - `version` (optional): The add-on version. Omit the version that you want to use as the default version.This is required when you want to update the add-on to specified version. |
| 74 | + - `parameters_json` (optional): Add-On parameters to pass in a JSON string format. |
| 75 | + |
| 76 | +- `static-route` (optional): (Object) The Static Route add-on allows worker nodes to re-route response packets through a virtual private network or gateway to an Internet Protocol (IP) address in an on-premises data center. |
| 77 | + - `version` (optional): The add-on version. Omit the version that you want to use as the default version.This is required when you want to update the add-on to specified version. |
| 78 | + - `parameters_json` (optional): Add-On parameters to pass in a JSON string format. |
| 79 | + |
| 80 | +- `cluster-autoscaler` (optional): (Object) The Cluster Autoscaler add-on automatically scales worker pools based on the resource demands of scheduled workloads. |
| 81 | + - `version` (optional): The add-on version. Omit the version that you want to use as the default version.This is required when you want to update the add-on to specified version. |
| 82 | + - `parameters_json` (optional): Add-On parameters to pass in a JSON string format. |
| 83 | + |
| 84 | +- `vpc-block-csi-driver` (optional): (Object) The Virtual Private Cloud (VPC) Block Container Storage Interface (CSI) Driver add-on enables snapshotting of storage volumes, allowing users to restore data from specific points in time without duplicating the volume. |
| 85 | + - `version` (optional): The add-on version. Omit the version that you want to use as the default version.This is required when you want to update the add-on to specified version. |
| 86 | + - `parameters_json` (optional): Add-On parameters to pass in a JSON string format. |
| 87 | + |
| 88 | +- `ibm-storage-operator` (optional): (Object) The IBM Storage Operator add-on streamlines the management of storage configuration maps and resources in your cluster. |
| 89 | + - `version` (optional): The add-on version. Omit the version that you want to use as the default version.This is required when you want to update the add-on to specified version. |
| 90 | + - `parameters_json` (optional): Add-On parameters to pass in a JSON string format. |
| 91 | + |
| 92 | +- `openshift-ai` (optional): (Object) The Red Hat OpenShift AI add-on enables quick deployment of Red Hat OpenShift AI on a Red Hat OpenShift Cluster in IBM Cloud. |
| 93 | + - `version` (optional): The add-on version. Omit the version that you want to use as the default version.This is required when you want to update the add-on to specified version. |
| 94 | + - `parameters_json` (optional): Add-On parameters to pass in a JSON string format. |
| 95 | + |
| 96 | +Please refer to [this](https://cloud.ibm.com/docs/containers?topic=containers-supported-cluster-addon-versions) page for information on supported add-ons and their versions. |
| 97 | + |
| 98 | +### Example for addons configuration |
| 99 | + |
| 100 | +```hcl |
| 101 | +{ |
| 102 | + openshift-data-foundation = { |
| 103 | + version = "4.17.0" |
| 104 | + parameters_json = <<PARAMETERS_JSON |
| 105 | + { |
| 106 | + "osdStorageClassName":"localblock", |
| 107 | + "odfDeploy":"true", |
| 108 | + "autoDiscoverDevices":"true" |
| 109 | + } |
| 110 | + PARAMETERS_JSON |
| 111 | + } |
| 112 | + vpc-file-csi-driver = { |
| 113 | + version = "2.0" |
| 114 | + } |
| 115 | +} |
| 116 | +``` |
| 117 | + |
| 118 | +## Options with `infra_node_selectors` <a name="options-with-infra"></a> |
| 119 | + |
| 120 | +This variable configuration allows you to specify a list of key-value pairs that define the node affinity for the Virtualization Operator resources within the cluster. |
| 121 | + |
| 122 | +- Variable name: `infra_node_selectors` |
| 123 | +- Type: A List objects representing infra node selectors. |
| 124 | + |
| 125 | +### Options for infra_node_selectors |
| 126 | + |
| 127 | +- `key` : The label key to match against on the node. |
| 128 | +- `values` : (List) The list of allowed values for the name label. |
| 129 | + |
| 130 | +### Example for infra_node_selectors configuration |
| 131 | + |
| 132 | +```hcl |
| 133 | +[{ |
| 134 | + key = "ibm-cloud.kubernetes.io/server-type" |
| 135 | + values = ["virtual", "physical"] |
| 136 | +}] |
| 137 | +``` |
| 138 | + |
| 139 | +## Options with `workloads_node_selectors` <a name="options-with-workload"></a> |
| 140 | + |
| 141 | +This variable configuration allows you to specify a list of key-value pairs that define the node affinity for the Virtualization VM workloads resources within the cluster. |
| 142 | + |
| 143 | +- Variable name: `workloads_node_selectors` |
| 144 | +- Type: A List objects representing workload node selectors. |
| 145 | + |
| 146 | +### Options for workloads_node_selectors |
| 147 | + |
| 148 | +- `key` : The label key to match against on the node. |
| 149 | +- `values` : (List) The list of allowed values for the name label. |
| 150 | + |
| 151 | +### Example for workloads_node_selectors configuration |
| 152 | + |
| 153 | +```hcl |
| 154 | +[{ |
| 155 | + key = "ibm-cloud.kubernetes.io/server-type" |
| 156 | + values = ["physical"] |
| 157 | +}] |
| 158 | +``` |
0 commit comments