Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit ac46a1c

Browse files
committed
Update helm repos for charts
Minio and Nginx have moved to new chart locations, and Minio now requests 4Gi of RAM, causing under-spec'd clusters not to start. This PR sets the RAM to 512Mi as a request instead. Untested changes. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent 99caaec commit ac46a1c

File tree

5 files changed

+51
-111
lines changed

5 files changed

+51
-111
lines changed

cmd/apply.go

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414

1515
"github.com/spf13/cobra"
1616

17+
"github.com/alexellis/arkade/pkg/helm"
1718
execute "github.com/alexellis/go-execute/pkg/v1"
1819
"github.com/alexellis/k3sup/pkg/config"
1920
"github.com/alexellis/k3sup/pkg/env"
20-
"github.com/alexellis/k3sup/pkg/helm"
2121
"github.com/openfaas-incubator/ofc-bootstrap/pkg/ingress"
2222
"github.com/openfaas-incubator/ofc-bootstrap/pkg/stack"
2323
"github.com/openfaas-incubator/ofc-bootstrap/pkg/tls"
@@ -109,7 +109,7 @@ func runApplyCommandE(command *cobra.Command, _ []string) error {
109109
return fmt.Errorf("error while retreiving features: %s", featuresErr.Error())
110110
}
111111

112-
const helm3Version = "v3.0.2"
112+
const helm3Version = "v3.1.2"
113113
os.Setenv("HELM_VERSION", helm3Version)
114114

115115
userPath, err := config.InitUserDir()
@@ -278,7 +278,17 @@ func process(plan types.Plan, prefs InstallPreferences, additionalPaths []string
278278
return nsErr
279279
}
280280

281-
if err := helmRepoAddStable(); err != nil {
281+
if err := helmRepoAdd("stable", "https://kubernetes-charts.storage.googleapis.com"); err != nil {
282+
log.Println(err.Error())
283+
return err
284+
}
285+
286+
if err := helmRepoAdd("ingress-nginx", "https://kubernetes.github.io/ingress-nginx"); err != nil {
287+
log.Println(err.Error())
288+
return err
289+
}
290+
291+
if err := helmRepoAdd("minio", "https://helm.min.io/"); err != nil {
282292
log.Println(err.Error())
283293
return err
284294
}
@@ -387,12 +397,33 @@ func process(plan types.Plan, prefs InstallPreferences, additionalPaths []string
387397
return nil
388398
}
389399

400+
func helmRepoAdd(name, repo string) error {
401+
log.Printf("Adding %s helm repo\n", name)
402+
403+
task := execute.ExecTask{
404+
Command: "helm",
405+
Args: []string{"repo", "add", name, repo},
406+
StreamStdio: true,
407+
}
408+
409+
taskRes, taskErr := task.Execute()
410+
411+
if taskErr != nil {
412+
return taskErr
413+
}
414+
415+
if len(taskRes.Stderr) > 0 {
416+
log.Println(taskRes.Stderr)
417+
}
418+
419+
return nil
420+
}
421+
390422
func helmRepoAddStable() error {
391423
log.Println("Adding stable helm repo")
392424

393425
task := execute.ExecTask{
394426
Command: "helm",
395-
Args: []string{"repo", "add", "stable", "https://kubernetes-charts.storage.googleapis.com"},
396427
StreamStdio: true,
397428
}
398429

go.mod

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,15 @@ module github.com/openfaas-incubator/ofc-bootstrap
33
go 1.13
44

55
require (
6-
code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48 // indirect
7-
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
8-
github.com/Microsoft/go-winio v0.4.14 // indirect
9-
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
10-
github.com/alexellis/derek v0.0.0-20200208112839-2f1728856ddb // indirect
6+
github.com/alexellis/arkade v0.0.0-20200819112141-76049b52349f
117
github.com/alexellis/go-execute v0.0.0-20200124154445-8697e4e28c5e
12-
github.com/alexellis/hmac v0.0.0-20180624211220-5c52ab81c0de // indirect
138
github.com/alexellis/k3sup v0.0.0-20200211110243-d7d1e594bc55
14-
github.com/bitnami-labs/sealed-secrets v0.9.8 // indirect
15-
github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41 // indirect
16-
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
17-
github.com/docker/cli v0.0.0-20200221155518-740919cc7fc0 // indirect
18-
github.com/docker/distribution v2.7.1+incompatible // indirect
19-
github.com/docker/docker v1.13.1 // indirect
20-
github.com/docker/docker-credential-helpers v0.6.3 // indirect
21-
github.com/docker/go-connections v0.4.0 // indirect
22-
github.com/docker/go-metrics v0.0.1 // indirect
23-
github.com/docker/go-units v0.4.0 // indirect
24-
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 // indirect
25-
github.com/drone/envsubst v1.0.2 // indirect
26-
github.com/google/go-github v17.0.0+incompatible // indirect
27-
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
28-
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
299
github.com/imdario/mergo v0.3.8
3010
github.com/inlets/inletsctl v0.0.0-20200211123457-caff14436308
3111
github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a
3212
github.com/morikuni/aec v1.0.0
33-
github.com/onsi/ginkgo v1.12.0 // indirect
34-
github.com/onsi/gomega v1.9.0 // indirect
35-
github.com/opencontainers/image-spec v1.0.1 // indirect
36-
github.com/opencontainers/runc v0.1.1 // indirect
37-
github.com/openfaas/faas v0.0.0-20200224130102-7f5ba7d4351a // indirect
38-
github.com/openfaas/faas-cli v0.0.0-20200222103242-ea687659ecf1 // indirect
39-
github.com/openfaas/faas-provider v0.15.0 // indirect
40-
github.com/openfaas/openfaas-cloud v0.0.0-20200224104731-641b1e0a1d2f // indirect
41-
github.com/opentracing/opentracing-go v1.1.0 // indirect
4213
github.com/pkg/errors v0.9.1
43-
github.com/prometheus/client_golang v1.4.1 // indirect
44-
github.com/ryanuber/go-glob v1.0.0 // indirect
4514
github.com/spf13/cobra v0.0.5
15+
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
4616
gopkg.in/yaml.v2 v2.2.8
47-
gotest.tools v2.2.0+incompatible // indirect
48-
k8s.io/apimachinery v0.17.3 // indirect
49-
k8s.io/client-go v11.0.0+incompatible // indirect
5017
)

0 commit comments

Comments
 (0)