From 6783f001a9c7fc908fff80d0cdd1a7703a3dc518 Mon Sep 17 00:00:00 2001 From: Denilson Nastacio Date: Tue, 2 Apr 2024 17:58:42 -0400 Subject: [PATCH] fix: Upgrade CP4D to 4.8.4 Signed-off-by: Denilson Nastacio --- README.md | 2 +- config/argocd-cloudpaks/cp4d/Chart.yaml | 4 +- config/argocd-cloudpaks/cp4d/values.yaml | 2 +- config/cloudpaks/cp4d/Chart.yaml | 2 +- .../templates/0401-postsync-certificates.yaml | 104 ------------------ 5 files changed, 5 insertions(+), 109 deletions(-) delete mode 100644 config/cloudpaks/cp4d/templates/0401-postsync-certificates.yaml diff --git a/README.md b/README.md index 45c1cad2..2ddd5051 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Supported versions: | Cloud Pak | Version | Installation mode | | ----------|---------|-------------------| | Cloud Pak for Business Automation | [23.0.2](https://www.ibm.com/docs/en/cloud-paks/cp-biz-automation/23.0.2) | Multi-pattern starter deployment | -| Cloud Pak for Data | [4.8.2](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.8.x?topic=overview) | Online, specialized installation | +| Cloud Pak for Data | [4.8.4](https://www.ibm.com/docs/en/cloud-paks/cp-data/4.8.x?topic=overview) | Online, specialized installation | | Cloud Pak for Integration | [2023.4](https://www.ibm.com/docs/en/cloud-paks/cp-integration/2023.4) | Online installation | | Cloud Pak for Security | [1.10.15](https://www.ibm.com/docs/en/cloud-paks/cp-security/1.10) | Online installation | | Cloud Pak for AIOps\* | [4.3.0](https://www.ibm.com/docs/en/cloud-paks/cloud-pak-watson-aiops/4.3.0) | Starter Installation | diff --git a/config/argocd-cloudpaks/cp4d/Chart.yaml b/config/argocd-cloudpaks/cp4d/Chart.yaml index c4932ce1..0a93811a 100644 --- a/config/argocd-cloudpaks/cp4d/Chart.yaml +++ b/config/argocd-cloudpaks/cp4d/Chart.yaml @@ -16,9 +16,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.8.2 +version: 0.8.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: "1.5.2" +appVersion: "1.5.3" diff --git a/config/argocd-cloudpaks/cp4d/values.yaml b/config/argocd-cloudpaks/cp4d/values.yaml index b0edecfe..7e267ebe 100644 --- a/config/argocd-cloudpaks/cp4d/values.yaml +++ b/config/argocd-cloudpaks/cp4d/values.yaml @@ -23,4 +23,4 @@ image_arch: "" # image_arch: .s390x # image_arch: .ppc64le -version: 4.8.2 +version: 4.8.4 diff --git a/config/cloudpaks/cp4d/Chart.yaml b/config/cloudpaks/cp4d/Chart.yaml index ae3c2d02..98f9b949 100644 --- a/config/cloudpaks/cp4d/Chart.yaml +++ b/config/cloudpaks/cp4d/Chart.yaml @@ -21,4 +21,4 @@ version: 0.8.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 4.8.2 +appVersion: 4.8.4 diff --git a/config/cloudpaks/cp4d/templates/0401-postsync-certificates.yaml b/config/cloudpaks/cp4d/templates/0401-postsync-certificates.yaml deleted file mode 100644 index ab99b770..00000000 --- a/config/cloudpaks/cp4d/templates/0401-postsync-certificates.yaml +++ /dev/null @@ -1,104 +0,0 @@ ---- -# https://www.ibm.com/docs/en/cloud-paks/cp-data/4.8.x?topic=environment-customizing-securing-route-platform -apiVersion: batch/v1 -kind: Job -metadata: - annotations: - argocd.argoproj.io/hook: PostSync - argocd.argoproj.io/sync-wave: "401" - name: post-cp4d-adjust-certsf - namespace: openshift-gitops -spec: - template: - spec: - containers: - - name: config - image: "icr.io/cpopen/cpd/olm-utils-v2:{{.Values.version}}{{.Values.image_arch}}" - imagePullPolicy: IfNotPresent - env: - - name: PROJECT_CPD_INST_OPERANDS - value: {{.Values.metadata.operands_namespace}} - command: - - /bin/sh - - -c - - | - set -eo pipefail - set -x - - export KUBECONFIG=/tmp/kubeconfig - api_url=$(oc get Infrastructure cluster -o jsonpath='{.status.apiServerURL}') - oc login "${api_url}" --token="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" --insecure-skip-tls-verify \ - || { - echo "WARNING: Unable to configure external certificate." - exit 0 - } - - secret_found=0 - oc get secret cpd-tls-secret \ - -n "${PROJECT_CPD_INST_OPERANDS}" 2> /dev/null \ - && secret_found=1 \ - || secret_found=0 - - if [ "${secret_found}" -eq 1 ]; then - echo "INFO: External secret already set." - exit 0 - fi - - result=0 - ingress_secret_name=$(oc get ingresscontroller.operator default \ - --namespace openshift-ingress-operator \ - -o jsonpath='{.spec.defaultCertificate.name}') || result=1 - - if [ -n "${ingress_secret_name}" ] && [ "${result}" -eq 0 ]; then - oc extract secret/${ingress_secret_name} \ - -n openshift-ingress \ - --keys=tls.crt,tls.key \ - --confirm \ - && sed -n `sed -n '/END CERTIFICATE/=' tls.crt | head -1`',$p' tls.crt | tail -n +2 > ca.crt \ - && sed -i '/END/q' tls.crt \ - && oc delete secret cpd-tls-secret \ - -n "${PROJECT_CPD_INST_OPERANDS}" \ - --ignore-not-found=true \ - && oc create secret generic cpd-tls-secret \ - --from-file=tls.crt=tls.crt \ - --from-file=tls.key=tls.key \ - --from-file=ca.crt=ca.crt \ - -n "${PROJECT_CPD_INST_OPERANDS}" \ - && oc get route -l component=ibm-nginx \ - -n "${PROJECT_CPD_INST_OPERANDS}" \ - -o 'jsonpath={.items[0].spec.host}{" "}{.items[0].spec.tls.termination}{" "}{.items[0].metadata.name}' \ - && oc get route -l component=ibm-nginx \ - -n "${PROJECT_CPD_INST_OPERANDS}" \ - && sed -i "/bin\/bash/a set -x" bin/setup-route \ - && bin/setup-route \ - --cpd_instance_ns="${PROJECT_CPD_INST_OPERANDS}" \ - --route_type=passthrough \ - --route_secret=cpd-tls-secret \ - && echo "INFO: Configured CPD route." \ - || result=1 - - if [ ${result} -eq 1 ]; then - echo "WARNING: Failed to configure CPD route. Attempting to recover." \ - && ocp_domain=$(oc get ingress.config.openshift.io cluster -o jsonpath={.spec.domain}) \ - && bin/setup-route \ - --cpd_instance_ns="${PROJECT_CPD_INST_OPERANDS}" \ - --route_type=passthrough \ - --route_secret=cpd-tls-secret \ - --custom_hostname=cpd-${PROJECT_CPD_INST_OPERANDS}.${ocp_domain} \ - && result=0 \ - && echo "INFO: Configured CPD route on second attempt." \ - || { - echo "ERROR: External secret not set." - oc delete secret cpd-tls-secret \ - -n "${PROJECT_CPD_INST_OPERANDS}" \ - --ignore-not-found=true - result=1 - } - fi - fi - - exit ${result} - - restartPolicy: Never - serviceAccountName: {{.Values.serviceaccount.argocd_application_controller}} - backoffLimit: 1