Skip to content
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

Does helm operator deploy subcharts? #3522

Closed
ahtohio opened this issue Jul 24, 2020 · 4 comments
Closed

Does helm operator deploy subcharts? #3522

ahtohio opened this issue Jul 24, 2020 · 4 comments
Assignees
Labels
language/helm Issue is related to a Helm operator project triage/support Indicates an issue that is a support question.
Milestone

Comments

@ahtohio
Copy link

ahtohio commented Jul 24, 2020

Type of question

Are you asking about community best practices, how to implement a specific feature, or about general context and help around the operator-sdk?

Question

What did you do?
Created helm operator based on helm chart with two subcharts as dependencies. Subcharts are in the 'charts' folder in .tgz format. They are present in corresponding docker image.

What did you expect to see?
Helm operator deploys my chart along with two subcharts in one release

What did you see instead? Under which circumstances?
Helm operator deploys only my chart without subcharts

Environment

  • operator-sdk version:

    operator-sdk version: "v0.19.0", commit: "8e28aca60994c5cb1aec0251b85f0116cc4c9427", kubernetes version: "v1.18.2", go version: "go1.13.10 linux/amd64"

  • Kubernetes version information:

    Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:52:00Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-15T16:51:04Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

  • Kubernetes cluster kind: simple one node cluster, created with kubeadm

@joelanford
Copy link
Member

@ahtohio In general the answer should be yes, the helm operator supports deploying subcharts.

Are you seeing any interesting messages in the operator logs?
Can you try untar-ing the subcharts to see if that helps?

@joelanford joelanford added language/helm Issue is related to a Helm operator project triage/support Indicates an issue that is a support question. labels Jul 24, 2020
@joelanford joelanford self-assigned this Jul 24, 2020
@joelanford joelanford added this to the Backlog milestone Jul 24, 2020
@ahtohio
Copy link
Author

ahtohio commented Jul 24, 2020

@joelanford Untar-ing didn't help. In logs the only interesting thing I see is
{"level":"error","ts":1595601214.3108773,"logger":"controller-runtime.controller","msg":"Reconciler error","controller":"...-controller","request":..","error":"Operation cannot be fulfilled on _mycustomresource_: the object has been modified; please apply your changes to the latest version and try again","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tpkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:258\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\tpkg/mod/k8s.io/apimachinery@v0.18.2/pkg/util/wait/wait.go:155\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\tpkg/mod/k8s.io/apimachinery@v0.18.2/pkg/util/wait/wait.go:156\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tpkg/mod/k8s.io/apimachinery@v0.18.2/pkg/util/wait/wait.go:133\nk8s.io/apimachinery/pkg/util/wait.Until\n\tpkg/mod/k8s.io/apimachinery@v0.18.2/pkg/util/wait/wait.go:90"}

This was not a long after applying my custom resource. But after there were no problems - {"level":"info","ts":1595601215.8219943,"logger":"helm.controller","msg":"Reconciled release","namespace".......

But I think it's not related to my issue. I'll try to make simple project/simplify my own to find out things.

@joelanford
Copy link
Member

joelanford commented Jul 24, 2020

And just as a sanity test, can you also run helm template ./helm-charts/parent-chart and see if that outputs the child chart manifests?

The Helm operator is using helm's library code to load the chart, so I would think the behavior of helm operator and helm template would be the same when templating the manifest.

@ahtohio
Copy link
Author

ahtohio commented Jul 24, 2020

@joelanford Yep, you were right. It's embarrassing - I added 'charts' folder to my .helmignore.
helm dep update downloaded my subcharts, but helm template . tells Error: found in Chart.yaml, but missing in charts/ directory: mysubchart1, mysubchart2
I hope you can add some log entry in operator for blockheads like me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/helm Issue is related to a Helm operator project triage/support Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

2 participants