Skip to content

Commit

Permalink
feat: Upgrade Cloud Pak for WAIOps to 4.1.0
Browse files Browse the repository at this point in the history
Signed-off-by: Denilson Nastacio <[email protected]>
  • Loading branch information
nastacio committed Jul 14, 2023
1 parent 8dc7314 commit 0d2a525
Show file tree
Hide file tree
Showing 46 changed files with 233 additions and 1,091 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
4 changes: 2 additions & 2 deletions config/argocd-cloudpaks/cp4waiops/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{{- $aimgr := .Values.modules.aimgr }}
{{- if eq ( default false $aimgr ) true }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand All @@ -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"]
Expand All @@ -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"]

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{{- $aimgr := .Values.modules.aimgr }}
{{- if eq ( default false $aimgr ) true }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand All @@ -17,4 +15,3 @@ subjects:
- kind: ServiceAccount
name: "{{.Values.serviceaccount.ibm_cloudpaks_installer}}"
namespace: "{{.Values.metadata.argocd_namespace}}"
{{- end }}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{{- $aimgr := .Values.modules.aimgr }}
{{- if eq ( default false $aimgr ) true }}
---
apiVersion: argoproj.io/v1alpha1
kind: Application
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -68,4 +62,3 @@ status:
source:
repoURL: ""
status: ""
{{- end }}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions config/argocd-cloudpaks/cp4waiops/values.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -14,6 +12,4 @@ storageclass:
rwo: ocs-storagecluster-ceph-rbd
rwx: ocs-storagecluster-cephfs
modules:
aimgr: true
emgr: true
ia: false
ia: "false"
4 changes: 2 additions & 2 deletions config/cloudpaks/cp4waiops/install-aimgr/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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"]
Original file line number Diff line number Diff line change
@@ -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}}
Loading

0 comments on commit 0d2a525

Please sign in to comment.