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

Proposal: add '--helmchart' and '--values' options for kapp to deploy a helm chart #96

Closed
jessehu opened this issue Mar 30, 2020 · 7 comments
Labels
carvel triage This issue has not yet been reviewed for validity discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution

Comments

@jessehu
Copy link
Contributor

jessehu commented Mar 30, 2020

https://get-kapp.io/ says kapp can be used together with helm template.

# Can be used with helm charts, removing need for Tiller
$ helm template my-chart --values my-vals.yml | kapp -y deploy -a my-chart -f -

Can we add '--helmchart' and '--values' options for kapp to deploy a helm chart ?
kapp -y deploy -a my-chart-app --helm-chart my-chart --values my-vals.yml
or
kapp -y deploy -a my-chart-app --helm-chart my-chart --helm-options "--values my-vals.yml"

@cppforlife
Copy link
Contributor

im reluctant to add this feature directly to kapp since kapp does not know "how to generate templates". this is the same reason why we wouldn't add generating ytt templates functionality into kapp.

what i was considering to do is to change kapp-controller (https://github.com/k14s/kapp-controller), to be able to run as a CLI to be able to orchestrate workflow you mention in a simple command. for example kappctrl deploy -a app1 --helm my-chart --helm-set ... or kappctrl deploy -a app1 -f config.yml where config.yml would be App CRD as documented in kapp-controller project.

@cppforlife cppforlife added the discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution label Mar 30, 2020
@jessehu
Copy link
Contributor Author

jessehu commented Mar 31, 2020

Thanks @cppforlife. My proposal supposes kapp calls helm template to generate the yamls from helm chart.
Will kappctrl deploy -a app1 --helm my-chart --helm-set depends on helm binary or it simply generates kapp CRD and kapp-controller will call helm CLI or API to generate yaml manfests?

@cppforlife
Copy link
Contributor

cppforlife commented Mar 31, 2020

kappctrl deploy -a app1 --helm my-chart --helm-set would call helm binary since it would be a CLI mode for the controller (ie no controller involved at all). of course existing way to use the controller, by submitting app cr, would also work.

@jessehu
Copy link
Contributor Author

jessehu commented Apr 1, 2020

Thanks. That makes sense. Which github repo will kappctl be hosted?
Ah I found carvel-dev/kapp-controller#2 : kappctrl deploy -a app1 --helm stable/postgres

@patsevanton
Copy link

@jessehu I try install helm chart by kappctrl, but get error:

kctrl: Error: unknown shorthand flag: 'a' in -a

How install helm chart by kapp-controller now ?

@github-actions github-actions bot added the carvel triage This issue has not yet been reviewed for validity label Mar 10, 2023
@jessehu
Copy link
Contributor Author

jessehu commented Mar 12, 2023

@patsevanton you can use kctrl app init to deploy a helm chart. It creates an App CR which is described on https://carvel.dev/kapp-controller/docs/v0.43.2/app-spec/ (search for helmChart).

$ kctrl app init
Pre-requisite
Welcome! Before we start on the app creation journey, please ensure the
following pre-requites are met:
* The Carvel suite of tools are installed. Do get familiar with the following
Carvel tools: ytt, imgpkg, vendir, and kbld.
* You have access to an OCI registry, and authenticated locally so that images
can be pushed. e.g. docker login <REGISTRY URL>

Basic Information (Step 1/3)

> Enter the app name (abc): abc

Content
Please provide the location from where your Kubernetes manifests or Helm chart
can be fetched. This will be bundled as a part of the package.
1: Local Directory
2: Github Release
3: Helm Chart from Helm Repository
4: Git Repository
5: Helm Chart from Git Repository
> Enter source (1): 3

@jessehu
Copy link
Contributor Author

jessehu commented Mar 12, 2023

You can also package the helm chart tgz into a container image, then define Carvel Package and PackageInstall CR to deploy this helm chart by creating PackageInstall CR or kctrl package init. Refer to kapp-controller Package Management doc: https://carvel.dev/kapp-controller/docs/v0.43.2/packaging/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
carvel triage This issue has not yet been reviewed for validity discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution
Projects
None yet
Development

No branches or pull requests

3 participants