Skip to content

Commit 79a7c22

Browse files
ocofaighargeiger
andauthored
fix(deps): bump to v3.2.1 of cloud pak deployer + add fix for helm upgrade issue (#51)
* fix(deps): bump to v3.2.1 of cpd * fix: day2 issues * fix: day2 issues * fix: day2 issues * SKIP UPGRADE TEST --------- Co-authored-by: Adam Geiger <ageiger@us.ibm.com>
1 parent cd1e7ea commit 79a7c22

File tree

9 files changed

+30
-25
lines changed

9 files changed

+30
-25
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module "watsonx_self_managed_ocp" {
3939
version = "X.X.X" # Replace "X.X.X" with a release version to lock into a specific release
4040
ibmcloud_api_key = "xxxxxxxxxxxxxxxxx" # pragma: allowlist secret
4141
cluster_name = "my-ocp-cluster"
42-
cluster_resource_group_id = "xxxxxxxxxxxxxxxxx"
42+
cluster_resource_group_id = "xxxxxxxxxxxxxxxxxx"
4343
cpd_admin_password = "XXXXXXXX"
4444
cpd_entitlement_key = "XXXXXXXX"
4545
}
@@ -100,8 +100,8 @@ For more information on access and permissions, see [IBM Cloud IAM service roles
100100
|------|-------------|------|---------|:--------:|
101101
| <a name="input_add_random_suffix_code_engine_project"></a> [add\_random\_suffix\_code\_engine\_project](#input\_add\_random\_suffix\_code\_engine\_project) | Whether to add a randomly generated 4-character suffix to the newly created Code Engine project. Only applies if `code_engine_project_id` is `null`. | `bool` | `true` | no |
102102
| <a name="input_add_random_suffix_icr_namespace"></a> [add\_random\_suffix\_icr\_namespace](#input\_add\_random\_suffix\_icr\_namespace) | Whether to add a randomly generated 4-character suffix to the newly created ICR namespace. | `bool` | `true` | no |
103-
| <a name="input_cloud_pak_deployer_image"></a> [cloud\_pak\_deployer\_image](#input\_cloud\_pak\_deployer\_image) | Cloud Pak Deployer image to use. If `null`, the image will be built using Code Engine and publish to a private Container Registry namespace. | `string` | `"quay.io/cloud-pak-deployer/cloud-pak-deployer:v3.1.8@sha256:e9cde204359a3014a3cee6a43c1e945a7dcb31d5fa92439326d4e5ab2191b48f"` | no |
104-
| <a name="input_cloud_pak_deployer_release"></a> [cloud\_pak\_deployer\_release](#input\_cloud\_pak\_deployer\_release) | The GIT release of Cloud Pak Deployer version to build from. Only applies if `cloud_pak_deployer_image` is `null`. View releases at: https://github.com/IBM/cloud-pak-deployer/releases. | `string` | `"v3.1.8"` | no |
103+
| <a name="input_cloud_pak_deployer_image"></a> [cloud\_pak\_deployer\_image](#input\_cloud\_pak\_deployer\_image) | Cloud Pak Deployer image to use. If `null`, the image will be built using Code Engine and publish to a private Container Registry namespace. | `string` | `"quay.io/cloud-pak-deployer/cloud-pak-deployer:v3.2.1@sha256:311952546b0cbec425435269e9a1e7d8a4230dbcde6f257d1bd80461cb82f284"` | no |
104+
| <a name="input_cloud_pak_deployer_release"></a> [cloud\_pak\_deployer\_release](#input\_cloud\_pak\_deployer\_release) | The GIT release of Cloud Pak Deployer version to build from. Only applies if `cloud_pak_deployer_image` is `null`. View releases at: https://github.com/IBM/cloud-pak-deployer/releases. | `string` | `"v3.2.1"` | no |
105105
| <a name="input_cloud_pak_deployer_secret"></a> [cloud\_pak\_deployer\_secret](#input\_cloud\_pak\_deployer\_secret) | Secret for accessing the Cloud Pak Deployer image. If `null`, a default secret will be created. | <pre>object({<br/> username = string<br/> password = string<br/> server = string<br/> email = string<br/> })</pre> | `null` | no |
106106
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name of an existing Red Hat OpenShift cluster to install watsonX onto | `string` | n/a | yes |
107107
| <a name="input_cluster_resource_group_id"></a> [cluster\_resource\_group\_id](#input\_cluster\_resource\_group\_id) | The resource group ID of the cluster provided in `cluster_name` | `string` | n/a | yes |
@@ -111,11 +111,11 @@ For more information on access and permissions, see [IBM Cloud IAM service roles
111111
| <a name="input_cpd_accept_license"></a> [cpd\_accept\_license](#input\_cpd\_accept\_license) | When set to 'true', it is understood that the user has read the terms of the Cloud Pak license(s) and agrees to the terms outlined. | `bool` | `true` | no |
112112
| <a name="input_cpd_admin_password"></a> [cpd\_admin\_password](#input\_cpd\_admin\_password) | Password for the Cloud Pak for Data admin user. | `string` | n/a | yes |
113113
| <a name="input_cpd_entitlement_key"></a> [cpd\_entitlement\_key](#input\_cpd\_entitlement\_key) | Cloud Pak for Data entitlement key for access to the IBM Entitled Registry. Can be fetched from https://myibm.ibm.com/products-services/containerlibrary. | `string` | n/a | yes |
114-
| <a name="input_cpd_version"></a> [cpd\_version](#input\_cpd\_version) | Cloud Pak for Data version to install. Only version 5.x.x is supported, latest versions can be found [here](https://www.ibm.com/docs/en/cloud-paks/cp-data?topic=versions-cloud-pak-data). | `string` | `"5.0.3"` | no |
114+
| <a name="input_cpd_version"></a> [cpd\_version](#input\_cpd\_version) | Cloud Pak for Data version to install. Only version 5.x.x is supported, latest versions can be found [here](https://www.ibm.com/docs/en/cloud-paks/cp-data?topic=versions-cloud-pak-data). | `string` | `"5.1.3"` | no |
115115
| <a name="input_ibmcloud_api_key"></a> [ibmcloud\_api\_key](#input\_ibmcloud\_api\_key) | The IBM Cloud API key to deploy resources. | `string` | n/a | yes |
116116
| <a name="input_install_odf_cluster_addon"></a> [install\_odf\_cluster\_addon](#input\_install\_odf\_cluster\_addon) | Install the ODF cluster add-on. | `bool` | `true` | no |
117-
| <a name="input_odf_config"></a> [odf\_config](#input\_odf\_config) | Configuration for the ODF addon. Only applies if `install_odf_cluster_addon` is true. | `map(string)` | <pre>{<br/> "addSingleReplicaPool": "false",<br/> "billingType": "essentials",<br/> "clusterEncryption": "false",<br/> "disableNoobaaLB": "false",<br/> "enableNFS": "false",<br/> "encryptionInTransit": "false",<br/> "hpcsBaseUrl": "",<br/> "hpcsEncryption": "false",<br/> "hpcsInstanceId": "",<br/> "hpcsSecretName": "",<br/> "hpcsServiceName": "",<br/> "hpcsTokenUrl": "",<br/> "ignoreNoobaa": "true",<br/> "numOfOsd": "1",<br/> "ocsUpgrade": "false",<br/> "odfDeploy": "true",<br/> "osdDevicePaths": "",<br/> "osdSize": "512Gi",<br/> "osdStorageClassName": "ibmc-vpc-block-metro-10iops-tier",<br/> "prepareForDisasterRecovery": "false",<br/> "resourceProfile": "balanced",<br/> "taintNodes": "false",<br/> "useCephRBDAsDefaultStorageClass": "false",<br/> "workerNodes": "all",<br/> "workerPool": ""<br/>}</pre> | no |
118-
| <a name="input_odf_version"></a> [odf\_version](#input\_odf\_version) | Version of OpenShift Data Foundation (ODF) add-on to install. Only applies if `install_odf_cluster_addon` is true. | `string` | `"4.16.0"` | no |
117+
| <a name="input_odf_config"></a> [odf\_config](#input\_odf\_config) | Configuration for the ODF addon. Only applies if `install_odf_cluster_addon` is true. | `map(string)` | <pre>{<br/> "addSingleReplicaPool": "false",<br/> "billingType": "essentials",<br/> "clusterEncryption": "false",<br/> "disableNoobaaLB": "false",<br/> "enableNFS": "false",<br/> "encryptionInTransit": "false",<br/> "hpcsBaseUrl": "",<br/> "hpcsEncryption": "false",<br/> "hpcsInstanceId": "",<br/> "hpcsSecretName": "",<br/> "hpcsServiceName": "",<br/> "hpcsTokenUrl": "",<br/> "ignoreNoobaa": "true",<br/> "numOfOsd": "1",<br/> "ocsUpgrade": "false",<br/> "odfDeploy": "true",<br/> "osdDevicePaths": "",<br/> "osdSize": "512Gi",<br/> "osdStorageClassName": "ibmc-vpc-block-metro-10iops-tier",<br/> "resourceProfile": "balanced",<br/> "taintNodes": "false",<br/> "useCephRBDAsDefaultStorageClass": "false",<br/> "workerNodes": "all",<br/> "workerPool": ""<br/>}</pre> | no |
118+
| <a name="input_odf_version"></a> [odf\_version](#input\_odf\_version) | Version of OpenShift Data Foundation (ODF) add-on to install. Only applies if `install_odf_cluster_addon` is true. | `string` | `"4.18.0"` | no |
119119
| <a name="input_region"></a> [region](#input\_region) | Region where Code Engine and Container Registry resources will be provisioned. Only applies if `cloud_pak_deployer_image` is `null`. To use the 'Global' Container Registry location set `use_global_container_registry_location` to true. | `string` | `"us-south"` | no |
120120
| <a name="input_resource_group_id"></a> [resource\_group\_id](#input\_resource\_group\_id) | The ID of the resource group where Code Engine and Container Registry resources will be provisioned. Only applies if `cloud_pak_deployer_image` is `null`. If not set, Default resource group will be used. | `string` | `null` | no |
121121
| <a name="input_use_global_container_registry_location"></a> [use\_global\_container\_registry\_location](#input\_use\_global\_container\_registry\_location) | Set to true to create the Container Registry namespace in the 'Global' location. If set to false, the namespace will be created in the region provided in the `region` input value. Only applies if `cloud_pak_deployer_image` is `null`. | `bool` | `false` | no |

chart/cloud-pak-deployer/templates/install-job.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ spec:
7575
- '/cloud-pak-deployer/cp-deploy.sh vault set -vs cp4d_admin_cpd_{{ .Values.cluster_name }} -vsv {{ .Values.deployer.admin_password }} && /cloud-pak-deployer/cp-deploy.sh env apply -vvvv {{ .Values.deployer.accept_license_flag }}'
7676
resources:
7777
limits:
78+
cpu: 500m
79+
memory: 768Mi
80+
requests:
7881
cpu: 250m
7982
memory: 512Mi
80-
requests:
81-
cpu: 100m
82-
memory: 256Mi
8383
serviceAccount: {{ .Values.deployer.prefix }}-sa
8484
volumes:
8585
- name: config-volume

chart/cloud-pak-deployer/templates/pvc.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
{{ $pvcName := printf "%s-%s" .Values.deployer.prefix "status" }}
12
apiVersion: v1
23
kind: PersistentVolumeClaim
34
metadata:
4-
name: {{ .Values.deployer.prefix }}-status
5+
name: {{ $pvcName }}
56
namespace: {{ .Values.namespace }}
67
spec:
78
accessModes:
@@ -11,3 +12,6 @@ spec:
1112
storage: 10Gi
1213
storageClassName: ibmc-vpc-block-10iops-tier
1314
volumeMode: Filesystem
15+
{{- if (lookup "v1" "PersistentVolumeClaim" .Values.namespace $pvcName) }}
16+
volumeName: {{ (lookup "v1" "PersistentVolumeClaim" .Values.namespace $pvcName).spec.volumeName }}
17+
{{- end }}

modules/cloud-pak-deployer/variables.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ variable "cloud_pak_deployer_secret" {
2020
default = null
2121
}
2222

23-
2423
variable "cluster_name" {
2524
description = "Name of Red Hat OpenShift cluster to install watsonx onto"
2625
type = string

scripts/wait_for_cpd_pod.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
set -e
55
NAMESPACE="cloud-pak-deployer"
6-
POD_NAME=$(kubectl get pods -n "${NAMESPACE}" -o jsonpath='{.items[0].metadata.name}')
6+
POD_NAME=$(kubectl get pods --sort-by=.metadata.creationTimestamp -n "${NAMESPACE}" -o jsonpath='{.items[-1].metadata.name}')
77
STATUS=""
88
while true; do
99
STATUS=$(kubectl get pod "${POD_NAME}" -n "${NAMESPACE}" -o jsonpath='{.status.phase}')

solutions/fully-configurable/variables.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ variable "prefix" {
4949
variable "cloud_pak_deployer_image" {
5050
description = "Cloud Pak Deployer image to use. If `null`, the image will be built using Code Engine and publish to a private Container Registry namespace."
5151
type = string
52-
default = "quay.io/cloud-pak-deployer/cloud-pak-deployer:v3.1.8@sha256:e9cde204359a3014a3cee6a43c1e945a7dcb31d5fa92439326d4e5ab2191b48f"
52+
# TODO: update renovate to manage this version
53+
default = "quay.io/cloud-pak-deployer/cloud-pak-deployer:v3.2.1@sha256:311952546b0cbec425435269e9a1e7d8a4230dbcde6f257d1bd80461cb82f284"
5354
}
5455

5556
variable "existing_cluster_id" {
@@ -97,7 +98,7 @@ variable "cpd_entitlement_key" {
9798
variable "cpd_version" {
9899
description = "Cloud Pak for Data version to install. Only version 5.x.x is supported, latest versions can be found [here](https://www.ibm.com/docs/en/cloud-paks/cp-data?topic=versions-cloud-pak-data)."
99100
type = string
100-
default = "5.0.3"
101+
default = "5.1.3"
101102

102103
validation {
103104
error_message = "Cloud pak for data major version 5 is supported."
@@ -152,7 +153,7 @@ variable "install_odf_cluster_addon" {
152153
variable "odf_version" {
153154
description = "Version of ODF to install."
154155
type = string
155-
default = "4.16.0"
156+
default = "4.18.0"
156157
validation {
157158
error_message = "ODF version must be in the format 'x.y.z'."
158159
condition = can(regex("^[0-9]+\\.[0-9]+\\.[0-9]+$", var.odf_version))
@@ -185,7 +186,6 @@ variable "odf_config" {
185186
"addSingleReplicaPool" = "false"
186187
"ignoreNoobaa" = "true"
187188
"disableNoobaaLB" = "false"
188-
"prepareForDisasterRecovery" = "false"
189189
"useCephRBDAsDefaultStorageClass" = "false"
190190
"osdDevicePaths" = ""
191191
"taintNodes" = "false"
@@ -239,5 +239,5 @@ variable "code_engine_project_id" {
239239
variable "cloud_pak_deployer_release" {
240240
description = "The GIT release of Cloud Pak Deployer version to build from. Only applies if `cloud_pak_deployer_image` is `null`. View releases at: https://github.com/IBM/cloud-pak-deployer/releases."
241241
type = string
242-
default = "v3.1.8" # TODO: manage this version with renovate - https://github.com/terraform-ibm-modules/terraform-ibm-watsonx-self-managed-ocp/issues/36
242+
default = "v3.2.1" # TODO: manage this version with renovate - https://github.com/terraform-ibm-modules/terraform-ibm-watsonx-self-managed-ocp/issues/36
243243
}

tests/pr_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ func TestRunFullyConfigurableUpgradeSolution(t *testing.T) {
196196
Testing: t,
197197
TerraformDir: instanceFlavorDir,
198198
// Do not hard fail the test if the implicit destroy steps fail to allow a full destroy of resource to occur
199-
ImplicitRequired: false,
199+
ImplicitRequired: false,
200+
CheckApplyResultForUpgrade: true,
200201
TerraformVars: map[string]any{
201202
"prefix": prefix,
202203
"region": region,

tests/resources/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ locals {
6363
pool_name = "default" # ibm_container_vpc_cluster automatically names default pool "default" (See https://github.com/IBM-Cloud/terraform-provider-ibm/issues/2849)
6464
machine_type = "bx2.16x64"
6565
workers_per_zone = 3 # Minimum 3 workers to install ODF and ensure high availability
66-
operating_system = "REDHAT_8_64"
66+
operating_system = "RHCOS"
6767
}
6868
]
6969
}
7070

7171
module "ocp_base" {
7272
source = "terraform-ibm-modules/base-ocp-vpc/ibm"
73-
version = "3.50.3"
73+
version = "3.51.2"
7474
resource_group_id = module.resource_group.resource_group_id
7575
region = var.region
7676
tags = var.resource_tags
@@ -81,4 +81,5 @@ module "ocp_base" {
8181
worker_pools = local.worker_pools
8282
access_tags = []
8383
disable_outbound_traffic_protection = true
84+
ocp_version = "4.18"
8485
}

variables.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ variable "ibmcloud_api_key" {
1111
variable "cloud_pak_deployer_image" {
1212
description = "Cloud Pak Deployer image to use. If `null`, the image will be built using Code Engine and publish to a private Container Registry namespace."
1313
type = string
14-
default = "quay.io/cloud-pak-deployer/cloud-pak-deployer:v3.1.8@sha256:e9cde204359a3014a3cee6a43c1e945a7dcb31d5fa92439326d4e5ab2191b48f"
14+
# TODO: update renovate to manage this version
15+
default = "quay.io/cloud-pak-deployer/cloud-pak-deployer:v3.2.1@sha256:311952546b0cbec425435269e9a1e7d8a4230dbcde6f257d1bd80461cb82f284"
1516
}
1617

1718
variable "cluster_name" {
@@ -56,7 +57,7 @@ variable "cpd_entitlement_key" {
5657
variable "cpd_version" {
5758
description = "Cloud Pak for Data version to install. Only version 5.x.x is supported, latest versions can be found [here](https://www.ibm.com/docs/en/cloud-paks/cp-data?topic=versions-cloud-pak-data)."
5859
type = string
59-
default = "5.0.3"
60+
default = "5.1.3"
6061

6162
validation {
6263
error_message = "Cloud pak for data major version 5 is supported."
@@ -110,7 +111,7 @@ variable "install_odf_cluster_addon" {
110111
variable "odf_version" {
111112
description = "Version of OpenShift Data Foundation (ODF) add-on to install. Only applies if `install_odf_cluster_addon` is true."
112113
type = string
113-
default = "4.16.0"
114+
default = "4.18.0"
114115
}
115116

116117
variable "odf_config" {
@@ -138,7 +139,6 @@ variable "odf_config" {
138139
"addSingleReplicaPool" = "false"
139140
"ignoreNoobaa" = "true"
140141
"disableNoobaaLB" = "false"
141-
"prepareForDisasterRecovery" = "false"
142142
"useCephRBDAsDefaultStorageClass" = "false"
143143
"osdDevicePaths" = ""
144144
"taintNodes" = "false"
@@ -193,7 +193,7 @@ variable "code_engine_project_id" {
193193
variable "cloud_pak_deployer_release" {
194194
description = "The GIT release of Cloud Pak Deployer version to build from. Only applies if `cloud_pak_deployer_image` is `null`. View releases at: https://github.com/IBM/cloud-pak-deployer/releases."
195195
type = string
196-
default = "v3.1.8" # TODO: manage this version with renovate - https://github.com/terraform-ibm-modules/terraform-ibm-watsonx-self-managed-ocp/issues/36
196+
default = "v3.2.1" # TODO: manage this version with renovate - https://github.com/terraform-ibm-modules/terraform-ibm-watsonx-self-managed-ocp/issues/36
197197
}
198198

199199
variable "add_random_suffix_icr_namespace" {

0 commit comments

Comments
 (0)