2
2
3
3
# DISCLAIMER
4
4
#
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.
7
6
# - There is currently not a mechanism to actually preview against multiple clusters
8
7
# (i.e. a hub and a remote). All previews will be done against the current.
9
8
# - Make output can be included in the YAML.
@@ -22,11 +21,22 @@ if [ "${APPNAME}" != "clustergroup" ]; then
22
21
# path: charts/all/foo
23
22
# So we retrieve the actual index ("foobar") given the name attribute of the application
24
23
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
26
34
namespace=$( yq " .clusterGroup.applications.$APP .namespace" values-$SITE .yaml)
27
35
else
28
36
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} "
30
40
namespace=" openshift-operators"
31
41
fi
32
42
pattern=$( yq " .global.pattern" values-global.yaml)
0 commit comments