Skip to content

Commit

Permalink
fix: Improve detection of degraded APIConnectCluster in Cloud Pak for…
Browse files Browse the repository at this point in the history
… Integration

Signed-off-by: Denilson Nastacio <[email protected]>
  • Loading branch information
nastacio committed Jun 23, 2023
1 parent 5b679cf commit 76ad087
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 8 deletions.
4 changes: 2 additions & 2 deletions config/argocd-cloudpaks/cp4i/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.8.1

# 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: "2022.4.1"
appVersion: "2023.2.1"
2 changes: 0 additions & 2 deletions config/argocd-cloudpaks/cp4i/templates/0100-cp4i-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ spec:
value: "{{.Values.modules.client}}"
- name: modules.mq
value: "{{.Values.modules.mq}}"
- name: modules.platform
value: "{{.Values.modules.platform}}"
- name: repoURL
value: ${ARGOCD_APP_SOURCE_REPO_URL}
- name: serviceaccount.argocd_application_controller
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
annotations:
argocd.argoproj.io/sync-wave: "300"
name: cp4i-platform
namespace: {{ .Values.metadata.argocd_namespace }}
spec:
destination:
namespace: {{ .Values.metadata.argocd_app_namespace }}
server: 'https://kubernetes.default.svc'
ignoreDifferences:
- group: argoproj.io
jsonPointers:
- /spec/source/repoURL
- /spec/source/targetRevision
- /status
kind: Application
- group: datapower.ibm.com
jsonPointers:
- /metadata/labels
kind: DataPowerService
project: default
source:
helm:
parameters:
- name: argocd_app_name
value: ${ARGOCD_APP_NAME}
- name: argocd_app_namespace
value: ${ARGOCD_APP_NAMESPACE}
- name: metadata.argocd_app_namespace
value: {{ .Values.metadata.argocd_app_namespace }}
- 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/cp4i/install-platform
repoURL: {{ .Values.repoURL }}
targetRevision: {{ .Values.targetRevision }}
syncPolicy:
automated:
prune: true
selfHeal: true
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
annotations:
argocd.argoproj.io/sync-wave: "300"
argocd.argoproj.io/sync-wave: "301"
name: cp4i-{{ $module_name }}
namespace: {{ $argocd_namespace }}
spec:
Expand Down
1 change: 0 additions & 1 deletion config/argocd-cloudpaks/cp4i/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ storageclass:
modules:
apic: true
mq: true
platform: true
client: false
6 changes: 5 additions & 1 deletion config/argocd/templates/0200-argocd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,11 @@ spec:
return hs
end
if condition.type == "Pending" and condition.status == "True" then
hs.status = "Progressing"
if condition.reason == "Error" then
hs.status = "Degraded"
else
hs.status = "Progressing"
end
hs.message = condition.message
return hs
end
Expand Down
2 changes: 1 addition & 1 deletion tests/prebuild/yamllint-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ignore: |
config/argocd-cloudpaks/cp-shared/templates/0050-sync-common-service-maps.yaml
config/argocd-cloudpaks/cp4d/templates/0000-app-namespace.yaml
config/argocd-cloudpaks/cp4i/templates/0300-cp4i-module-template-app.yaml
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
Expand Down

0 comments on commit 76ad087

Please sign in to comment.