kubevela/velaux

can't load values.yaml from gitlab

cyxinda opened this issue · 6 comments

Describe the bug
I create application on velaux page.the values.yaml can't be loaded on the page.
1111
the request of get values.yaml is :

{
  "GET": {
    "scheme": "https",
    "host": "***.xxxx.com",
    "filename": "/api/v1/repository/chart/values",
    "query": {
      "repoUrl": "https://xxxxxxx.knowdee.com/api/v4/projects/4/packages/helm/stable",
      "repoType": "helm",
      "secretName": "tests-charts",
      "chart": "my-chart",
      "version": "0.1.0",
      "project": "default"
    },
    "remote": {
      "地址": "xxxxxx"
    }
  }
}

the response is :

    {
     "BusinessCode": 13003,
     "Message": "cannot get the values info of the chart"
    }

the url of the helm chart is https://github.com/cyxinda/my-chart/ ,you can see the content of the helm chart.
you can push the helm charts above to gitlab with the command as follow:

root@ubuntu:#  helm repo add     --username root     --password glpat-xxxxxxx-vgSJju    charts  https://xxxx.knowdee.com/api/v4/projects/4/packages/helm/stable
"charts" has been added to your repositories
root@ubuntu:# ls
my-chart  my-chart-0.1.0.tgz
root@ubuntu:# helm cm-push my-chart charts
Pushing my-chart-0.1.0.tgz to charts...
Done.
root@ubuntu:# helm repo update charts
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "charts" chart repository
Update Complete. ⎈Happy Helming!⎈
root@ubuntu:# helm search repo charts
NAME            CHART VERSION   APP VERSION     DESCRIPTION                
charts/my-chart 0.1.0           1.16.0          A Helm chart for Kubernetes

my helm chart repository is gitlab(the version is 16.0).
2222

Expected behavior
The content of values.yaml can be loaded normally on the velaux page.

KubeVela Version
1.8.2

Can you show the log of velaux apiserver?

Can you show the log of velaux apiserver?

I don't know which pod is velaux apiserver.

[root@xy-5-server19 ~]# kubectl -n vela-system get pods
NAME                                                 READY   STATUS             RESTARTS   AGE
kubevela-cluster-gateway-54957bf4db-kkzjw            1/1     Running            0          9d
kubevela-vela-core-66c6d7ff76-fwb6k                  1/1     Running            0          9d
velaux-server-5b88988bf9-pc8r2                       1/1     Running            0          3m47s

I guess It is the logs you focus:
1111
I don't think it has useful information.

I'm sure there are some log related with this response. Code around is like:

	if err != nil {
		klog.Errorf("cannot fetch chart values repo: %s, chart: %s, version: %s, error: %s", utils.Sanitize(repoURL), utils.Sanitize(chartName), utils.Sanitize(version), err.Error())
		return nil, bcode.ErrGetChartValues
	}

I'm not sure but did you check the logs right after you try to load the values.yaml?

@chivalryq
this is not only gitlab, the harbor under version of 2.8 with chartmuseum plugin cannot load values.yaml,too.
1111
you can check this like this helm chart:
helm repo add tests https://registry.knowdee.com/chartrepo/tests

the same problem happen when I use the example helm chart of kube-vela official document.
It refre to as follow:
2222
3333

this issue is resoved in the version of 1.9.2 .