Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit b6d3d89

Browse files
Removing Helm command until we find a way to re-introduce it with CNAB.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
1 parent 20ebb61 commit b6d3d89

21 files changed

Lines changed: 4 additions & 2356 deletions

File tree

README.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -160,26 +160,6 @@ cp docker-app-linux /usr/local/bin/docker-app
160160

161161
**Note:** To use Application Packages as images (i.e.: `save`, `push`, or `deploy` when package is not present locally) on Windows, one must be in Linux container mode.
162162

163-
## Integrating with Helm
164-
165-
`docker-app` comes with a few other helpful commands as well, in particular the ability to create Helm Charts from your Docker Applications. This can be useful if you're adopting Kubernetes, and standardising on Helm to manage the lifecycle of your application components, but want to maintain the simplicity of Compose when writing you applications. This also makes it easy to run the same applications locally just using Docker, if you don't want to be running a full Kubernetes cluster.
166-
167-
```
168-
$ docker-app helm
169-
```
170-
171-
This will create a folder, `<my-application-name>.chart`, in the current directory. The folder contains the required `Chart.yaml` file and templates describing the `stack` Kubernetes object based on the Compose file in your application.
172-
173-
_Note that this requires the Compose Kubernetes controller available in Docker for Windows and Docker for Mac, and in Docker Enterprise Edition._
174-
175-
### Helm chart for Docker EE 2.0
176-
177-
In order to create a helm chart that is compatible with version 2.0 of Docker Enterprise Edition, you will need to use the `--stack-version` flag to create a compatible version of the helm chart using `v1beta1` like so:
178-
179-
```bash
180-
$ docker-app helm --stack-version=v1beta1
181-
```
182-
183163
## Single file or directory representation
184164

185165
If you prefer having the three core documents in separate YAML files, omit the `-s` / `--single-file` option to
@@ -265,7 +245,6 @@ Commands:
265245
completion Generates completion scripts for the specified shell (bash or zsh)
266246
deploy Deploy or update an application
267247
fork Create a fork of an existing application to be modified
268-
helm Generate a Helm chart
269248
init Start building a Docker application
270249
inspect Shows metadata, settings and a summary of the compose file for a given application
271250
merge Merge a multi-file application into a single file

cmd/docker-app/helm.go

Lines changed: 0 additions & 56 deletions
This file was deleted.

cmd/docker-app/root.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ func addCommands(cmd *cobra.Command, dockerCli command.Cli) {
4545
cmd.AddCommand(
4646
deployCmd(dockerCli),
4747
forkCmd(),
48-
helmCmd(),
4948
initCmd(),
5049
inspectCmd(dockerCli),
5150
mergeCmd(dockerCli),

e2e/commands_test.go

Lines changed: 4 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ maintainers:
157157
func TestDetectApp(t *testing.T) {
158158
// cwd = e2e
159159
dir := fs.NewDir(t, "detect-app-binary",
160-
fs.WithDir("helm.dockerapp", fs.FromDir("testdata/helm.dockerapp")),
160+
fs.WithDir("attachments.dockerapp", fs.FromDir("testdata/attachments.dockerapp")),
161161
fs.WithDir("render",
162162
fs.WithDir("app1.dockerapp", fs.FromDir("testdata/render/envvariables/my.dockerapp")),
163163
fs.WithDir("app2.dockerapp", fs.FromDir("testdata/render/envvariables/my.dockerapp")),
@@ -170,11 +170,11 @@ func TestDetectApp(t *testing.T) {
170170
}).Assert(t, icmd.Success)
171171
icmd.RunCmd(icmd.Cmd{
172172
Command: []string{dockerApp, "inspect"},
173-
Dir: dir.Join("helm.dockerapp"),
173+
Dir: dir.Join("attachments.dockerapp"),
174174
}).Assert(t, icmd.Success)
175175
icmd.RunCmd(icmd.Cmd{
176176
Command: []string{dockerApp, "inspect", "."},
177-
Dir: dir.Join("helm.dockerapp"),
177+
Dir: dir.Join("attachments.dockerapp"),
178178
}).Assert(t, icmd.Success)
179179
result := icmd.RunCmd(icmd.Cmd{
180180
Command: []string{dockerApp, "inspect"},
@@ -191,20 +191,14 @@ func TestPack(t *testing.T) {
191191
tempDir, err := ioutil.TempDir("", "dockerapp")
192192
assert.NilError(t, err)
193193
defer os.RemoveAll(tempDir)
194-
icmd.RunCommand(dockerApp, "pack", "testdata/helm", "-o", filepath.Join(tempDir, "test.dockerapp")).Assert(t, icmd.Success)
194+
icmd.RunCommand(dockerApp, "pack", "testdata/attachments", "-o", filepath.Join(tempDir, "test.dockerapp")).Assert(t, icmd.Success)
195195
// check that our commands run on the packed version
196196
icmd.RunCommand(dockerApp, "inspect", filepath.Join(tempDir, "test")).Assert(t, icmd.Expected{
197197
Out: "myapp",
198198
})
199199
icmd.RunCommand(dockerApp, "render", filepath.Join(tempDir, "test")).Assert(t, icmd.Expected{
200200
Out: "nginx",
201201
})
202-
icmd.RunCmd(icmd.Cmd{
203-
Command: []string{dockerApp, "helm", "test"},
204-
Dir: tempDir,
205-
}).Assert(t, icmd.Success)
206-
_, err = os.Stat(filepath.Join(tempDir, "test.chart", "Chart.yaml"))
207-
assert.NilError(t, err)
208202
assert.NilError(t, os.Mkdir(filepath.Join(tempDir, "output"), 0755))
209203
icmd.RunCmd(icmd.Cmd{
210204
Command: []string{dockerApp, "unpack", "test", "-o", "output"},
@@ -214,41 +208,6 @@ func TestPack(t *testing.T) {
214208
assert.NilError(t, err)
215209
}
216210

217-
func TestHelm(t *testing.T) {
218-
t.Run("default", testHelm(""))
219-
t.Run("v1beta1", testHelm("v1beta1"))
220-
t.Run("v1beta2", testHelm("v1beta2"))
221-
}
222-
223-
func testHelm(version string) func(*testing.T) {
224-
return func(t *testing.T) {
225-
dir := fs.NewDir(t, "testHelmBinary", fs.FromDir("testdata"))
226-
defer dir.Remove()
227-
cmd := []string{dockerApp, "helm", "helm", "-s", "myapp.nginx_version=2"}
228-
if version != "" {
229-
cmd = append(cmd, "--stack-version", version)
230-
}
231-
icmd.RunCmd(icmd.Cmd{
232-
Command: cmd,
233-
Dir: dir.Path(),
234-
}).Assert(t, icmd.Success)
235-
236-
chart := golden.Get(t, dir.Join("helm.chart/Chart.yaml"))
237-
values := golden.Get(t, dir.Join("helm.chart/values.yaml"))
238-
stack := golden.Get(t, dir.Join("helm.chart/templates/stack.yaml"))
239-
assert.Check(t, golden.String(string(chart), "helm-expected.chart/Chart.yaml"))
240-
assert.Check(t, golden.String(string(values), "helm-expected.chart/values.yaml"))
241-
assert.Check(t, golden.String(string(stack), "helm-expected.chart/templates/stack"+version+".yaml"))
242-
}
243-
}
244-
245-
func TestHelmInvalidStackVersion(t *testing.T) {
246-
icmd.RunCommand(dockerApp, "helm", "testdata/helm", "--stack-version", "foobar").Assert(t, icmd.Expected{
247-
ExitCode: 1,
248-
Err: `Error: invalid stack version "foobar" (accepted values: v1beta1, v1beta2)`,
249-
})
250-
}
251-
252211
func TestSplitMerge(t *testing.T) {
253212
icmd.RunCommand(dockerApp, "merge", "testdata/render/envvariables/my.dockerapp", "-o", "remerged.dockerapp").Assert(t, icmd.Success)
254213
defer os.Remove("remerged.dockerapp")

e2e/testdata/helm-expected.chart/Chart.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

e2e/testdata/helm-expected.chart/templates/stack.yaml

Lines changed: 0 additions & 66 deletions
This file was deleted.

e2e/testdata/helm-expected.chart/templates/stackv1beta1.yaml

Lines changed: 0 additions & 68 deletions
This file was deleted.

e2e/testdata/helm-expected.chart/templates/stackv1beta2.yaml

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)