You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# To verify rhcos operating system exists only for OCP versions >=4.15
62
66
# tflint-ignore: terraform_unused_declarations
63
-
cluster_rhcos_validation=local.default_pool.operating_system==local.os_rhel|| local.rhcos_allowed_ocp_version?true:tobool("RHCOS requires VPC clusters created from 4.15 onwards. Upgraded clusters from 4.14 cannot use RHCOS")
67
+
cluster_rhcos_validation=contains([local.os_rhel9, local.os_rhel], local.default_pool.operating_system)|| local.rhcos_allowed_ocp_version?true:tobool("RHCOS requires VPC clusters created from 4.15 onwards. Upgraded clusters from 4.14 cannot use RHCOS")
64
68
65
69
# tflint-ignore: terraform_unused_declarations
66
70
worker_pool_rhcos_validation=alltrue(local.worker_pool_rhcos_entry) ?true:tobool("RHCOS requires VPC clusters created from 4.15 onwards. Upgraded clusters from 4.14 cannot use RHCOS")
67
71
68
72
# Validate if default worker pool's operating system is RHEL, all pools' operating system must be RHEL
valid_rhel_worker_pools=local.check_other_os|| (local.default_pool.operating_system==local.os_rhel&&alltrue(local.rhel_check_for_all_standalone_pools))==true?true:tobool("Choosing RHEL for the default worker pool will limit all additional worker pools to RHEL.")
77
+
valid_rhel_worker_pools=local.default_pool.operating_system== local.os_rhcos|| (contains([local.os_rhel, local.os_rhel9], local.default_pool.operating_system)&&alltrue(local.rhel_check_for_all_standalone_pools)) ?true:tobool("Choosing RHEL for the default worker pool will limit all additional worker pools to RHEL.")
74
78
75
79
# Validate if RHCOS is used as operating system for the cluster then the default worker pool must be created with RHCOS
Copy file name to clipboardExpand all lines: variables.tf
+14-3Lines changed: 14 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -106,11 +106,22 @@ variable "worker_pools" {
106
106
condition=alltrue([
107
107
forworker_poolinvar.worker_pools:
108
108
anytrue([
109
-
worker_pool.operating_system=="REDHAT_8_64",
110
-
worker_pool.operating_system=="RHCOS"
109
+
worker_pool.operating_system==local.os_rhel9,
110
+
worker_pool.operating_system==local.os_rhel,
111
+
worker_pool.operating_system==local.os_rhcos
111
112
])
112
113
])
113
-
error_message="RHEL 8 (REDHAT_8_64) or Red Hat Enterprise Linux CoreOS (RHCOS) are the allowed OS values. RHCOS requires VPC clusters created from 4.15 onwards. Upgraded clusters from 4.14 cannot use RHCOS."
114
+
error_message="RHEL 9 (RHEL_9_64), RHEL 8 (REDHAT_8_64) or Red Hat Enterprise Linux CoreOS (RHCOS) are the allowed OS values. RHCOS requires VPC clusters created from 4.15 onwards. Upgraded clusters from 4.14 cannot use RHCOS."
error_message="Invalid operating system for the given OCP version. Ensure the OS is compatible with the OCP version. Supported compatible OCP version and OS are v4.14: (REDHAT_8_64); v4.15: (REDHAT_8_64, RHCOS) ; v4.16 and v4.17: (REDHAT_8_64, RHCOS, RHEL_9_64)"
0 commit comments