-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
operator-sdk doesn't honor the dependencies of sub-charts of the child charts #6575
Comments
Ok, so making sure I understand the specific details here:
And what you're actually seeing is that the level 3 operators are always installed. Is the above correct? |
Yes @joelanford |
If we look into it, it is expected behavior of helm . If we package the chart and install it $ helm package helm/hello-world/
$ helm install hello-world-0.1.0.tgz --generate-name we could see the disabled 3rd level charts installed as well |
Ok, I think I have a working fix for your chart. I tested locally and it seemed to work:
dependencies:
- name: nginx
version: "1.2.3"
repository: "file://../dependency_chart/nginx" |
I'll take a look at it |
@joelanford, I tried this method, I've moved the
And ran
And again getting the error
|
Interesting. I'm seeing the same issue when using |
Looks like this needs more investigation. Adding this to backlog for now. |
Hi @joelanford , it seems to be working for us. Thanks for the solution
|
Great! Sounds like we can close this out? |
Hey @joelanford , Let's not close it. There is still an issue which we're facing that is. # helm dependency build will create a charts folder with the compressed dependency i.e prometheus
$ helm dependency build helm/hello-world
# helm package helm/hello-world
# helm push hello-world-v0.1.0.tar.gz Now we have |
I don't think I would consider this a bug. The Ultimately, I think there are two separate things at play here, that together present the problem you're having:
There's an issue in the helm repo I filed a few years ago that I'm pretty sure is related to this area: helm/helm#8120. The stalebot closed it out, so as far as I know, nothing was ever done to fix it. Anything we do here (even if we could) would just be a workaround to the underlying issues in helm. I'd prefer we pursue a fix in helm that we could then incorporate here. |
Hello everyone |
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 |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Bug Report
In Continuation of Issue.
Bug Demo Repository: https://github.com/r4rajat/operator-sdk-bug-2
As per suggestion, if we remove dependencies from parent chart in this case from
hello-world
chart, and disable sub-charts i.ealertmanager
,kube-state-metrics
,prometheus-node-exporter
andprometheus-pushgateway
from the child chart i.eprometheus
: And Install the Operator and operand, we could see the deployments of disabled sub-chartsWhat did you do?
$ git clone https://github.com/r4rajat/operator-sdk-bug-2 $ cd ./operator-sdk-bug-2
What did you expect to see?
Deployments/Pods for disabled sub-charts should not install
What did you see instead? Under which circumstances?
Deployments/Pods for disabled sub-charts are installed
Environment
Operator type:
/language helm
Kubernetes cluster type:
The type of cluster used for testing/deployment: OpenShift v4.12.25
$ operator-sdk version
operator-sdk version: "v1.31.0", commit: "e67da35ef4fff3e471a208904b2a142b27ae32b1", kubernetes version: "1.26.0", go version: "go1.19.11", GOOS: "linux", GOARCH: "amd64"
$ go version
(if language is Go)go version go1.21.1 linux/amd64
$ kubectl version
Client Version: v1.28.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.25.11+1485cc9
WARNING: version difference between client (1.28) and server (1.25) exceeds the supported minor version skew of +/-1
Possible Solution
Additional context
#6557
The text was updated successfully, but these errors were encountered: