[Addon] Fix #695 using vela existing addon packaging #714
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of your changes
As mentionned in #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 addonFixes #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:
[Addon]
,[example]
or[Doc]
).version
inmetadata.yaml
to generate a new version.