-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Init for chart with local dependencies is failing #4689
Comments
The problem here shows related to the chart itself and not to operator-sdk. Are you enable to deploy and use the chart without changing its default config? Are you not facing the same issue by doing that without creating the operator? |
Yes, I can create it, the question is why it is trying to find the chart in different location (/tmp/osdk-helm-chart946952279)? |
Could you pass the Helm chart used for we are able to try to reproduce it? |
Hi,
And got:
Then I extract it to test directory and run:
And got:
I checked and this directory doesn't exist, actually:
Returns:
While:
Print:
Note that this chart is for HELM 3.x and the subcharts was feature of HELM 2.x. Thanks |
Hi @AssafKatz3, The error:
It is because the chart was not found. Note that you privately shared with us a tar.gz which has an operator project (./runai-operator-2.0.3.tgz) and not only helm-charts. Also, is expected that you inform 1 chart per time. You cannot create 1 API for Many charts. You need one API per chart and that might be your issue. You should not inform an tar.gz of a helm-based operator. However, I also might found an issue on master, see:
The Helm should not be looking for the field repo. |
Hi,
I have the 1 chart that I try to create API for it - runai-operator. This chart contains (conditional) references to other charts and they happen to be saved inside its folder. Its seems that operator SDK misinterprets the situation, assumes that I tries to create APIs to multi project and therefore searches for subcharts folder. I don't understand the statement: Thanks |
Hi @AssafKatz3, The scenario/mock sent is not valid to be used with the create api subcommand as described in #4689 (comment). The tool expects only 1 chart which means that each API will be created based on 1 specific chart. Seems that you are trying to use the create api to create one API with many charts ( data sent in private ) or based on your latest comment that you are trying to use a scenario where 1 chart has sub-charts which seems not supported either. You can check the logic used here. |
Hi @camilamacedo86 , |
HI @AssafKatz3, By looking in the old open issues here which are related to your scenario I found some interesting things. See: #3522 (comment) (so subhcart are supported) and then see that your scenario seems indeed duplicated of #2942. Could you please check that? Also, note that the file send private was not a chart and was an invalid scenario (#4689 (comment)). And then, the best approach to get help from the community would be to create a scenario where we can reproduce the issue and then, submit that on GitHub. Otherwise, collaborators from the community have no chance to try to help on that. |
Hi @camilamacedo86 I cannot send the real chart to public but I will try to craft variant of example file in #3522 with our scainrio (It will be much simpler anyway then real complex chart). Thanks |
Hi, |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
@varshaprasad96 @fabianvf have you seen this issue, and will the new helm-operator fix this issue? |
I haven't tested out this particular scenario, but this issue needs to be investigated. If the bug is related to SDK looking at the wrong location for dependent helm charts while creating api, then this is something which would occur with the new hybrid-helm operator too. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
@tlwu2013 will verify this is still a problem. |
Confirm still seeing this issue with SDK version |
Update the workarounds for -- Step 1). open Step 2).
|
Closed with documented workaround, please feel free to re-open if this does not solve the issue |
Hi everyone 🖖 I believe this is still a problem 😭 For example, in the project I work, the helm charts has local dependy dependencies:
- name: exporters
version: 2.0.10-rc.5
repository: file://./charts/exporters And if I run this commands in the project root mkdir bug
cd bug
operator-sdk init --plugins=helm --domain=test-bug --project-name=test-bug
operator-sdk create api --helm-chart=../charts/pelorus/ I get
And I belive the problem is that my work around for this is copying the files before running These steps work mkdir bug
cd bug
operator-sdk init --plugins=helm --domain=test-bug --project-name=test-bug
mkdir -p helm-charts/pelorus/charts/exporters
cp -r ../charts/pelorus/charts/exporters/* helm-charts/pelorus/charts/exporters
operator-sdk create api --helm-chart=../charts/pelorus/ The responsibility of copying the dependency as files instead of |
Bug Report
What did you do?
The Chart.yaml contains:
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.
The text was updated successfully, but these errors were encountered: