From 0d2a52561637ead5f8ce09b82878d396d280c935 Mon Sep 17 00:00:00 2001 From: Denilson Nastacio Date: Wed, 12 Jul 2023 23:02:59 -0400 Subject: [PATCH] feat: Upgrade Cloud Pak for WAIOps to 4.1.0 Signed-off-by: Denilson Nastacio --- .../0050-sync-common-service-maps.yaml | 1 - config/argocd-cloudpaks/cp4waiops/Chart.yaml | 4 +- .../templates/000-emgr-namespace.yaml | 9 -- .../templates/020-cloudpaks-aimgr-role.yaml | 17 ++- .../templates/020-cloudpaks-emgr-role.yaml | 23 ---- .../021-cloudpaks-aimgr-binding.yaml | 3 - .../templates/021-cloudpaks-emgr-binding.yaml | 21 --- .../templates/100-cp4waiops-app.yaml | 8 -- .../templates/110-cp4waiops-aimgr-app.yaml | 7 - .../templates/120-cp4waiops-emgr-app.yaml | 69 ---------- .../templates/130-cp4waiops-ia-app.yaml | 6 +- config/argocd-cloudpaks/cp4waiops/values.yaml | 6 +- .../cp4waiops/install-aimgr/Chart.yaml | 4 +- .../000-presync-adjust-parameters.yaml | 22 ---- .../resources/0020-common-services-roles.yaml | 44 +++++++ .../0030-common-services-role-bindings.yaml | 34 +++++ .../resources/010-presync-patch-iaf.yaml | 103 --------------- .../templates/resources/200-ai-manager.yaml | 30 ++--- .../220-sync-check-ai-readiness.yaml | 87 ------------ .../resources/230-postsync-certificates.yaml | 101 ++++++++++++++ .../resources/230-sync-certificates.yaml | 85 ------------ .../subscriptions/030-sync-prereqs.yaml | 10 -- .../subscriptions/100-subscription.yaml | 6 +- .../110-sync-check-all-csvs.yaml | 18 ++- .../cp4waiops/install-aimgr/values.yaml | 2 - .../cp4waiops/install-emgr/.helmignore | 21 --- .../cp4waiops/install-emgr/Chart.yaml | 24 ---- .../000-presync-adjust-parameters.yaml | 87 ------------ .../resources/210-event-manager.yaml | 124 ------------------ .../resources/220-sync-check-emgr-group.yaml | 63 --------- .../subscriptions/020-argocd-emgr-role.yaml | 17 --- .../020-cloudpaks-emgr-cluster-role.yaml | 17 --- .../021-argocd-role-binding.yaml | 18 --- .../021-cloudpaks-emgr-binding.yaml | 17 --- .../subscriptions/030-sync-prereqs.yaml | 87 ------------ .../subscriptions/050-operator-group.yaml | 11 -- .../subscriptions/100-subscription.yaml | 16 --- .../110-sync-check-all-csvs.yaml | 65 --------- .../cp4waiops/install-emgr/values.yaml | 15 --- .../cloudpaks/cp4waiops/install-ia/Chart.yaml | 4 +- .../000-presync-adjust-parameters.yaml | 5 +- .../templates/resources/200-ia-config.yaml | 1 + .../subscriptions/100-subscription.yaml | 2 +- .../cp4waiops/install-ia/values.yaml | 1 + tests/postbuild/cluster.sh | 2 +- tests/prebuild/yamllint-config.yaml | 7 - 46 files changed, 233 insertions(+), 1091 deletions(-) delete mode 100644 config/argocd-cloudpaks/cp4waiops/templates/000-emgr-namespace.yaml delete mode 100644 config/argocd-cloudpaks/cp4waiops/templates/020-cloudpaks-emgr-role.yaml delete mode 100644 config/argocd-cloudpaks/cp4waiops/templates/021-cloudpaks-emgr-binding.yaml delete mode 100644 config/argocd-cloudpaks/cp4waiops/templates/120-cp4waiops-emgr-app.yaml create mode 100644 config/cloudpaks/cp4waiops/install-aimgr/templates/resources/0020-common-services-roles.yaml create mode 100644 config/cloudpaks/cp4waiops/install-aimgr/templates/resources/0030-common-services-role-bindings.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-aimgr/templates/resources/010-presync-patch-iaf.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-aimgr/templates/resources/220-sync-check-ai-readiness.yaml create mode 100644 config/cloudpaks/cp4waiops/install-aimgr/templates/resources/230-postsync-certificates.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-aimgr/templates/resources/230-sync-certificates.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/.helmignore delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/Chart.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/templates/resources/000-presync-adjust-parameters.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/templates/resources/210-event-manager.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/templates/resources/220-sync-check-emgr-group.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/020-argocd-emgr-role.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/020-cloudpaks-emgr-cluster-role.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/021-argocd-role-binding.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/021-cloudpaks-emgr-binding.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/030-sync-prereqs.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/050-operator-group.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/100-subscription.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/110-sync-check-all-csvs.yaml delete mode 100644 config/cloudpaks/cp4waiops/install-emgr/values.yaml diff --git a/config/argocd-cloudpaks/cp-shared/templates/0050-sync-common-service-maps.yaml b/config/argocd-cloudpaks/cp-shared/templates/0050-sync-common-service-maps.yaml index 36cb7cbe..e11d0ced 100644 --- a/config/argocd-cloudpaks/cp-shared/templates/0050-sync-common-service-maps.yaml +++ b/config/argocd-cloudpaks/cp-shared/templates/0050-sync-common-service-maps.yaml @@ -54,7 +54,6 @@ spec: - map-to-common-service-namespace: {{.Values.dedicated_cs.namespace_mapping.cp4waiops}} requested-from-namespace: - {{.Values.dedicated_cs.namespace_mapping.cp4waiops}} - - {{.Values.dedicated_cs.namespace_mapping.cp4waiops}}-emgr EOF else echo "INFO: ConfigMap common-service-maps already exists." diff --git a/config/argocd-cloudpaks/cp4waiops/Chart.yaml b/config/argocd-cloudpaks/cp4waiops/Chart.yaml index b24ec68c..5888dbd4 100644 --- a/config/argocd-cloudpaks/cp4waiops/Chart.yaml +++ b/config/argocd-cloudpaks/cp4waiops/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.0 +version: 0.9.0 # 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: "0.14.0" +appVersion: "0.15.0" diff --git a/config/argocd-cloudpaks/cp4waiops/templates/000-emgr-namespace.yaml b/config/argocd-cloudpaks/cp4waiops/templates/000-emgr-namespace.yaml deleted file mode 100644 index cc0fffa3..00000000 --- a/config/argocd-cloudpaks/cp4waiops/templates/000-emgr-namespace.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - creationTimestamp: null - labels: {} - name: "{{.Values.metadata.argocd_app_namespace}}-emgr" -spec: {} -status: {} diff --git a/config/argocd-cloudpaks/cp4waiops/templates/020-cloudpaks-aimgr-role.yaml b/config/argocd-cloudpaks/cp4waiops/templates/020-cloudpaks-aimgr-role.yaml index 4fd3ba5a..e113341e 100644 --- a/config/argocd-cloudpaks/cp4waiops/templates/020-cloudpaks-aimgr-role.yaml +++ b/config/argocd-cloudpaks/cp4waiops/templates/020-cloudpaks-aimgr-role.yaml @@ -1,5 +1,3 @@ -{{- $aimgr := .Values.modules.aimgr }} -{{- if eq ( default false $aimgr ) true }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role @@ -20,15 +18,18 @@ rules: - apiGroups: [""] resources: ["serviceaccounts"] verbs: ["get", "list", "create", "update", "patch"] - - apiGroups: ["ai-manager.watson-aiops.ibm.com", "ai.ir.aiops.ibm.com", "asm.ibm.com", "base.automation.ibm.com", "connectors.aiops.ibm.com", "consoleui.aiops.ibm.com", "core.ir.aiops.ibm.com", "lifecycle.ir.aiops.ibm.com","orchestrator.aiops.ibm.com"] + - apiGroups: ["orchestrator.aiops.ibm.com"] resources: ["*"] verbs: ["get", "list", "watch"] - - apiGroups: ["core.automation.ibm.com"] - resources: ["automationuiconfigs"] - verbs: ["get", "list", "patch"] - apiGroups: ["project.openshift.io"] resources: ["projects"] verbs: ["get"] + - apiGroups: ["operators.coreos.com"] + resources: ["clusterserviceversions"] + verbs: ["list"] + - apiGroups: ["operator.ibm.com"] + resources: ["operandrequests"] + verbs: ["get", "list"] - apiGroups: ["operator.openshift.io"] resources: ["ingresscontrollers"] verbs: ["get"] @@ -38,4 +39,6 @@ rules: - apiGroups: ["apps"] resources: ["deployments"] verbs: ["get", "list", "patch", "watch"] -{{- end }} + - apiGroups: ["zen.cpd.ibm.com"] + resources: ["zenservices"] + verbs: ["get", "list", "patch", "watch"] diff --git a/config/argocd-cloudpaks/cp4waiops/templates/020-cloudpaks-emgr-role.yaml b/config/argocd-cloudpaks/cp4waiops/templates/020-cloudpaks-emgr-role.yaml deleted file mode 100644 index 8d3275d3..00000000 --- a/config/argocd-cloudpaks/cp4waiops/templates/020-cloudpaks-emgr-role.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- $emgr := .Values.modules.emgr }} -{{- if eq ( default false $emgr ) true }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - annotations: - argocd.argoproj.io/sync-options: "Replace=true" - argocd.argoproj.io/sync-wave: "20" - creationTimestamp: null - name: ibm-waiops-emgr-role - namespace: "{{.Values.metadata.argocd_app_namespace}}-emgr" -rules: - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "create", "update", "patch", "delete"] - - apiGroups: [""] - resources: ["serviceaccounts"] - verbs: ["get", "list", "create", "update", "patch", "delete"] - - apiGroups: ["cem.ibm.com"] - resources: ["cemformations"] - verbs: ["get"] -{{- end }} diff --git a/config/argocd-cloudpaks/cp4waiops/templates/021-cloudpaks-aimgr-binding.yaml b/config/argocd-cloudpaks/cp4waiops/templates/021-cloudpaks-aimgr-binding.yaml index a5490bed..51aec1d8 100644 --- a/config/argocd-cloudpaks/cp4waiops/templates/021-cloudpaks-aimgr-binding.yaml +++ b/config/argocd-cloudpaks/cp4waiops/templates/021-cloudpaks-aimgr-binding.yaml @@ -1,5 +1,3 @@ -{{- $aimgr := .Values.modules.aimgr }} -{{- if eq ( default false $aimgr ) true }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding @@ -17,4 +15,3 @@ subjects: - kind: ServiceAccount name: "{{.Values.serviceaccount.ibm_cloudpaks_installer}}" namespace: "{{.Values.metadata.argocd_namespace}}" -{{- end }} diff --git a/config/argocd-cloudpaks/cp4waiops/templates/021-cloudpaks-emgr-binding.yaml b/config/argocd-cloudpaks/cp4waiops/templates/021-cloudpaks-emgr-binding.yaml deleted file mode 100644 index f8ac1fb0..00000000 --- a/config/argocd-cloudpaks/cp4waiops/templates/021-cloudpaks-emgr-binding.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- $emgr := .Values.modules.emgr }} -{{- if eq ( default false $emgr ) true }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - annotations: - argocd.argoproj.io/sync-wave: "21" - argocd.argoproj.io/sync-options: "Replace=true" - creationTimestamp: null - name: ibm-waiops-emgr-binding - namespace: "{{.Values.metadata.argocd_app_namespace}}-emgr" -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: ibm-waiops-emgr-role -subjects: - - kind: ServiceAccount - name: "{{.Values.serviceaccount.ibm_cloudpaks_installer}}" - namespace: "{{.Values.metadata.argocd_namespace}}" -{{- end }} diff --git a/config/argocd-cloudpaks/cp4waiops/templates/100-cp4waiops-app.yaml b/config/argocd-cloudpaks/cp4waiops/templates/100-cp4waiops-app.yaml index b5b06bdd..3892e18e 100644 --- a/config/argocd-cloudpaks/cp4waiops/templates/100-cp4waiops-app.yaml +++ b/config/argocd-cloudpaks/cp4waiops/templates/100-cp4waiops-app.yaml @@ -27,18 +27,10 @@ spec: value: ${ARGOCD_APP_NAME} - name: argocd_app_namespace value: ${ARGOCD_APP_NAMESPACE} - - name: automation_base_instance_name - value: "{{.Values.automation_base_instance_name}}" - - name: automation_ui_config_instance_name - value: "{{.Values.automation_ui_config_instance_name}}" - name: cluster_domain value: "{{.Values.cluster_domain}}" - name: metadata.argocd_app_namespace value: {{.Values.metadata.argocd_app_namespace}} - - name: modules.aimgr - value: "{{.Values.modules.aimgr}}" - - name: modules.emgr - value: "{{.Values.modules.emgr}}" - name: modules.ia value: "{{.Values.modules.ia}}" - name: repoURL diff --git a/config/argocd-cloudpaks/cp4waiops/templates/110-cp4waiops-aimgr-app.yaml b/config/argocd-cloudpaks/cp4waiops/templates/110-cp4waiops-aimgr-app.yaml index d0e1833a..26236f95 100644 --- a/config/argocd-cloudpaks/cp4waiops/templates/110-cp4waiops-aimgr-app.yaml +++ b/config/argocd-cloudpaks/cp4waiops/templates/110-cp4waiops-aimgr-app.yaml @@ -1,5 +1,3 @@ -{{- $aimgr := .Values.modules.aimgr }} -{{- if eq ( default false $aimgr ) true }} --- apiVersion: argoproj.io/v1alpha1 kind: Application @@ -36,10 +34,6 @@ spec: value: ${ARGOCD_APP_NAME} - name: argocd_app_namespace value: ${ARGOCD_APP_NAMESPACE} - - name: automation_base_instance_name - value: {{.Values.automation_base_instance_name}} - - name: automation_ui_config_instance_name - value: {{.Values.metadata.automation_ui_config_instance_name}} - name: metadata.argocd_app_namespace value: {{.Values.metadata.argocd_app_namespace}} - name: repoURL @@ -68,4 +62,3 @@ status: source: repoURL: "" status: "" -{{- end }} diff --git a/config/argocd-cloudpaks/cp4waiops/templates/120-cp4waiops-emgr-app.yaml b/config/argocd-cloudpaks/cp4waiops/templates/120-cp4waiops-emgr-app.yaml deleted file mode 100644 index 78872589..00000000 --- a/config/argocd-cloudpaks/cp4waiops/templates/120-cp4waiops-emgr-app.yaml +++ /dev/null @@ -1,69 +0,0 @@ -{{- $emgr := .Values.modules.emgr }} -{{- if eq ( default false $emgr ) true }} ---- -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - creationTimestamp: null - name: cp4waiops-emgr - namespace: openshift-gitops - annotations: - argocd.argoproj.io/sync-wave: "120" -spec: - destination: - namespace: "{{.Values.metadata.argocd_app_namespace}}-emgr" - server: https://kubernetes.default.svc - ignoreDifferences: - - group: argoproj.io - jsonPointers: - - /spec/source/repoURL - - /spec/source/targetRevision - - /status - kind: Application - - group: noi.ibm.com - jsonPointers: - - /spec/clusterDomain - kind: noi - - group: v1 - jsonPointers: - - /metadata/labels - kind: Namespace - project: default - source: - helm: - parameters: - - name: argocd_app_name - value: ${ARGOCD_APP_NAME} - - name: argocd_app_namespace - value: ${ARGOCD_APP_NAMESPACE} - - name: cluster_domain - value: {{.Values.cluster_domain}} - - name: metadata.argocd_app_namespace - value: "{{.Values.metadata.argocd_app_namespace}}-emgr" - - name: repoURL - value: ${ARGOCD_APP_SOURCE_REPO_URL} - - name: serviceaccount.argocd_application_controller - value: {{.Values.serviceaccount.argocd_application_controller}} - - name: storageclass.rwo - value: {{.Values.storageclass.rwo}} - - name: storageclass.rwx - value: {{.Values.storageclass.rwx}} - - name: targetRevision - value: ${ARGOCD_APP_SOURCE_TARGET_REVISION} - path: config/cloudpaks/cp4waiops/install-emgr - repoURL: {{.Values.repoURL}} - targetRevision: {{.Values.targetRevision}} - syncPolicy: - automated: - prune: true - selfHeal: true -status: - health: {} - summary: {} - sync: - comparedTo: - destination: {} - source: - repoURL: "" - status: "" -{{- end }} diff --git a/config/argocd-cloudpaks/cp4waiops/templates/130-cp4waiops-ia-app.yaml b/config/argocd-cloudpaks/cp4waiops/templates/130-cp4waiops-ia-app.yaml index 4af32761..1785adff 100644 --- a/config/argocd-cloudpaks/cp4waiops/templates/130-cp4waiops-ia-app.yaml +++ b/config/argocd-cloudpaks/cp4waiops/templates/130-cp4waiops-ia-app.yaml @@ -1,5 +1,5 @@ -{{- $ia := .Values.modules.ia }} -{{- if eq ( default false $ia ) true }} +{{- $ia := .Values.modules.ia | toString }} +{{- if eq ( default "false" $ia ) "true" }} --- apiVersion: argoproj.io/v1alpha1 kind: Application @@ -38,6 +38,8 @@ spec: value: ${ARGOCD_APP_SOURCE_REPO_URL} - name: serviceaccount.argocd_application_controller value: {{.Values.serviceaccount.argocd_application_controller}} + - name: storageclass.rwo + value: {{.Values.storageclass.rwo}} - name: storageclass.rwx value: {{.Values.storageclass.rwx}} - name: targetRevision diff --git a/config/argocd-cloudpaks/cp4waiops/values.yaml b/config/argocd-cloudpaks/cp4waiops/values.yaml index ffe36eec..e244c6bf 100644 --- a/config/argocd-cloudpaks/cp4waiops/values.yaml +++ b/config/argocd-cloudpaks/cp4waiops/values.yaml @@ -1,8 +1,6 @@ --- repoURL: https://github.com/IBM/cloudpak-gitops targetRevision: main -automation_base_instance_name: "" -automation_ui_config_instance_name: "" cluster_domain: "" serviceaccount: argocd_application_controller: openshift-gitops-argocd-application-controller @@ -14,6 +12,4 @@ storageclass: rwo: ocs-storagecluster-ceph-rbd rwx: ocs-storagecluster-cephfs modules: - aimgr: true - emgr: true - ia: false + ia: "false" diff --git a/config/cloudpaks/cp4waiops/install-aimgr/Chart.yaml b/config/cloudpaks/cp4waiops/install-aimgr/Chart.yaml index 59b805bd..f912d577 100644 --- a/config/cloudpaks/cp4waiops/install-aimgr/Chart.yaml +++ b/config/cloudpaks/cp4waiops/install-aimgr/Chart.yaml @@ -13,9 +13,9 @@ description: Cloud Pak for Watson AIOps - AI Manager # pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application -version: 0.14.2 +version: 0.15.0 # 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: 3.7.2 +appVersion: 4.1.0 diff --git a/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/000-presync-adjust-parameters.yaml b/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/000-presync-adjust-parameters.yaml index 11dfe1e0..6074763c 100644 --- a/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/000-presync-adjust-parameters.yaml +++ b/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/000-presync-adjust-parameters.yaml @@ -38,14 +38,6 @@ spec: cluster_domain=$(oc get configmap argocd-cp4waiops-config \ --namespace "${ARGOCD_NAMESPACE}" -o jsonpath='{.data.cluster_domain}') - automation_base_instance_name="$(oc get AutomationBase.base.automation.ibm.com --namespace "${TARGET_NAMESPACE}" -o jsonpath='{.items[].metadata.name}' 2> /dev/null)" \ - && reuse_iaf_ab=1 \ - || reuse_iaf_ab=0 - - automation_ui_config_instance_name="$(oc get AutomationUIConfig.core.automation.ibm.com --namespace "${TARGET_NAMESPACE}" -o jsonpath='{.items[].metadata.name}' 2> /dev/null)" \ - && reuse_iaf_ui=1 \ - || reuse_iaf_ui=0 - echo "INFO: Install Argo CLI." # Install it from cluster, not from Internet, so airgap scenarios still work argo_route=openshift-gitops-server @@ -73,20 +65,6 @@ spec: && echo "INFO: ${app_name} successfully updated storage classes." \ || result=1 fi - if [ "${reuse_iaf_ab}" -eq 1 ] && [ -n "${automation_base_instance_name}" ]; then - echo "INFO: Patching IAF instances for ${app_name}." \ - && "${argo_cmd}" app set "${app_name}" \ - --helm-set-string automation_base_instance_name="${automation_base_instance_name}" \ - && echo "INFO: ${app_name} successfully updated IAF AutomationBase instance names." \ - || result=1 - fi - if [ "${reuse_iaf_ui}" -eq 1 ] && [ -n "${automation_ui_config_instance_name}" ]; then - echo "INFO: Patching IAF instances for ${app_name}." \ - && "${argo_cmd}" app set "${app_name}" \ - --helm-set-string automation_ui_config_instance_name="${automation_ui_config_instance_name}" \ - && echo "INFO: ${app_name} successfully updated IAF instance names." \ - || result=1 - fi done fi diff --git a/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/0020-common-services-roles.yaml b/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/0020-common-services-roles.yaml new file mode 100644 index 00000000..67980a15 --- /dev/null +++ b/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/0020-common-services-roles.yaml @@ -0,0 +1,44 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + annotations: + argocd.argoproj.io/sync-wave: "21" + creationTimestamp: null + name: common-services-cp4waiops-role + namespace: ibm-common-services +rules: + - apiGroups: [""] + resources: ["secrets"] + verbs: ["get", "list", "create", "delete"] + - apiGroups: ["apps"] + resources: ["deployments"] + verbs: ["get", "list", "patch", "watch"] + - apiGroups: ["certmanager.k8s.io"] + resources: ["certificates"] + verbs: ["get", "list", "delete"] + - apiGroups: ["operator.ibm.com"] + resources: ["managementingresses"] + verbs: ["get", "list", "patch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + annotations: + argocd.argoproj.io/sync-wave: "21" + creationTimestamp: null + name: common-services-cp4waiops-role + namespace: {{.Values.metadata.argocd_app_namespace}} +rules: + - apiGroups: [""] + resources: ["secrets"] + verbs: ["get", "list", "create", "delete"] + - apiGroups: ["apps"] + resources: ["deployments"] + verbs: ["get", "list", "patch", "watch"] + - apiGroups: ["certmanager.k8s.io"] + resources: ["certificates"] + verbs: ["get", "list", "delete"] + - apiGroups: ["operator.ibm.com"] + resources: ["managementingresses"] + verbs: ["get", "list", "patch"] diff --git a/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/0030-common-services-role-bindings.yaml b/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/0030-common-services-role-bindings.yaml new file mode 100644 index 00000000..c1846b94 --- /dev/null +++ b/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/0030-common-services-role-bindings.yaml @@ -0,0 +1,34 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + annotations: + argocd.argoproj.io/sync-wave: "30" + creationTimestamp: null + name: common-services-cp4waiops-binding + namespace: ibm-common-services +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: common-services-cp4waiops-role +subjects: + - kind: ServiceAccount + name: {{.Values.serviceaccount.ibm_cloudpaks_installer}} + namespace: {{.Values.metadata.argocd_namespace}} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + annotations: + argocd.argoproj.io/sync-wave: "30" + creationTimestamp: null + name: common-services-cp4waiops-binding + namespace: {{.Values.metadata.argocd_app_namespace}} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: common-services-cp4waiops-role +subjects: + - kind: ServiceAccount + name: {{.Values.serviceaccount.ibm_cloudpaks_installer}} + namespace: {{.Values.metadata.argocd_namespace}} diff --git a/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/010-presync-patch-iaf.yaml b/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/010-presync-patch-iaf.yaml deleted file mode 100644 index 37e17059..00000000 --- a/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/010-presync-patch-iaf.yaml +++ /dev/null @@ -1,103 +0,0 @@ ---- -apiVersion: batch/v1 -kind: Job -metadata: - annotations: - argocd.argoproj.io/sync-wave: "11" - argocd.argoproj.io/hook: PreSync - name: pre-cp4waiops-patch-shared-iaf - namespace: openshift-gitops -spec: - template: - spec: - containers: - - name: config - image: quay.io/openshift/origin-cli:latest - imagePullPolicy: IfNotPresent - env: - - name: ARGOCD_NAMESPACE - value: "openshift-gitops" - - name: TARGET_NAMESPACE - value: "{{.Values.metadata.argocd_app_namespace}}" - command: - - /bin/sh - - -c - - | - set -eo pipefail - set -x - - result=0 - - automation_base_instance_name="" - automation_base_class=$(oc api-resources --api-group=base.automation.ibm.com -o name | wc -l) \ - || result=1 - - if [ ${result} -eq 0 ] && [ ! "${automation_base_class}" == "0" ]; then - automation_base_instance_name="$(oc get AutomationBase.base.automation.ibm.com \ - --namespace "${TARGET_NAMESPACE}" \ - -o jsonpath='{.items[].metadata.name}' \ - --ignore-not-found=true)" \ - || result=1 - fi - - storage_class_rwx="$(oc get configmap argocd-cp4waiops-config \ - --namespace "${ARGOCD_NAMESPACE}" \ - -o jsonpath='{.data.storageclass\.rwx}' \ - --ignore-not-found=false)" \ - || result=1 - - if [ -z "${automation_base_instance_name}" ]; then - echo "INFO: Did not find an existing instance of AutomationBase in the namespace." - else - echo "INFO: Found an existing instance of AutomationBase in the namespace." - abase_params=$(oc get AutomationBase.base.automation.ibm.com "${automation_base_instance_name}" --namespace ${TARGET_NAMESPACE} -o jsonpath='{.spec}' --ignore-not-found=true) \ - || result=1 - - if [[ ! ${abase_params} == *aiops* ]]; then - echo "INFO: Patching it with AIOps requirements." - app_patch=/tmp/patch.json - cat< "${app_patch}" - [ - { - "op": "add", - "path": "/spec/elasticsearch/nodegroupspecs/0", - "value": { - "config": [ - { - "key": "node.master", - "value": "true" - }, - { - "key": "node.data", - "value": "true" - } - ], - "name": "aiops", - "replicas": 3, - "storage": { - "class": "${storage_class_rwx}", - } - } - }, - { - "op": "replace", - "path": "/spec/zen", - "value": true - } - ] - EOF - - oc patch AutomationBase.base.automation.ibm.com "${automation_base_instance_name}" \ - --namespace "${TARGET_NAMESPACE}" \ - --output yaml \ - --patch-file "${app_patch}" \ - --type=json \ - || result=0 - fi - fi - - exit ${result} - - restartPolicy: Never - serviceAccountName: {{.Values.serviceaccount.ibm_cloudpaks_installer}} - backoffLimit: 2 diff --git a/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/200-ai-manager.yaml b/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/200-ai-manager.yaml index b8d4b120..498569e1 100644 --- a/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/200-ai-manager.yaml +++ b/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/200-ai-manager.yaml @@ -8,27 +8,19 @@ metadata: name: ibm-cp-watson-aiops namespace: "{{.Values.metadata.argocd_app_namespace}}" spec: -{{ if or (not ( eq ( default "" .Values.automation_base_instance_name ) "" )) (not ( eq ( default "" .Values.automation_ui_config_instance_name ) "" )) }} - automationFoundation: - {{ if not ( eq ( default "" .Values.automation_base_instance_name ) "" ) }} - automationBase: {{.Values.automation_base_instance_name}} - {{ end }} - {{ if not ( eq ( default "" .Values.automation_ui_config_instance_name ) "" ) }} - automationUIConfig: {{.Values.automation_ui_config_instance_name}} - {{ end }} -{{ end }} imagePullSecret: ibm-entitlement-key license: accept: true pakModules: - - name: aiopsFoundation - enabled: true - - name: applicationManager - enabled: true - - name: aiManager - enabled: true - - name: connection - enabled: false + - name: aiopsFoundation + enabled: true + - name: applicationManager + enabled: true + - name: aiManager + enabled: true + - name: connection + enabled: false size: small - storageClass: {{.Values.storageclass.rwx}} - storageClassLargeBlock: {{.Values.storageclass.rwo}} + storageClass: {{ .Values.storageclass.rwx }} + storageClassLargeBlock: {{ .Values.storageclass.rwo }} + topologyModel: application diff --git a/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/220-sync-check-ai-readiness.yaml b/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/220-sync-check-ai-readiness.yaml deleted file mode 100644 index 50a6e706..00000000 --- a/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/220-sync-check-ai-readiness.yaml +++ /dev/null @@ -1,87 +0,0 @@ -# https://www.ibm.com/docs/en/cloud-paks/cp-waiops/3.1.1?topic=installing-postinstallation-tasks ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: sync-check-aimgr-readiness - annotations: - argocd.argoproj.io/sync-wave: "220" - argocd.argoproj.io/hook: Sync - namespace: openshift-gitops -spec: - template: - spec: - containers: - - name: config - image: quay.io/openshift/origin-cli:latest - imagePullPolicy: IfNotPresent - env: - - name: TARGET_NAMESPACE - value: "{{.Values.metadata.argocd_app_namespace}}" - - name: WAIT_TIME - value: "{{.Values.metadata.post_install_wait}}" - command: - - /bin/sh - - -c - - | - set -eo pipefail - set -x - - result=0 - - current_seconds=0 - operation_limit_seconds=$(( $(date +%s) + 7200 )) - pods_found=0 - while [ ${current_seconds} -lt ${operation_limit_seconds} ]; do - if oc get AIOpsAnalyticsOrchestrator \ - -l app.kubernetes.io/instance=aiops \ - -n "${TARGET_NAMESPACE}" && - oc get route -n "${TARGET_NAMESPACE}" cpd; then - pods_found=1 - else - pods_found=0 - fi - if [ ${pods_found} -eq 0 ]; then - echo "INFO: AI Manager resources not ready, waiting some more." - sleep 60 - else - echo "INFO: AI Manager resources found." - break; - fi - current_seconds=$(( $(date +%s) )) - done - - echo "INFO: Checking AI Manager resources." - oc wait AIOpsAnalyticsOrchestrator \ - -l app.kubernetes.io/instance=aiops \ - -n "${TARGET_NAMESPACE}" \ - --for condition=Ready=true \ - --timeout="${WAIT_TIME}" \ - || result=1 - - if [ ${result} -eq 0 ]; then - echo "INFO: All AI Manager resources are ready." - else - echo "ERROR: AI Manager resources not ready after specified period." - oc get AIOpsAnalyticsOrchestrator \ - -l app.kubernetes.io/instance=aiops \ - -n "${TARGET_NAMESPACE}" || result=1 - oc get route -n "${TARGET_NAMESPACE}" cpd || result=1 - fi - - echo "INFO: Verification steps from the guide: https://www.ibm.com/docs/en/cloud-paks/cloud-pak-watson-aiops/3.3.0?topic=installation-online-cli#verify" - oc get installations.orchestrator.aiops.ibm.com -n "${TARGET_NAMESPACE}" \ - && echo "" \ - && oc get ircore,AIOpsAnalyticsOrchestrator -n "${TARGET_NAMESPACE}" -o custom-columns="KIND:kind,NAMESPACE:metadata.namespace,NAME:metadata.name,STATUS:status.conditions[?(@.type==\"Ready\")].reason" \ - && echo "" \ - && oc get lifecycleservice -n "${TARGET_NAMESPACE}" -o custom-columns="KIND:kind,NAMESPACE:metadata.namespace,NAME:metadata.name,STATUS:status.conditions[?(@.type==\"Lifecycle Service Ready\")].reason" \ - && echo "" \ - && oc get BaseUI -n "${TARGET_NAMESPACE}" -o custom-columns="KIND:kind,NAMESPACE:metadata.namespace,NAME:metadata.name,STATUS:status.conditions[?(@.type==\"Ready\")].reason" \ - && echo "" \ - && oc get AIManager,aiopsedge,asm -n "${TARGET_NAMESPACE}" -o custom-columns="KIND:kind,NAMESPACE:metadata.namespace,NAME:metadata.name,STATUS:status.phase" - - exit "${result}" - - restartPolicy: Never - serviceAccountName: {{.Values.serviceaccount.ibm_cloudpaks_installer}} - backoffLimit: 1 diff --git a/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/230-postsync-certificates.yaml b/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/230-postsync-certificates.yaml new file mode 100644 index 00000000..2bbb9798 --- /dev/null +++ b/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/230-postsync-certificates.yaml @@ -0,0 +1,101 @@ +--- +# https://www.ibm.com/docs/en/cloud-paks/cloud-pak-watson-aiops/4.1.0?topic=pak-using-custom-certificate +# Section "12. Configure signed certificates for NGINX" +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + argocd.argoproj.io/sync-wave: "230" + argocd.argoproj.io/hook: Sync + name: post-cp4waiops-adjust-certs + namespace: openshift-gitops +spec: + template: + spec: + containers: + - name: config + image: quay.io/openshift/origin-cli:latest + imagePullPolicy: IfNotPresent + env: + - name: TARGET_NAMESPACE + value: "{{.Values.metadata.argocd_app_namespace}}" + command: + - /bin/sh + - -c + - | + set -eo pipefail + set -x + + export HOME=/tmp + + cd $HOME \ + && oc project "${TARGET_NAMESPACE}" \ + && oc get ZenService/iaf-zen-cpdservice \ + || { + echo "ERROR: Unable to retrieve ZenService instance." + exit 1 + } + + secret_set=$(oc get ZenService/iaf-zen-cpdservice -o jsonpath={.spec.zenCustomRoute.route_secret}) + if [ "${secret_set}" == "customer-tls-secret" ]; 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 + echo "INFO: Create a secret called customer-tls-secret with your custom certificates." \ + && oc extract secret/${ingress_secret_name} \ + -n openshift-ingress \ + --keys=tls.crt,tls.key \ + --confirm \ + && oc delete secret customer-tls-secret \ + --ignore-not-found=true \ + && 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 create secret generic customer-tls-secret \ + --from-file=tls.crt=tls.crt \ + --from-file=tls.key=tls.key \ + --from-file=ca.crt=ca.crt \ + --dry-run=client -o yaml \ + | oc apply -f - \ + && echo "INFO: Restart the nginx pods to pickup the new custom certificates." \ + && oc rollout restart Deployment/ibm-nginx \ + && oc rollout status Deployment/ibm-nginx \ + && echo "INFO: Patch ZenService with the new customer-tls-secret." \ + && oc patch ZenService/iaf-zen-cpdservice \ + --type merge \ + -p '{"spec":{"zenCustomRoute":{"route_reencrypt":true,"route_secret": "customer-tls-secret"}}}' \ + && echo "INFO: Patch IBM Cloud PakĀ® foundational services with the new custom certificate." \ + && cs_namespace=$(oc get operandrequest ibm-aiops-common-services -o jsonpath={.spec.requests[0].registryNamespace}) \ + && oc -n "${cs_namespace}" patch managementingress default --type merge --patch '{"spec":{"ignoreRouteCert":true}}' \ + && oc -n "${cs_namespace}" delete certificates.v1alpha1.certmanager.k8s.io route-cert \ + --ignore-not-found=true \ + && oc -n "${cs_namespace}" delete secret route-tls-secret \ + --ignore-not-found=true \ + && oc -n "${cs_namespace}" create secret generic route-tls-secret \ + --from-file=tls.crt=tls.crt \ + --from-file=tls.key=tls.key \ + --from-file=ca.crt=ca.crt \ + && oc -n "${cs_namespace}" delete secret ibmcloud-cluster-ca-cert \ + && oc -n "${cs_namespace}" rollout restart deployment auth-idp \ + && oc -n "${cs_namespace}" rollout status deployment auth-idp --timeout=5m \ + && oc -n "${cs_namespace}" rollout restart deployment operand-deployment-lifecycle-manager \ + && oc -n "${cs_namespace}" rollout status deployment operand-deployment-lifecycle-manager --timeout=5m \ + && echo "INFO: Custom certificate is set." \ + && oc wait zenservice iaf-zen-cpdservice --for=jsonpath='{.status.zenStatus}'=Completed --timeout=30m \ + || { + echo "ERROR: Custom certificate could not be set." \" + result=1 + } + fi + + exit ${result} + + restartPolicy: Never + serviceAccountName: {{.Values.serviceaccount.ibm_cloudpaks_installer}} + backoffLimit: 2 diff --git a/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/230-sync-certificates.yaml b/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/230-sync-certificates.yaml deleted file mode 100644 index 492f2032..00000000 --- a/config/cloudpaks/cp4waiops/install-aimgr/templates/resources/230-sync-certificates.yaml +++ /dev/null @@ -1,85 +0,0 @@ ---- -# https://www.ibm.com/docs/en/cloud-paks/cloud-pak-watson-aiops/3.2.0?topic=manager-starter-installation -# Section "12. Configure signed certificates for NGINX" -apiVersion: batch/v1 -kind: Job -metadata: - annotations: - argocd.argoproj.io/sync-wave: "230" - argocd.argoproj.io/hook: Sync - name: post-cp4waiops-adjust-certs - namespace: openshift-gitops -spec: - template: - spec: - containers: - - name: config - image: quay.io/openshift/origin-cli:latest - imagePullPolicy: IfNotPresent - env: - - name: ARGOCD_NAMESPACE - value: "openshift-gitops" - - name: TARGET_NAMESPACE - value: "{{.Values.metadata.argocd_app_namespace}}" - command: - - /bin/sh - - -c - - | - set -eo pipefail - set -x - - export HOME=/tmp - - cd $HOME \ - && oc project "${TARGET_NAMESPACE}" \ - && instance_name=$(oc get AutomationUIConfig --no-headers -o custom-columns=":metadata.name") \ - || { - echo "ERROR: Unable to retrieve AutomationUIConfig instance name." - exit 1 - } - - secret_set=$(oc get AutomationUIConfig "${instance_name}" -o jsonpath={.spec.tls.certificateSecret.secretName}) - if [ "${secret_set}" == "external-tls-secret" ]; then - echo "INFO: External secret already set." - exit 0 - fi - - if [ -n "${instance_name}" ]; then - 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 \ - && oc delete secret external-tls-secret \ - --ignore-not-found=true \ - && oc create secret generic external-tls-secret \ - --from-file=cert.crt=tls.crt \ - --from-file=cert.key=tls.key \ - --dry-run=client -o yaml \ - | oc apply -f - \ - && replica_count=$(oc get pods -l component=ibm-nginx -o jsonpath='{ .items[*].metadata.name }' \ - | wc -w) \ - && oc rollout restart Deployment/ibm-nginx \ - && sleep 3 \ - && oc rollout status Deployment/ibm-nginx \ - && oc patch AutomationUIConfig "${instance_name}" \ - --type merge \ - --patch '{"spec": {"tls": {"caSecret": {"key":"ca.crt", "secretName": "external-tls-secret"}, "certificateSecret": { "secretName": "external-tls-secret" } } } }' \ - && echo "INFO: AutomationUIConfig patched." \ - || { - echo "ERROR: AutomationUIConfig could not be patched." \" - result=1 - } - fi - fi - - exit ${result} - - restartPolicy: Never - serviceAccountName: {{.Values.serviceaccount.ibm_cloudpaks_installer}} - backoffLimit: 2 diff --git a/config/cloudpaks/cp4waiops/install-aimgr/templates/subscriptions/030-sync-prereqs.yaml b/config/cloudpaks/cp4waiops/install-aimgr/templates/subscriptions/030-sync-prereqs.yaml index 028e630a..cead84a9 100644 --- a/config/cloudpaks/cp4waiops/install-aimgr/templates/subscriptions/030-sync-prereqs.yaml +++ b/config/cloudpaks/cp4waiops/install-aimgr/templates/subscriptions/030-sync-prereqs.yaml @@ -47,16 +47,6 @@ spec: && rm -rf /tmp/.dockerconfigjson \ || result=1 - is_managed_ocp=0 - managed_ocp=$(oc get Infrastructure cluster \ - -o jsonpath='{.status.platformStatus.*.resourceTags[?(@.key=="red-hat-managed")].value}' || is_managed_ocp=0) - if [ "${managed_ocp}" != "true" ]; then - if [ $(oc get ingresscontroller default -n openshift-ingress-operator -o jsonpath='{.status.endpointPublishingStrategy.type}') = "HostNetwork" ]; then - oc patch namespace default --type=json -p '[{"op":"add","path":"/metadata/labels","value":{"network.openshift.io/policy-group":"ingress"}}]' - fi \ - || result=1 - fi - oc get ServiceAccount aiops-topology-service-account --namespace "${TARGET_NAMESPACE}" -o yaml 2> /dev/null \ && echo "INFO: Topology service account exists." \ || { diff --git a/config/cloudpaks/cp4waiops/install-aimgr/templates/subscriptions/100-subscription.yaml b/config/cloudpaks/cp4waiops/install-aimgr/templates/subscriptions/100-subscription.yaml index 852f8a19..844fd5b3 100644 --- a/config/cloudpaks/cp4waiops/install-aimgr/templates/subscriptions/100-subscription.yaml +++ b/config/cloudpaks/cp4waiops/install-aimgr/templates/subscriptions/100-subscription.yaml @@ -7,11 +7,7 @@ metadata: name: ibm-aiops-orchestrator namespace: "{{.Values.metadata.argocd_app_namespace}}" spec: - config: - env: - - name: REDIS_CHANNEL - value: v1.6 - channel: v3.7 + channel: v4.1 installPlanApproval: Automatic name: ibm-aiops-orchestrator source: ibm-operator-catalog diff --git a/config/cloudpaks/cp4waiops/install-aimgr/templates/subscriptions/110-sync-check-all-csvs.yaml b/config/cloudpaks/cp4waiops/install-aimgr/templates/subscriptions/110-sync-check-all-csvs.yaml index bed5f2c4..1c41ccb9 100644 --- a/config/cloudpaks/cp4waiops/install-aimgr/templates/subscriptions/110-sync-check-all-csvs.yaml +++ b/config/cloudpaks/cp4waiops/install-aimgr/templates/subscriptions/110-sync-check-all-csvs.yaml @@ -29,23 +29,31 @@ spec: current_seconds=0 operation_limit_seconds=$(( $(date +%s) + 2400 )) - csv_installing=0 + csv_installing=1 while [ ${current_seconds} -lt ${operation_limit_seconds} ]; do - if [ $(oc get csv -n ibm-common-services | grep -vc Succeeded) -gt 1 ] || \ - [ $(oc get csv -n ${TARGET_NAMESPACE} | grep -vc Succeeded) -gt 1 ]; then + + # Note the exclusion of "ibm-automation-elastic" in the statement below, reflecting an + # issue with this operator called out in the Cloud Pak docs: + # https://www.ibm.com/docs/en/cloud-paks/cloud-pak-watson-aiops/4.1.0?topic=installation-online-cli#install-cp4waiops + + failing_csvs=$(oc get csv \ + -n ${TARGET_NAMESPACE} \ + | grep -v ibm-automation-elastic \ + | grep -vc Succeeded) || result=1 + if [ ${result} -eq 1 ] || [ "${failing_csvs}" -gt 1 ]; then csv_installing=1 echo "INFO: CSVs still installing." - oc get csv -n ibm-common-services | grep -vc Succeeded oc get csv -n ${TARGET_NAMESPACE} | grep -vc Succeeded sleep 60 else csv_installing=0 + result=0 break fi current_seconds=$(( $(date +%s) )) done - if [ ${csv_installing} -eq 0 ]; then + if [ ${result} -eq 0 ] && [ ${csv_installing} -eq 0 ]; then echo "INFO: All CSVs are ready." else echo "ERROR: CSVs still not ready." diff --git a/config/cloudpaks/cp4waiops/install-aimgr/values.yaml b/config/cloudpaks/cp4waiops/install-aimgr/values.yaml index 897adc3e..82344baf 100644 --- a/config/cloudpaks/cp4waiops/install-aimgr/values.yaml +++ b/config/cloudpaks/cp4waiops/install-aimgr/values.yaml @@ -1,6 +1,4 @@ --- -automation_base_instance_name: "" -automation_ui_config_instance_name: "" serviceaccount: argocd_application_controller: openshift-gitops-argocd-application-controller ibm_cloudpaks_installer: ibm-cloudpaks-installer diff --git a/config/cloudpaks/cp4waiops/install-emgr/.helmignore b/config/cloudpaks/cp4waiops/install-emgr/.helmignore deleted file mode 100644 index f0c13194..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/config/cloudpaks/cp4waiops/install-emgr/Chart.yaml b/config/cloudpaks/cp4waiops/install-emgr/Chart.yaml deleted file mode 100644 index e021a3a1..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -apiVersion: v2 -name: icp4waiops-emgr -description: Cloud Pak for Watson AIOps - Event Manager - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -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.14.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: 3.7.2 diff --git a/config/cloudpaks/cp4waiops/install-emgr/templates/resources/000-presync-adjust-parameters.yaml b/config/cloudpaks/cp4waiops/install-emgr/templates/resources/000-presync-adjust-parameters.yaml deleted file mode 100644 index c417d81a..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/templates/resources/000-presync-adjust-parameters.yaml +++ /dev/null @@ -1,87 +0,0 @@ ---- -apiVersion: batch/v1 -kind: Job -metadata: - annotations: - argocd.argoproj.io/hook: PreSync - name: pre-cp4waiops-emgr-adjust-parameters - namespace: openshift-gitops -spec: - template: - spec: - containers: - - name: config - image: quay.io/openshift/origin-cli:latest - imagePullPolicy: IfNotPresent - resources: - requests: - memory: "64Mi" - cpu: "150m" - limits: - memory: "128Mi" - cpu: "200m" - env: - - name: ARGOCD_NAMESPACE - value: "openshift-gitops" - - name: TARGET_NAMESPACE - value: "{{.Values.metadata.argocd_app_namespace}}" - command: - - /bin/sh - - -c - - | - set -eo pipefail - set -x - - storage_class_rwo="$(oc get configmap argocd-cp4waiops-config \ - --namespace "${ARGOCD_NAMESPACE}" -o jsonpath='{.data.storageclass\.rwo}')" - storage_class_rwx="$(oc get configmap argocd-cp4waiops-config \ - --namespace "${ARGOCD_NAMESPACE}" -o jsonpath='{.data.storageclass\.rwx}')" - - if [ -z "${storage_class_rwo}" ] || [ -z "${storage_class_rwx}" ] ; then - echo "ERROR: Did not find storage classes for target platform." - exit 1 - fi - - cluster_domain=$(oc get configmap argocd-cp4waiops-config \ - --namespace "${ARGOCD_NAMESPACE}" -o jsonpath='{.data.cluster_domain}') - - echo "INFO: Install Argo CLI." - # Install it from cluster, not from Internet, so airgap scenarios still work - argo_route=openshift-gitops-server - argo_secret=openshift-gitops-cluster - - export HOME=/tmp - argo_cmd="${HOME}/argocd" - result=0 - - argo_url=$(oc get route ${argo_route} -n ${ARGOCD_NAMESPACE} -ojsonpath='{.spec.host}') \ - && curl -skL "${argo_url}/download/argocd-linux-amd64" -o "${argo_cmd}" \ - && chmod 755 "${argo_cmd}" \ - && argo_pwd=$(oc get secret ${argo_secret} -n ${ARGOCD_NAMESPACE} -ojsonpath='{.data.admin\.password}' | base64 -d ; echo ) \ - && "${argo_cmd}" login "${argo_url}" --username admin --password "${argo_pwd}" --insecure \ - || result=1 - - if [ ${result} -eq 0 ]; then - for app_name in cp4waiops-app cp4waiops-emgr; do - if [ -n "${storage_class_rwo}" ] && [ -n "${storage_class_rwx}" ]; then - echo "INFO: Patching storage for ${app_name}." \ - && "${argo_cmd}" app set "${app_name}" \ - --helm-set-string cluster_domain="${cluster_domain}" \ - --helm-set-string storageclass.rwo="${storage_class_rwo}" \ - --helm-set-string storageclass.rwx="${storage_class_rwx}" \ - && echo "INFO: ${app_name} successfully updated storage classes." \ - || result=1 - fi - done - fi - - for app_name in cp4waiops-app cp4waiops-emgr; do - echo "INFO: Application ${app_name} current parameters:" - "${argo_cmd}" app get "${app_name}" --show-params - done - - exit ${result} - - restartPolicy: Never - serviceAccountName: {{.Values.serviceaccount.ibm_cloudpaks_installer}} - backoffLimit: 2 diff --git a/config/cloudpaks/cp4waiops/install-emgr/templates/resources/210-event-manager.yaml b/config/cloudpaks/cp4waiops/install-emgr/templates/resources/210-event-manager.yaml deleted file mode 100644 index 103d9cc6..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/templates/resources/210-event-manager.yaml +++ /dev/null @@ -1,124 +0,0 @@ ---- -apiVersion: noi.ibm.com/v1beta1 -kind: NOI -metadata: - annotations: - argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true - argocd.argoproj.io/sync-wave: "210" - creationTimestamp: null - name: evtmanager - namespace: "{{.Values.metadata.argocd_app_namespace}}" -spec: - license: - accept: true - advanced: - antiAffinity: false - imagePullPolicy: IfNotPresent - imagePullRepository: cp.icr.io/cp/noi - serviceContinuity: - continuousAnalyticsCorrelation: false - isBackupDeployment: false - ldap: - baseDN: 'dc=mycluster,dc=icp' - bindDN: 'cn=admin,dc=mycluster,dc=icp' - groupFilter: 'cn=%s,ou=groups' - mode: standalone - port: '3389' - serverType: CUSTOM - sslPort: '3636' - storageClass: {{.Values.storageclass.rwo}} - storageSize: 1Gi - suffix: 'dc=mycluster,dc=icp' - url: 'ldap://localhost:3389' - userFilter: 'uid=%s,ou=users' - backupRestore: - enableAnalyticsBackups: false - topology: - appDisco: - certSecret: '' - db2archuser: archuser - db2database: taddm - db2user: db2inst1 - dbport: '50000' - dbsecret: '' - dburl: '' - enabled: false - scaleDS: '1' - scaleSSS: '1' - secure: false - tlsSecret: '' - observers: - alm: false - ansibleawx: false - appdynamics: false - aws: false - azure: false - bigcloudfabric: false - bigfixinventory: false - cienablueplanet: false - ciscoaci: false - contrail: false - dns: false - docker: false - dynatrace: false - file: true - gitlab: false - googlecloud: false - hpnfvd: false - ibmcloud: false - itnm: false - jenkins: false - junipercso: false - kubernetes: true - newrelic: false - openstack: false - rancher: false - rest: true - sdconap: false - servicenow: true - sevone: false - taddm: false - viptela: false - vmvcenter: true - vmwarensx: false - zabbix: false - aaionap: false - iafCartridgeRequirementsName: '' - netDisco: false - storageClassElasticTopology: {{.Values.storageclass.rwo}} - storageClassFileObserver: {{.Values.storageclass.rwo}} - storageSizeElasticTopology: 75Gi - storageSizeFileObserver: 5Gi - storageSizeSdconapObserver: 5Gi - integrations: - humio: - repository: '' - url: '' - persistence: - enabled: false - storageClassCassandraBackup: {{.Values.storageclass.rwo}} - storageClassCassandraData: {{.Values.storageclass.rwo}} - storageClassCouchdb: {{.Values.storageclass.rwo}} - storageClassElastic: {{.Values.storageclass.rwo}} - storageClassImpactGUI: {{.Values.storageclass.rwo}} - storageClassImpactServer: {{.Values.storageclass.rwo}} - storageClassKafka: {{.Values.storageclass.rwo}} - storageClassMinio: {{.Values.storageclass.rwo}} - storageClassNCOBackup: {{.Values.storageclass.rwo}} - storageClassNCOPrimary: {{.Values.storageclass.rwo}} - storageClassZookeeper: {{.Values.storageclass.rwo}} - storageSizeCassandraBackup: 50Gi - storageSizeCassandraData: 50Gi - storageSizeCouchdb: 20Gi - storageSizeElastic: 75Gi - storageSizeImpactGUI: 5Gi - storageSizeImpactServer: 5Gi - storageSizeKafka: 50Gi - storageSizeMinio: 10Gi - storageSizeNCOBackup: 5Gi - storageSizeNCOPrimary: 5Gi - storageSizeZookeeper: 5Gi - clusterDomain: {{.Values.cluster_domain}} - deploymentType: {{.Values.spec.deployment_type}} - entitlementSecret: noi-registry-secret - version: {{.Values.spec.version}} diff --git a/config/cloudpaks/cp4waiops/install-emgr/templates/resources/220-sync-check-emgr-group.yaml b/config/cloudpaks/cp4waiops/install-emgr/templates/resources/220-sync-check-emgr-group.yaml deleted file mode 100644 index 4ec24e59..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/templates/resources/220-sync-check-emgr-group.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# https://www.ibm.com/docs/en/cloud-paks/cp-waiops/3.1.1?topic=installing-postinstallation-tasks ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: sync-check-emgr-group - annotations: - argocd.argoproj.io/sync-wave: "220" - argocd.argoproj.io/hook: Sync - namespace: openshift-gitops -spec: - template: - spec: - containers: - - name: config - image: quay.io/openshift/origin-cli:latest - imagePullPolicy: IfNotPresent - resources: - requests: - memory: "64Mi" - cpu: "250m" - limits: - memory: "96Mi" - cpu: "300m" - env: - - name: TARGET_NAMESPACE - value: "{{.Values.metadata.argocd_app_namespace}}" - command: - - /bin/sh - - -c - - | - set -eo pipefail - set -x - - result=0 - - current_seconds=0 - operation_limit_seconds=$(( $(date +%s) + 7200 )) - cem_formation_status="" - while [ ${current_seconds} -lt ${operation_limit_seconds} ]; do - cem_formation_status=$(oc get cemformation evtmanager -n "${TARGET_NAMESPACE}" -o jsonpath='{.status.phase}') - if [ "${cem_formation_status}" == "ERROR" ] \ - || [ "${cem_formation_status}" == "OK" ]; then - break - fi - echo "INFO: cemformation not found, waiting some more." - sleep 30 - - current_seconds=$(( $(date +%s) )) - done - - if [ "${cem_formation_status}" == "Error" ]; then - echo "INFO: CEM Formation phase is not OK: ${cem_formation_status}" - result=1 - else - echo "INFO: CEM Formation phase is OK." - fi - - exit "${result}" - - restartPolicy: Never - serviceAccountName: {{.Values.serviceaccount.ibm_cloudpaks_installer}} - backoffLimit: 1 diff --git a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/020-argocd-emgr-role.yaml b/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/020-argocd-emgr-role.yaml deleted file mode 100644 index cb35868c..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/020-argocd-emgr-role.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - annotations: - argocd.argoproj.io/sync-wave: "20" - argocd.argoproj.io/sync-options: "Replace=true" - creationTimestamp: null - name: argocd-cp4waiops-emgr-role - namespace: "{{.Values.metadata.argocd_app_namespace}}" -rules: - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "create", "update", "patch", "delete"] - - apiGroups: ["noi.ibm.com"] - resources: ["nois"] - verbs: ["get", "create", "update", "patch", "delete"] diff --git a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/020-cloudpaks-emgr-cluster-role.yaml b/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/020-cloudpaks-emgr-cluster-role.yaml deleted file mode 100644 index 8e468126..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/020-cloudpaks-emgr-cluster-role.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: - argocd.argoproj.io/sync-wave: "20" - argocd.argoproj.io/sync-options: "Replace=true" - creationTimestamp: null - name: ibm-waiops-emgr-cluster-role - namespace: "{{.Values.metadata.argocd_app_namespace}}-emgr" -rules: - - apiGroups: ["rbac.authorization.k8s.io"] - resources: ["clusterrolebindings"] - verbs: ["get", "create", "update"] - - apiGroups: ["security.openshift.io"] - resources: ["securitycontextconstraints"] - verbs: ["get", "use"] diff --git a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/021-argocd-role-binding.yaml b/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/021-argocd-role-binding.yaml deleted file mode 100644 index 8785ce0c..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/021-argocd-role-binding.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - annotations: - argocd.argoproj.io/sync-wave: "21" - argocd.argoproj.io/sync-options: "Replace=true" - creationTimestamp: null - name: argocd-cp4waiops-emgr-binding - namespace: "{{.Values.metadata.argocd_app_namespace}}" -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: argocd-cp4waiops-emgr-role -subjects: - - kind: ServiceAccount - name: "{{.Values.serviceaccount.argocd_application_controller}}" - namespace: "{{.Values.metadata.argocd_namespace}}" diff --git a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/021-cloudpaks-emgr-binding.yaml b/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/021-cloudpaks-emgr-binding.yaml deleted file mode 100644 index 89f2dde3..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/021-cloudpaks-emgr-binding.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: - argocd.argoproj.io/sync-wave: "21" - argocd.argoproj.io/sync-options: "Replace=true" - creationTimestamp: null - name: ibm-waiops-emgr-cluster-binding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: ibm-waiops-emgr-cluster-role -subjects: - - kind: ServiceAccount - name: "{{.Values.serviceaccount.ibm_cloudpaks_installer}}" - namespace: "{{.Values.metadata.argocd_namespace}}" diff --git a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/030-sync-prereqs.yaml b/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/030-sync-prereqs.yaml deleted file mode 100644 index 1027fcdf..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/030-sync-prereqs.yaml +++ /dev/null @@ -1,87 +0,0 @@ ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: sync-emgr-prereqs - annotations: - argocd.argoproj.io/sync-wave: "30" - argocd.argoproj.io/hook: Sync - namespace: openshift-gitops -spec: - template: - spec: - containers: - - name: config - image: quay.io/openshift/origin-cli:latest - imagePullPolicy: IfNotPresent - env: - - name: ARGOCD_NAMESPACE - value: openshift-gitops - - name: IBM_ENTITLEMENT_SECRET - value: ibm-entitlement-key - - name: TARGET_NAMESPACE - value: "{{.Values.metadata.argocd_app_namespace}}" - command: - - /bin/sh - - -c - - | - set -eo pipefail - set -x - - result=0 - # https://www.ibm.com/docs/en/cloud-paks/cloud-pak-watson-aiops/3.2.0?topic=em-starter-installation - oc extract secret/"${IBM_ENTITLEMENT_SECRET}" \ - --namespace "${ARGOCD_NAMESPACE}" \ - --keys=.dockerconfigjson \ - --to=/tmp \ - --confirm \ - && if oc get secret noi-registry-secret --namespace "${TARGET_NAMESPACE}" 2>/dev/null ; then - oc patch secret noi-registry-secret \ - --namespace "${TARGET_NAMESPACE}" \ - --patch "{\"data\": {\".dockerconfigjson\": \"$(cat /tmp/.dockerconfigjson | base64 -w0)\" }}" - else - oc create secret docker-registry noi-registry-secret \ - --namespace "${TARGET_NAMESPACE}" \ - --from-file=.dockerconfigjson=/tmp/.dockerconfigjson - fi \ - && rm -rf /tmp/.dockerconfigjson \ - && echo "INFO: Event Manager prereq configuration successful." \ - || result=1 - - is_managed_ocp=0 - managed_ocp=$(oc get Infrastructure cluster \ - -o jsonpath='{.status.platformStatus.*.resourceTags[?(@.key=="red-hat-managed")].value}' || is_managed_ocp=0) - if [ "${managed_ocp}" != "true" ]; then - if [ $(oc get ingresscontroller default -n openshift-ingress-operator -o jsonpath='{.status.endpointPublishingStrategy.type}') = "HostNetwork" ]; then - oc patch namespace default --type=json -p '[{"op":"add","path":"/metadata/labels","value":{"network.openshift.io/policy-group":"ingress"}}]' - fi \ - || result=1 - fi - - # https://www.ibm.com/docs/en/noi/1.6.5?topic=preparing-your-cluster - oc get ServiceAccount noi-service-account --namespace "${TARGET_NAMESPACE}" -o yaml 2> /dev/null \ - && echo "INFO: NOI service account exists." \ - || { - echo "INFO: Create the NOI service account with the entitlement key pull secret." - oc create serviceaccount noi-service-account -n "${TARGET_NAMESPACE}" \ - && oc adm policy add-scc-to-user privileged system:serviceaccount:${TARGET_NAMESPACE}:noi-service-account \ - && oc patch serviceaccount noi-service-account -p '{"imagePullSecrets": [{"name": "noi-registry-secret"}]}' -n "${TARGET_NAMESPACE}" \ - && oc get sa noi-service-account -n "${TARGET_NAMESPACE}" \ - || result=1 - - if [ ! ${result} -eq 0 ]; then - oc delete ServiceAccount noi-service-account --namespace "${TARGET_NAMESPACE}" - fi - } - - if [ ${result} -eq 0 ]; then - echo "INFO: Event Manager prereq configuration successful." - else - echo "ERROR: Event Manager prereq configuration failed." - fi - - exit ${result} - - restartPolicy: Never - serviceAccountName: {{.Values.serviceaccount.ibm_cloudpaks_installer}} - backoffLimit: 1 diff --git a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/050-operator-group.yaml b/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/050-operator-group.yaml deleted file mode 100644 index 7e5a25da..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/050-operator-group.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: "{{.Values.metadata.argocd_app_namespace}}-operator-group" - namespace: "{{.Values.metadata.argocd_app_namespace}}" - annotations: - argocd.argoproj.io/sync-wave: "50" -spec: - targetNamespaces: - - "{{.Values.metadata.argocd_app_namespace}}" diff --git a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/100-subscription.yaml b/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/100-subscription.yaml deleted file mode 100644 index 3f4b51e0..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/100-subscription.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - annotations: - argocd.argoproj.io/sync-wave: "100" - labels: - operators.coreos.com/noi.{{.Values.metadata.argocd_app_namespace}}: '' - name: noi - namespace: "{{.Values.metadata.argocd_app_namespace}}" -spec: - channel: v1.12 - installPlanApproval: Automatic - name: noi - source: ibm-operator-catalog - sourceNamespace: openshift-marketplace diff --git a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/110-sync-check-all-csvs.yaml b/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/110-sync-check-all-csvs.yaml deleted file mode 100644 index 24c2ced6..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/templates/subscriptions/110-sync-check-all-csvs.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# Ensuring all CSVs across all namespaces are ready ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: check-waiops-emgr-csvs - annotations: - argocd.argoproj.io/sync-wave: "110" - argocd.argoproj.io/hook: Sync - namespace: openshift-gitops -spec: - template: - spec: - containers: - - name: config - image: quay.io/openshift/origin-cli:latest - imagePullPolicy: IfNotPresent - resources: - requests: - memory: "64Mi" - cpu: "250m" - limits: - memory: "96Mi" - cpu: "300m" - env: - - name: TARGET_NAMESPACE - value: "{{.Values.metadata.argocd_app_namespace}}" - command: - - /bin/sh - - -c - - | - set -eo pipefail - set -x - - result=0 - - current_seconds=0 - operation_limit_seconds=$(( $(date +%s) + 2400 )) - csv_installing=0 - while [ ${current_seconds} -lt ${operation_limit_seconds} ]; do - if [ $(oc get csv -n ibm-common-services | grep -vc Succeeded) -gt 1 ] || \ - [ $(oc get csv -n ${TARGET_NAMESPACE} | grep -vc Succeeded) -gt 1 ]; then - csv_installing=1 - echo "INFO: CSVs still installing." - oc get csv -n ibm-common-services | grep -vc Succeeded - oc get csv -n ${TARGET_NAMESPACE} | grep -vc Succeeded - sleep 60 - else - csv_installing=0 - break - fi - current_seconds=$(( $(date +%s) )) - done - - if [ ${csv_installing} -eq 0 ]; then - echo "INFO: All CSVs are ready." - else - echo "ERROR: CSVs still not ready." - oc get csv -A | grep -v Succeeded - exit 1 - fi - - restartPolicy: Never - serviceAccountName: {{.Values.serviceaccount.ibm_cloudpaks_installer}} - backoffLimit: 1 diff --git a/config/cloudpaks/cp4waiops/install-emgr/values.yaml b/config/cloudpaks/cp4waiops/install-emgr/values.yaml deleted file mode 100644 index fe31a614..00000000 --- a/config/cloudpaks/cp4waiops/install-emgr/values.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -cluster_domain: "to_be_set_by_presync_job" -serviceaccount: - argocd_application_controller: openshift-gitops-argocd-application-controller - ibm_cloudpaks_installer: ibm-cloudpaks-installer -metadata: - argocd_app_namespace: ibm-cloudpaks - argocd_namespace: openshift-gitops - post_install_wait: 2h -spec: - deployment_type: trial - version: 1.6.8 -storageclass: - rwo: ocs-storagecluster-ceph-rbd - rwx: ocs-storagecluster-cephfs diff --git a/config/cloudpaks/cp4waiops/install-ia/Chart.yaml b/config/cloudpaks/cp4waiops/install-ia/Chart.yaml index b01c02fb..4d621e93 100644 --- a/config/cloudpaks/cp4waiops/install-ia/Chart.yaml +++ b/config/cloudpaks/cp4waiops/install-ia/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.14.1 +version: 0.15.0 # 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: 3.7.1 +appVersion: 4.1.0 diff --git a/config/cloudpaks/cp4waiops/install-ia/templates/resources/000-presync-adjust-parameters.yaml b/config/cloudpaks/cp4waiops/install-ia/templates/resources/000-presync-adjust-parameters.yaml index c067454c..3ea7f76b 100644 --- a/config/cloudpaks/cp4waiops/install-ia/templates/resources/000-presync-adjust-parameters.yaml +++ b/config/cloudpaks/cp4waiops/install-ia/templates/resources/000-presync-adjust-parameters.yaml @@ -23,10 +23,12 @@ spec: set -eo pipefail set -x + storage_class_rwo="$(oc get configmap argocd-cp4waiops-config \ + --namespace "${ARGOCD_NAMESPACE}" -o jsonpath='{.data.storageclass\.rwo}')" storage_class_rwx="$(oc get configmap argocd-cp4waiops-config \ --namespace "${ARGOCD_NAMESPACE}" -o jsonpath='{.data.storageclass\.rwx}')" - if [ -z "${storage_class_rwx}" ] ; then + if [ -z "${storage_class_rwo}" ] || [ -z "${storage_class_rwx}" ] ; then echo "ERROR: Did not find storage classes for target platform." exit 1 fi @@ -51,6 +53,7 @@ spec: if [ ${result} -eq 0 ]; then echo "INFO: Patching storage for ${app_name}." \ && "${argo_cmd}" app set "${app_name}" \ + --helm-set-string storageclass.rwo="${storage_class_rwo}" \ --helm-set-string storageclass.rwx="${storage_class_rwx}" \ && echo "INFO: ${app_name} successfully updated storage classes." \ || result=1 diff --git a/config/cloudpaks/cp4waiops/install-ia/templates/resources/200-ia-config.yaml b/config/cloudpaks/cp4waiops/install-ia/templates/resources/200-ia-config.yaml index 7bd8a3cf..d068e5bd 100644 --- a/config/cloudpaks/cp4waiops/install-ia/templates/resources/200-ia-config.yaml +++ b/config/cloudpaks/cp4waiops/install-ia/templates/resources/200-ia-config.yaml @@ -19,3 +19,4 @@ spec: license: accept: true storageClass: {{.Values.storageclass.rwx}} + storageClassLargeBlock: {{.Values.storageclass.rwo}} diff --git a/config/cloudpaks/cp4waiops/install-ia/templates/subscriptions/100-subscription.yaml b/config/cloudpaks/cp4waiops/install-ia/templates/subscriptions/100-subscription.yaml index efb5d65b..7e052442 100644 --- a/config/cloudpaks/cp4waiops/install-ia/templates/subscriptions/100-subscription.yaml +++ b/config/cloudpaks/cp4waiops/install-ia/templates/subscriptions/100-subscription.yaml @@ -7,7 +7,7 @@ metadata: name: ibm-infrastructure-automation-operator namespace: "{{.Values.metadata.argocd_app_namespace}}" spec: - channel: v3.7 + channel: v4.1 installPlanApproval: Automatic name: ibm-infrastructure-automation-operator source: ibm-operator-catalog diff --git a/config/cloudpaks/cp4waiops/install-ia/values.yaml b/config/cloudpaks/cp4waiops/install-ia/values.yaml index 936617d4..82344baf 100644 --- a/config/cloudpaks/cp4waiops/install-ia/values.yaml +++ b/config/cloudpaks/cp4waiops/install-ia/values.yaml @@ -7,4 +7,5 @@ metadata: argocd_namespace: openshift-gitops post_install_wait: 2h storageclass: + rwo: ocs-storagecluster-ceph-rbd rwx: ocs-storagecluster-cephfs diff --git a/tests/postbuild/cluster.sh b/tests/postbuild/cluster.sh index 2e4ac33b..ac1cef46 100755 --- a/tests/postbuild/cluster.sh +++ b/tests/postbuild/cluster.sh @@ -17,7 +17,7 @@ oc_cmd=$(type -p oc) : "${NEW_CLUSTER_TYPE:=fyre-quick-burn}" : "${WORKER_FLAVOR:=medium}" -: "${OCP_VERSION:=4.10}" +: "${OCP_VERSION:=4.12}" # In hours : "${CLUSTER_EXPIRATION:=12}" diff --git a/tests/prebuild/yamllint-config.yaml b/tests/prebuild/yamllint-config.yaml index 4c718011..a7ffd76d 100644 --- a/tests/prebuild/yamllint-config.yaml +++ b/tests/prebuild/yamllint-config.yaml @@ -5,12 +5,6 @@ ignore: | config/argocd-cloudpaks/cp4i/templates/0301-cp4i-module-template-app.yaml config/argocd-cloudpaks/cp4i/templates/0400-cp4i-client-app.yaml config/argocd-cloudpaks/cp4waiops/templates/000-aimgr-namespace.yaml - config/argocd-cloudpaks/cp4waiops/templates/020-cloudpaks-aimgr-role.yaml - config/argocd-cloudpaks/cp4waiops/templates/020-cloudpaks-emgr-role.yaml - config/argocd-cloudpaks/cp4waiops/templates/021-cloudpaks-aimgr-binding.yaml - config/argocd-cloudpaks/cp4waiops/templates/021-cloudpaks-emgr-binding.yaml - config/argocd-cloudpaks/cp4waiops/templates/110-cp4waiops-aimgr-app.yaml - config/argocd-cloudpaks/cp4waiops/templates/120-cp4waiops-emgr-app.yaml config/argocd-cloudpaks/cp4waiops/templates/130-cp4waiops-ia-app.yaml config/cloudpaks/cp4a/operators/templates/0000-cp4ba-namespace.yaml config/cloudpaks/cp4a/operators/templates/0100-operator-group.yaml @@ -18,7 +12,6 @@ ignore: | config/cloudpaks/cp4i/install-prereqs/templates/0000-namespace.yaml config/cloudpaks/cp4i/install-prereqs/templates/0100-operator-group.yaml config/cloudpaks/cp4s/templates/subscriptions/050-cp4s-operator-group.yaml - config/cloudpaks/cp4waiops/install-aimgr/templates/resources/200-ai-manager.yaml config/cloudpaks/cp4waiops/install-aimgr/templates/subscriptions/050-operator-group.yaml config/rhacm/cloudpaks/templates/placement-argocd.yaml config/rhacm/cloudpaks/templates/placement-cloudpaks.yaml