catalog
catalog copied to clipboard
[Addon] Fix #695 using vela existing addon packaging
Description of your changes
As mentionned in https://github.com/kubevela/catalog/issues/695 the addon chart published by hack/addons/syn_addon_package.go does not generate a proper helm chart with a Chart.yaml in it.
This pull request makes use of the existing vela cli capability to publish addons and that properly covers the generation of the Chart.yaml file as shown in vela source code github.com/oam-dev/kubevela/pkg/addon
package that is using the MakeChartCompatible routine. (See https://github.com/kubevela/kubevela/blob/e109d4e525dfc253e861c82901d3947688555d7c/pkg/addon/utils.go#L367)
The PR also adds mandatory template.cue where missing and fix invalid (non semver) chart version on spark-on-k8s-operator
experimental addon
Fixes #695
How has this code been tested?
The change has been tested following the github actions:
go mod tidy
cd addons && go run ../../hack/addons/syn_addon_package.go ./ https://kubevela.github.io/catalog/official
cd experimental/addons && go run ../../hack/addons/syn_addon_package.go ./ https://kubevela.github.io/catalog/experimental
Checklist
I have:
- [X] Title of the PR starts with type (e.g.
[Addon]
,[example]
or[Doc]
). - [X] Updated/Added any relevant documentation and examples.
- [X] New addon should be put in experimental.
- [X] Update addon should modify the
version
inmetadata.yaml
to generate a new version.
Regarding the failed addon-e2e test. The changes of the following files are to make the original addon chart proper as vela expect a mandatory template.cue file (even with empty output) for the addon.
- addons/o11y-definitions/template.cue
- addons/vegeta/template.cue
- experimental/addons/canary-rollout-istio/template.cue
- experimental/addons/envoy-gateway/template.cue
- experimental/addons/vector-config/template.cue
The chart version seems unfortunately to be linked to the actual addon application tag in github (instead of using appVersion) so I am not sure my PR has to update the chart version, should it ?
Thanks, please refer the failed CI info and fix them.
Note that I could not use semver build metadata due to https://github.com/kubernetes/kubernetes/issues/115055 issue
Thanks, please refer the failed CI info and fix them.
Hi @wangyikewxgm , @wonderflow, @barnettZQG, @Somefive, done, waiting for your review
ping @Somefive @barnettZQG , please help review, this feature can be useful.
ping @Somefive @barnettZQG , @wangyikewxgm please help review