Skip to content

Commit bbcc1b0

Browse files
authored
feat: exposed the ability to attach secondary storage to workers using new input variable secondary_storage (#691)
1 parent ac1e236 commit bbcc1b0

File tree

11 files changed

+191
-128
lines changed

11 files changed

+191
-128
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ module "cluster_pattern" {
902902
|------|-------------|------|---------|:--------:|
903903
| <a name="input_appid"></a> [appid](#input\_appid) | The App ID instance to be used for the teleport vsi deployments | <pre>object({<br> name = optional(string)<br> resource_group = optional(string)<br> use_data = optional(bool)<br> keys = optional(list(string))<br> use_appid = bool<br> })</pre> | <pre>{<br> "use_appid": false<br>}</pre> | no |
904904
| <a name="input_atracker"></a> [atracker](#input\_atracker) | atracker variables | <pre>object({<br> resource_group = string<br> receive_global_events = bool<br> collector_bucket_name = string<br> add_route = bool<br> })</pre> | n/a | yes |
905-
| <a name="input_clusters"></a> [clusters](#input\_clusters) | A list describing clusters workloads to create | <pre>list(<br> object({<br> name = string # Name of Cluster<br> vpc_name = string # Name of VPC<br> subnet_names = list(string) # List of vpc subnets for cluster<br> workers_per_subnet = number # Worker nodes per subnet.<br> machine_type = string # Worker node flavor<br> kube_type = string # iks or openshift<br> kube_version = optional(string) # Can be a version from `ibmcloud ks versions`, `latest` or `default`<br> entitlement = optional(string) # entitlement option for openshift<br> pod_subnet = optional(string) # Portable subnet for pods<br> service_subnet = optional(string) # Portable subnet for services<br> resource_group = string # Resource Group used for cluster<br> cos_name = optional(string) # Name of COS instance Required only for OpenShift clusters<br> update_all_workers = optional(bool) # If true force workers to update<br> access_tags = optional(list(string), [])<br> boot_volume_crk_name = optional(string) # Boot volume encryption key name<br> kms_config = optional(<br> object({<br> crk_name = string # Name of key<br> private_endpoint = optional(bool) # Private endpoint<br> })<br> )<br> worker_pools = optional(<br> list(<br> object({<br> name = string # Worker pool name<br> vpc_name = string # VPC name<br> workers_per_subnet = number # Worker nodes per subnet<br> flavor = string # Worker node flavor<br> subnet_names = list(string) # List of vpc subnets for worker pool<br> entitlement = optional(string) # entitlement option for openshift<br> boot_volume_crk_name = optional(string) # Boot volume encryption key name<br> })<br> )<br> )<br> })<br> )</pre> | n/a | yes |
905+
| <a name="input_clusters"></a> [clusters](#input\_clusters) | A list describing clusters workloads to create | <pre>list(<br> object({<br> name = string # Name of Cluster<br> vpc_name = string # Name of VPC<br> subnet_names = list(string) # List of vpc subnets for cluster<br> workers_per_subnet = number # Worker nodes per subnet.<br> machine_type = string # Worker node flavor<br> kube_type = string # iks or openshift<br> kube_version = optional(string) # Can be a version from `ibmcloud ks versions`, `latest` or `default`<br> entitlement = optional(string) # entitlement option for openshift<br> secondary_storage = optional(string) # Secondary storage type<br> pod_subnet = optional(string) # Portable subnet for pods<br> service_subnet = optional(string) # Portable subnet for services<br> resource_group = string # Resource Group used for cluster<br> cos_name = optional(string) # Name of COS instance Required only for OpenShift clusters<br> update_all_workers = optional(bool) # If true force workers to update<br> access_tags = optional(list(string), [])<br> boot_volume_crk_name = optional(string) # Boot volume encryption key name<br> kms_config = optional(<br> object({<br> crk_name = string # Name of key<br> private_endpoint = optional(bool) # Private endpoint<br> })<br> )<br> worker_pools = optional(<br> list(<br> object({<br> name = string # Worker pool name<br> vpc_name = string # VPC name<br> workers_per_subnet = number # Worker nodes per subnet<br> flavor = string # Worker node flavor<br> subnet_names = list(string) # List of vpc subnets for worker pool<br> entitlement = optional(string) # entitlement option for openshift<br> secondary_storage = optional(string) # Secondary storage type<br> boot_volume_crk_name = optional(string) # Boot volume encryption key name<br> })<br> )<br> )<br> })<br> )</pre> | n/a | yes |
906906
| <a name="input_cos"></a> [cos](#input\_cos) | Object describing the cloud object storage instance, buckets, and keys. Set `use_data` to false to create instance | <pre>list(<br> object({<br> name = string<br> use_data = optional(bool)<br> resource_group = string<br> plan = optional(string)<br> random_suffix = optional(bool) # Use a random suffix for COS instance<br> access_tags = optional(list(string), [])<br> buckets = list(object({<br> name = string<br> storage_class = string<br> endpoint_type = string<br> force_delete = bool<br> single_site_location = optional(string)<br> region_location = optional(string)<br> cross_region_location = optional(string)<br> kms_key = optional(string)<br> access_tags = optional(list(string), [])<br> allowed_ip = optional(list(string))<br> hard_quota = optional(number)<br> archive_rule = optional(object({<br> days = number<br> enable = bool<br> rule_id = optional(string)<br> type = string<br> }))<br> expire_rule = optional(object({<br> days = optional(number)<br> date = optional(string)<br> enable = bool<br> expired_object_delete_marker = optional(string)<br> prefix = optional(string)<br> rule_id = optional(string)<br> }))<br> activity_tracking = optional(object({<br> activity_tracker_crn = string<br> read_data_events = bool<br> write_data_events = bool<br> }))<br> metrics_monitoring = optional(object({<br> metrics_monitoring_crn = string<br> request_metrics_enabled = optional(bool)<br> usage_metrics_enabled = optional(bool)<br> }))<br> }))<br> keys = optional(<br> list(object({<br> name = string<br> role = string<br> enable_HMAC = bool<br> }))<br> )<br><br> })<br> )</pre> | n/a | yes |
907907
| <a name="input_enable_transit_gateway"></a> [enable\_transit\_gateway](#input\_enable\_transit\_gateway) | Create transit gateway | `bool` | `true` | no |
908908
| <a name="input_f5_template_data"></a> [f5\_template\_data](#input\_f5\_template\_data) | Data for all f5 templates | <pre>object({<br> tmos_admin_password = optional(string)<br> license_type = optional(string)<br> byol_license_basekey = optional(string)<br> license_host = optional(string)<br> license_username = optional(string)<br> license_password = optional(string)<br> license_pool = optional(string)<br> license_sku_keyword_1 = optional(string)<br> license_sku_keyword_2 = optional(string)<br> license_unit_of_measure = optional(string)<br> do_declaration_url = optional(string)<br> as3_declaration_url = optional(string)<br> ts_declaration_url = optional(string)<br> phone_home_url = optional(string)<br> template_source = optional(string)<br> template_version = optional(string)<br> app_id = optional(string)<br> tgactive_url = optional(string)<br> tgstandby_url = optional(string)<br> tgrefresh_url = optional(string)<br> })</pre> | <pre>{<br> "license_type": "none"<br>}</pre> | no |

cluster.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ resource "ibm_container_vpc_cluster" "cluster" {
5858
tags = var.tags
5959
wait_till = var.wait_till
6060
entitlement = each.value.entitlement
61+
secondary_storage = each.value.secondary_storage
6162
cos_instance_crn = each.value.cos_instance_crn
6263
pod_subnet = each.value.pod_subnet
6364
service_subnet = each.value.service_subnet
@@ -116,6 +117,7 @@ resource "ibm_container_vpc_worker_pool" "pool" {
116117
entitlement = each.value.entitlement
117118
cluster = ibm_container_vpc_cluster.cluster[each.value.cluster_name].id
118119
worker_pool_name = each.value.name
120+
secondary_storage = each.value.secondary_storage
119121
flavor = each.value.flavor
120122
worker_count = each.value.workers_per_subnet
121123
crk = each.value.boot_volume_crk_name == null ? null : regex("key:(.*)", module.key_management.key_map[each.value.boot_volume_crk_name].crn)[0]

dynamic_values/cluster.tf

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,22 @@ module "ut_cluster_map" {
2121
prefix = "ut"
2222
clusters = [
2323
{
24-
name = "test-cluster"
25-
vpc_name = "test"
26-
subnet_names = ["subnet-1", "subnet-3"]
27-
resource_group = "test-resource-group"
28-
kube_type = "openshift"
29-
cos_name = "data-cos"
30-
entitlement = "cloud_pak"
24+
name = "test-cluster"
25+
vpc_name = "test"
26+
subnet_names = ["subnet-1", "subnet-3"]
27+
resource_group = "test-resource-group"
28+
kube_type = "openshift"
29+
cos_name = "data-cos"
30+
entitlement = "cloud_pak"
31+
secondary_storage = "300gb.5iops-tier"
3132
worker_pools = [
3233
{
3334
name = "logging-worker-pool"
3435
vpc_name = "test"
3536
subnet_names = ["subnet-1", "subnet-3"]
3637
workers_per_subnet = 2
3738
flavor = "spicy"
39+
secondary_storage = "300gb.5iops-tier"
3840
}
3941
]
4042
}

dynamic_values/cluster_worker_pools.tf

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,22 @@ module "ut_worker_pools" {
2020
prefix = "ut"
2121
clusters = [
2222
{
23-
name = "test-cluster"
24-
vpc_name = "test"
25-
subnet_names = ["subnet-1", "subnet-3"]
26-
resource_group = "test-resource-group"
27-
kube_type = "openshift"
28-
cos_name = "data-cos"
29-
entitlement = "cloud_pak"
23+
name = "test-cluster"
24+
vpc_name = "test"
25+
subnet_names = ["subnet-1", "subnet-3"]
26+
resource_group = "test-resource-group"
27+
kube_type = "openshift"
28+
cos_name = "data-cos"
29+
entitlement = "cloud_pak"
30+
secondary_storage = "300gb.5iops-tier"
3031
worker_pools = [
3132
{
3233
name = "logging-worker-pool"
3334
vpc_name = "test"
3435
subnet_names = ["subnet-1", "subnet-3"]
3536
workers_per_subnet = 2
3637
flavor = "spicy"
38+
secondary_storage = "300gb.5iops-tier"
3739
}
3840
]
3941
}
@@ -84,14 +86,15 @@ module "ut_cluster_no_worker_pools" {
8486
prefix = "ut"
8587
clusters = [
8688
{
87-
name = "test-cluster"
88-
vpc_name = "test"
89-
subnet_names = ["subnet-1", "subnet-3"]
90-
resource_group = "test-resource-group"
91-
kube_type = "openshift"
92-
cos_name = "data-cos"
93-
entitlement = "cloud_pak"
94-
worker_pools = null
89+
name = "test-cluster"
90+
vpc_name = "test"
91+
subnet_names = ["subnet-1", "subnet-3"]
92+
resource_group = "test-resource-group"
93+
kube_type = "openshift"
94+
cos_name = "data-cos"
95+
entitlement = "cloud_pak"
96+
secondary_storage = "300gb.5iops-tier"
97+
worker_pools = null
9598
}
9699
]
97100
vpc_modules = {}

examples/override-example/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This example demonstrates how to configure the landing zone module by using an `
55
The example deploys the following infrastructure:
66

77
- An edge VPC with 1 VSI in one of the three subnets and a VPC load balancer in the edge VPC, exposing the VSI publicly.
8+
- Deploys identical clusters across the VSI subnet tier in each VPC
89
- A jump server VSI in the management VPC, exposing a public floating IP address.
910

1011
:exclamation: **Important:** This example shows how to customize the topology with a JSON configuration file. The topology is not highly available or validated for the IBM Cloud Framework for Financial Services.

0 commit comments

Comments
 (0)