catalog icon indicating copy to clipboard operation
catalog copied to clipboard

[Addon] Fix #695 using vela existing addon packaging

Open scodeman opened this issue 1 year ago • 6 comments

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 in metadata.yaml to generate a new version.

scodeman avatar Aug 02 '23 10:08 scodeman

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 ?

scodeman avatar Aug 02 '23 10:08 scodeman

Thanks, please refer the failed CI info and fix them.

wangyikewxgm avatar Aug 23 '23 07:08 wangyikewxgm

Note that I could not use semver build metadata due to https://github.com/kubernetes/kubernetes/issues/115055 issue

scodeman avatar Sep 11 '23 08:09 scodeman

Thanks, please refer the failed CI info and fix them.

Hi @wangyikewxgm , @wonderflow, @barnettZQG, @Somefive, done, waiting for your review

scodeman avatar Sep 11 '23 09:09 scodeman

ping @Somefive @barnettZQG , please help review, this feature can be useful.

wonderflow avatar Dec 25 '23 02:12 wonderflow

ping @Somefive @barnettZQG , @wangyikewxgm please help review

scodeman avatar May 02 '24 09:05 scodeman