Skip to content

Commit a10425b

Browse files
authored
feat: support removed for deprecated OCP versions 4.12 and 4.13 (#589)
1 parent 2c98ea7 commit a10425b

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

examples/advanced/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ module "ocp_base" {
171171
# Enable if using worker autoscaling. Stops Terraform managing worker count.
172172
ignore_worker_pool_size_changes = true
173173
addons = {
174-
"cluster-autoscaler" = "1.2.1"
174+
"cluster-autoscaler" = "1.2.3"
175175
}
176176
kms_config = {
177177
instance_id = module.kp_all_inclusive.kms_guid

main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ locals {
4444
cluster_security_groups = var.attach_ibm_managed_security_group == true ? (var.custom_security_group_ids == null ? null : concat(["cluster"], var.custom_security_group_ids)) : (var.custom_security_group_ids == null ? null : var.custom_security_group_ids)
4545

4646
# for versions older than 4.15, this value must be null, or provider gives error
47-
disable_outbound_traffic_protection = startswith(local.ocp_version, "4.12") || startswith(local.ocp_version, "4.13") || startswith(local.ocp_version, "4.14") ? null : var.disable_outbound_traffic_protection
47+
disable_outbound_traffic_protection = startswith(local.ocp_version, "4.14") ? null : var.disable_outbound_traffic_protection
4848
}
4949

5050
# Separate local block to handle os validations
@@ -286,7 +286,7 @@ data "ibm_iam_account_settings" "iam_account_settings" {
286286

287287
resource "null_resource" "reset_api_key" {
288288
provisioner "local-exec" {
289-
command = "${path.module}/scripts/reset_iks_api_key.sh ${var.region} ${var.resource_group_id} ${var.use_private_endpoint} ${var.ocp_version == "4.13" && var.disable_public_endpoint ? "vpe" : var.cluster_config_endpoint_type}" # private only cluster on 4.13 will use VPE endpoint.
289+
command = "${path.module}/scripts/reset_iks_api_key.sh ${var.region} ${var.resource_group_id} ${var.use_private_endpoint} ${var.cluster_config_endpoint_type}"
290290
interpreter = ["/bin/bash", "-c"]
291291
environment = {
292292
IAM_TOKEN = data.ibm_iam_auth_token.reset_api_key_tokendata.iam_access_token

tests/other_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
func TestRunBasicExample(t *testing.T) {
1212
t.Parallel()
1313

14-
options := setupOptions(t, "base-ocp", basicExampleDir, ocpVersion6)
14+
options := setupOptions(t, "base-ocp", basicExampleDir, ocpVersion4)
1515

1616
output, err := options.RunTestConsistency()
1717

@@ -139,7 +139,7 @@ func TestCrossKmsSupportExample(t *testing.T) {
139139
"kms_instance_guid": permanentResources["kp_us_south_guid"],
140140
"kms_key_id": permanentResources["kp_us_south_root_key_id"],
141141
"kms_cross_account_id": permanentResources["ge_ops_account_id"],
142-
"ocp_version": ocpVersion5,
142+
"ocp_version": ocpVersion3,
143143
},
144144
ImplicitDestroy: []string{
145145
// workaround for the issue https://github.ibm.com/GoldenEye/issues/issues/10743

tests/pr_test.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ const yamlLocation = "../common-dev-assets/common-go-assets/common-permanent-res
2929
// Ensure there is one test per supported OCP version
3030
const ocpVersion1 = "4.17" // used by TestRunUpgradeAdvancedExample , TestFSCloudInSchematic and TestRunMultiClusterExample
3131
const ocpVersion2 = "4.16" // used by TestCustomSGExample and TestRunCustomsgExample
32-
const ocpVersion3 = "4.15" // used by TestRunAdvancedExample
33-
const ocpVersion4 = "4.14" // used by TestRunAddRulesToSGExample
34-
const ocpVersion5 = "4.13" // used by TestCrossKmsSupportExample
35-
const ocpVersion6 = "4.12" // used by TestRunBasicExample
32+
const ocpVersion3 = "4.15" // used by TestRunAdvancedExample and TestCrossKmsSupportExample
33+
const ocpVersion4 = "4.14" // used by TestRunAddRulesToSGExample and TestRunBasicExample
3634

3735
var sharedInfoSvc *cloudinfo.CloudInfoService
3836
var permanentResources map[string]interface{}

variables.tf

-2
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ variable "ocp_version" {
183183
condition = anytrue([
184184
var.ocp_version == null,
185185
var.ocp_version == "default",
186-
var.ocp_version == "4.12",
187-
var.ocp_version == "4.13",
188186
var.ocp_version == "4.14",
189187
var.ocp_version == "4.15",
190188
var.ocp_version == "4.16",

0 commit comments

Comments
 (0)