Skip to content

Commit

Permalink
fix: Wait for entitlement key
Browse files Browse the repository at this point in the history
  • Loading branch information
nastacio committed Jun 8, 2022
1 parent 97b29d7 commit 2fe8875
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 10 deletions.
1 change: 1 addition & 0 deletions config/cloudpaks/cp4i/install-prereqs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ serviceaccount:
ibm_cloudpaks_installer: ibm-cp4i-installer
metadata:
argocd_namespace: openshift-gitops
argocd_app_namespace: ibm-cloudpaks
storageclass:
rwo: ocs-storagecluster-ceph-rbd
rwx: ocs-storagecluster-cephfs
Expand Down
4 changes: 2 additions & 2 deletions config/rhacm/cloudpaks/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.3.1
version: 0.3.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: "0.5.1"
appVersion: 0.8.4
4 changes: 3 additions & 1 deletion config/rhacm/cloudpaks/templates/policy-cp-shared.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ spec:
kind: Application
metadata:
name: cp-shared-app
namespace: openshift-gitops
# Look up used to delay the application of the policy
# until this secret is created
namespace: '{{ "{{ (lookup \"v1\" \"Secret\" \"openshift-gitops\" \"ibm-entitlement-key\").metadata.namespace }}" }}'
spec:
destination:
namespace: "{{.Values.metadata.argocd_app_namespace}}"
Expand Down
4 changes: 3 additions & 1 deletion config/rhacm/cloudpaks/templates/policy-cp4a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ spec:
kind: Application
metadata:
name: cp4a-app
namespace: openshift-gitops
# Look up used to delay the application of the policy
# until this secret is created
namespace: '{{ "{{ (lookup \"v1\" \"Secret\" \"openshift-gitops\" \"ibm-entitlement-key\").metadata.namespace }}" }}'
spec:
destination:
namespace: '{{ "{{ fromClusterClaim \"cp4a\" }}" }}'
Expand Down
4 changes: 3 additions & 1 deletion config/rhacm/cloudpaks/templates/policy-cp4aiops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ spec:
kind: Application
metadata:
name: cp4aiops-app
namespace: openshift-gitops
# Look up used to delay the application of the policy
# until this secret is created
namespace: '{{ "{{ (lookup \"v1\" \"Secret\" \"openshift-gitops\" \"ibm-entitlement-key\").metadata.namespace }}" }}'
spec:
destination:
namespace: '{{ "{{ fromClusterClaim \"cp4aiops\" }}" }}'
Expand Down
4 changes: 3 additions & 1 deletion config/rhacm/cloudpaks/templates/policy-cp4d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ spec:
kind: Application
metadata:
name: cp4d-app
namespace: openshift-gitops
# Look up used to delay the application of the policy
# until this secret is created
namespace: '{{ "{{ (lookup \"v1\" \"Secret\" \"openshift-gitops\" \"ibm-entitlement-key\").metadata.namespace }}" }}'
spec:
destination:
namespace: '{{ "{{ fromClusterClaim \"cp4d\" }}" }}'
Expand Down
4 changes: 3 additions & 1 deletion config/rhacm/cloudpaks/templates/policy-cp4i.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ spec:
kind: Application
metadata:
name: cp4i-app
namespace: openshift-gitops
# Look up used to delay the application of the policy
# until this secret is created
namespace: '{{ "{{ (lookup \"v1\" \"Secret\" \"openshift-gitops\" \"ibm-entitlement-key\").metadata.namespace }}" }}'
spec:
destination:
namespace: '{{ "{{ fromClusterClaim \"cp4i\" }}" }}'
Expand Down
4 changes: 3 additions & 1 deletion config/rhacm/cloudpaks/templates/policy-cp4s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ spec:
kind: Application
metadata:
name: cp4s-app
namespace: openshift-gitops
# Look up used to delay the application of the policy
# until this secret is created
namespace: '{{ "{{ (lookup \"v1\" \"Secret\" \"openshift-gitops\" \"ibm-entitlement-key\").metadata.namespace }}" }}'
spec:
destination:
namespace: '{{ "{{ fromClusterClaim \"cp4s\" }}" }}'
Expand Down
10 changes: 8 additions & 2 deletions tests/prebuild/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ log "INFO: Completed yamllint run: ${yl_result}"

log "INFO: Starting helm lint run"
hl_result=0
find . -name Chart.yaml | sed "s|/Chart.yaml||g" | xargs helm lint || hl_result=1
find . -name Chart.yaml \
| grep -v /config/rhacm/cloudpaks \
| sed "s|/Chart.yaml||g" \
| xargs helm lint \
|| hl_result=1
log "INFO: Completed helm lint run: ${hl_result}"

log "INFO: Starting helm template run"
Expand All @@ -85,7 +89,9 @@ do
if [ ${htl} -eq 1 ]; then
ht_result=1;
fi
done <<< "$(find . -name Chart.yaml | sed "s|/Chart.yaml||g")"
done <<< "$(find . -name Chart.yaml \
| grep -v /config/rhacm/cloudpaks \
| sed "s|/Chart.yaml||g")"
log "INFO: Completed helm template run: ${ht_result}"

result=$((sc_result+yl_result+hl_result+ht_result))
Expand Down

0 comments on commit 2fe8875

Please sign in to comment.