22
33# DISCLAIMER
44#
5- # - Parsing of applications needs to be more clever. Currently the code assumes that all
6- # targets will be local charts. This is not true, for example, in industrial-edge.
5+ # - Parsing of applications needs to be more clever.
76# - There is currently not a mechanism to actually preview against multiple clusters
87# (i.e. a hub and a remote). All previews will be done against the current.
98# - Make output can be included in the YAML.
@@ -22,11 +21,22 @@ if [ "${APPNAME}" != "clustergroup" ]; then
2221 # path: charts/all/foo
2322 # So we retrieve the actual index ("foobar") given the name attribute of the application
2423 APP=$( yq " .clusterGroup.applications | with_entries(select(.value.name == \" $APPNAME \" )) | keys | .[0]" values-$SITE .yaml)
25- chart=$( yq " .clusterGroup.applications.$APP .path" values-$SITE .yaml)
24+ isLocalHelmChart=$( yq " .clusterGroup.applications.$APP .path" values-$SITE .yaml)
25+ if [ $isLocalHelmChart != " null" ]; then
26+ chart=$( yq " .clusterGroup.applications.$APP .path" values-$SITE .yaml)
27+ else
28+ helmrepo=$( yq " .clusterGroup.applications.$APP .repoURL" values-$SITE .yaml)
29+ helmrepo=" ${helmrepo: +oci:// quay.io/ hybridcloudpatterns} "
30+ chartversion=$( yq " .clusterGroup.applications.$APP .chartVersion" values-$SITE .yaml)
31+ chartname=$( yq " .clusterGroup.applications.$APP .chart" values-$SITE .yaml)
32+ chart=" ${helmrepo} /${chartname} --version ${chartversion} "
33+ fi
2634 namespace=$( yq " .clusterGroup.applications.$APP .namespace" values-$SITE .yaml)
2735else
2836 APP=$APPNAME
29- chart=" common/clustergroup"
37+ clusterGroupChartVersion=$( yq " .main.multiSourceConfig.clusterGroupChartVersion" values-global.yaml)
38+ helmrepo=" oci://quay.io/hybridcloudpatterns"
39+ chart=" ${helmrepo} /clustergroup --version ${clusterGroupChartVersion} "
3040 namespace=" openshift-operators"
3141fi
3242pattern=$( yq " .global.pattern" values-global.yaml)
0 commit comments