operator-sdk: Init for chart with local dependencies is failing
Bug Report
What did you do?
- Clone the our git repository
- Set the current directory to root of HELM chart
- Running:
operator-sdk init --plugins helm --domain=run.ai --helm-chart=.
The Chart.yaml contains:
- name: prometheus-pushgateway
repository: "file://./subcharts/prometheus-pushgateway"
version: 1.0.1
condition: prometheus-pushgateway.enabled
Note: subcharts/prometheus-pushgateway is valid HELM chart
What did you expect to see?
I expect the command to pass without errors.
What did you see instead? Under which circumstances?
I see the help message of init with helm plugin and the following error:
FATA[0000] failed to initialize project with "": failed to fetch chart dependencies: directory /tmp/osdk-helm-chart946952279/runai-operator/subcharts/prometheus-pushgateway not found
Environment
Operator type:
language helm
version.BuildInfo{Version:“v3.5.3”, GitCommit:“041ce5a2c17a58be0fcd5f5e16fb3e7e95fea622”, GitTreeState:“dirty”, GoVersion:“go1.15.8”}
Kubernetes cluster type:
OpenShift
$ operator-sdk version
operator-sdk version: “v1.5.0”, commit: “98f30d59ade2d911a7a8c76f0169a7de0dec37a0”, kubernetes version: “1.19.4”, go version: “go1.15.5”, GOOS: “linux”, GOARCH: “amd64”
$ kubectl version
Client Version: version.Info{Major:“1”, Minor:“20”, GitVersion:“v1.20.1-5-g76a04fc”, GitCommit:“c66c03f3012a10f16eb86fdce6330433adf6c9ee”, GitTreeState:“clean”, BuildDate:“2021-03-01T03:35:08Z”, GoVersion:“go1.15.5”, Compiler:“gc”, Platform:“linux/amd64”} Server Version: version.Info{Major:“1”, Minor:“20”, GitVersion:“v1.20.0+5fbfd19”, GitCommit:“5fbfd197c16d3c5facbaa1d7b9f3ea58cf6b36e9”, GitTreeState:“clean”, BuildDate:“2021-02-17T15:21:33Z”, GoVersion:“go1.15.5”, Compiler:“gc”, Platform:“linux/amd64”}
Additional context
I am trying to create operator bundle.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 23 (12 by maintainers)
Update the workarounds for
runai-operator-2.0.3.tgz
(https://storage.googleapis.com/runai-charts/runai-operator-2.0.3.tgz):– Step 0). download and unpack
runai-operator-2.0.3.tgz
Step 1). open
runai-operator
folder, and change the sub-folder name fromcharts
tosubcharts
–> (to match the local repository path for dependencies inChart.yaml
)Step 2).
operator-sdk init --plugins helm --helm-chart ./runai-operator
–> Successfully generated the projects with subcharts.