Skip to content

Commit 2f339be

Browse files
authored
feat: support for managing ODF version based on the OCP version. <br>- Ability to edit subnets of the VPC addon DA <br><br>fixes: <br>- Retry operator failure when running reset_api_key (#712)
1 parent 868c5b0 commit 2f339be

File tree

5 files changed

+36
-12
lines changed

5 files changed

+36
-12
lines changed

ibm_catalog.json

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@
9292
},
9393
{
9494
"service_name": "is.vpc",
95-
"role_crns": ["crn:v1:bluemix:public:iam::::role:Administrator"],
96-
"notes": "Required for creating Virtual Private Cloud(VPC)."
95+
"role_crns": [
96+
"crn:v1:bluemix:public:iam::::role:Administrator"
97+
],
98+
"notes": "Required for creating Virtual Private Cloud(VPC)."
9799
},
98100
{
99101
"service_name": "cloud-object-storage",
@@ -140,7 +142,7 @@
140142
"role_crns": [
141143
"crn:v1:bluemix:public:iam::::serviceRole:Manager"
142144
],
143-
"notes": "[Optional] Required if you are consuming Observability deployable architecture which sets up Logs Routing."
145+
"notes": "[Optional] Required if you are consuming Observability deployable architecture which sets up Logs Routing."
144146
},
145147
{
146148
"service_name": "atracker",
@@ -271,7 +273,8 @@
271273
{
272274
"displayname": "cx2.16x32",
273275
"value": "cx2.16x32"
274-
},{
276+
},
277+
{
275278
"displayname": "cx2.32x64",
276279
"value": "cx2.32x64"
277280
},
@@ -367,7 +370,8 @@
367370
"displayname": "mx2d.metal.96x768 (Only available in Toronto (ca-tor))) ",
368371
"value": "mx2d.metal.96x768"
369372
},
370-
{ "displayname": "mx2.16x128.2000gb (Not available in Sao Paulo (br-sao), Montreal (ca-mon), Madrid (eu-es), Osaka (jp-osa))",
373+
{
374+
"displayname": "mx2.16x128.2000gb (Not available in Sao Paulo (br-sao), Montreal (ca-mon), Madrid (eu-es), Osaka (jp-osa))",
371375
"value": "mx2.16x128.2000gb"
372376
},
373377
{
@@ -726,6 +730,14 @@
726730
{
727731
"key": "skip_ocp_secrets_manager_iam_auth_policy"
728732
},
733+
{
734+
"key": "subnets",
735+
"type": "object",
736+
"default_value": "{\n zone-1 = [\n {\n name = \"subnet-a\"\n cidr = \"10.10.10.0/24\"\n public_gateway = true\n acl_name = \"vpc-acl\"\n no_addr_prefix = false\n }\n ],\n zone-2 = [\n {\n name = \"subnet-b\"\n cidr = \"10.20.10.0/24\"\n public_gateway = false\n acl_name = \"vpc-acl\"\n no_addr_prefix = false\n }\n ],\n zone-3 = [\n {\n name = \"subnet-c\"\n cidr = \"10.30.10.0/24\"\n public_gateway = false\n acl_name = \"vpc-acl\"\n no_addr_prefix = false\n }\n ]\n }",
737+
"description": "List of subnets for the vpc. For each item in each array, a subnet will be created. Items can be either CIDR blocks or total ipv4 addressess. Public gateways will be enabled only in zones where a gateway has been created. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/blob/main/solutions/fully-configurable/DA-types.md#subnets-).",
738+
"required": false,
739+
"virtual": true
740+
},
729741
{
730742
"key": "provider_visibility",
731743
"options": [
@@ -769,13 +781,18 @@
769781
"reference_version": true
770782
},
771783
{
772-
"dependency_input":"region",
773-
"version_input":"region",
784+
"dependency_input": "region",
785+
"version_input": "region",
774786
"reference_version": true
775787
},
776788
{
777789
"dependency_output": "vpc_crn",
778790
"version_input": "existing_vpc_crn"
791+
},
792+
{
793+
"dependency_input": "subnets",
794+
"version_input": "subnets",
795+
"reference_version": true
779796
}
780797
]
781798
},

modules/kube-audit/scripts/set_audit_log_policy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function apply_oc_patch() {
2727
else
2828
echo "Failed to apply patch. Retrying in ${RETRY_WAIT}s..."
2929
sleep $RETRY_WAIT
30-
((attempt++))
30+
attempt=$((attempt+1))
3131
RETRY_WAIT=$((RETRY_WAIT * 2))
3232
fi
3333
done

scripts/enable_disable_ocp_console.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function apply_oc_patch() {
2828
else
2929
echo "Failed to apply patch. Retrying in ${retry_wait_time}s..."
3030
sleep $retry_wait_time
31-
((attempt++))
31+
attempt=$((attempt+1))
3232
fi
3333
done
3434

@@ -50,7 +50,7 @@ function remove_oc_patch() {
5050
else
5151
echo "Failed to remove patch. Retrying in ${retry_wait_time}s..."
5252
sleep $retry_wait_time
53-
((attempt++))
53+
attempt=$((attempt+1))
5454
fi
5555
done
5656

scripts/reset_iks_api_key.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ if [ "${reset}" == true ]; then
107107
echo "ERROR:: FAILED TO RESET THE IAM API KEY"
108108
echo "$result"
109109
sleep $retry_wait_time
110-
((attempt++))
110+
attempt=$((attempt+1))
111111
fi
112112
# sleep for 10 secs to allow the new key to be replicated across backend DB instances before attempting to create cluster
113113
done

solutions/fully-configurable/main.tf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,13 @@ locals {
191191
additional_security_group_ids = pool.additional_security_group_ids
192192
subnet_prefix = "default"
193193
} if length(pool.vpc_subnets) == 0])
194+
195+
# Managing the ODF version accordingly, as it changes with each OCP version.
196+
addons = lookup(var.addons, "openshift-data-foundation", null) != null ? lookup(var.addons["openshift-data-foundation"], "version", null) == null ? { for key, value in var.addons :
197+
key => value != null ? {
198+
version = lookup(value, "version", null) == null && key == "openshift-data-foundation" ? "${var.ocp_version}.0" : lookup(value, "version", null)
199+
parameters_json = lookup(value, "parameters_json", null)
200+
} : null } : var.addons : var.addons
194201
}
195202

196203
module "ocp_base" {
@@ -210,7 +217,7 @@ module "ocp_base" {
210217
ocp_entitlement = var.ocp_entitlement
211218
additional_lb_security_group_ids = var.additional_lb_security_group_ids
212219
additional_vpe_security_group_ids = var.additional_vpe_security_group_ids
213-
addons = var.addons
220+
addons = local.addons
214221
allow_default_worker_pool_replacement = var.allow_default_worker_pool_replacement
215222
attach_ibm_managed_security_group = var.attach_ibm_managed_security_group
216223
cluster_config_endpoint_type = var.cluster_config_endpoint_type

0 commit comments

Comments
 (0)