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

Commit

Permalink
Update helm repos for charts
Browse files Browse the repository at this point in the history
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) <[email protected]>
  • Loading branch information
alexellis committed Aug 20, 2020
1 parent 99caaec commit ac46a1c
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 111 deletions.
39 changes: 35 additions & 4 deletions cmd/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (

"github.com/spf13/cobra"

"github.com/alexellis/arkade/pkg/helm"
execute "github.com/alexellis/go-execute/pkg/v1"
"github.com/alexellis/k3sup/pkg/config"
"github.com/alexellis/k3sup/pkg/env"
"github.com/alexellis/k3sup/pkg/helm"
"github.com/openfaas-incubator/ofc-bootstrap/pkg/ingress"
"github.com/openfaas-incubator/ofc-bootstrap/pkg/stack"
"github.com/openfaas-incubator/ofc-bootstrap/pkg/tls"
Expand Down Expand Up @@ -109,7 +109,7 @@ func runApplyCommandE(command *cobra.Command, _ []string) error {
return fmt.Errorf("error while retreiving features: %s", featuresErr.Error())
}

const helm3Version = "v3.0.2"
const helm3Version = "v3.1.2"
os.Setenv("HELM_VERSION", helm3Version)

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

if err := helmRepoAddStable(); err != nil {
if err := helmRepoAdd("stable", "https://kubernetes-charts.storage.googleapis.com"); err != nil {
log.Println(err.Error())
return err
}

if err := helmRepoAdd("ingress-nginx", "https://kubernetes.github.io/ingress-nginx"); err != nil {
log.Println(err.Error())
return err
}

if err := helmRepoAdd("minio", "https://helm.min.io/"); err != nil {
log.Println(err.Error())
return err
}
Expand Down Expand Up @@ -387,12 +397,33 @@ func process(plan types.Plan, prefs InstallPreferences, additionalPaths []string
return nil
}

func helmRepoAdd(name, repo string) error {
log.Printf("Adding %s helm repo\n", name)

task := execute.ExecTask{
Command: "helm",
Args: []string{"repo", "add", name, repo},
StreamStdio: true,
}

taskRes, taskErr := task.Execute()

if taskErr != nil {
return taskErr
}

if len(taskRes.Stderr) > 0 {
log.Println(taskRes.Stderr)
}

return nil
}

func helmRepoAddStable() error {
log.Println("Adding stable helm repo")

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

Expand Down
37 changes: 2 additions & 35 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,15 @@ module github.com/openfaas-incubator/ofc-bootstrap
go 1.13

require (
code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48 // indirect
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Microsoft/go-winio v0.4.14 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/alexellis/derek v0.0.0-20200208112839-2f1728856ddb // indirect
github.com/alexellis/arkade v0.0.0-20200819112141-76049b52349f
github.com/alexellis/go-execute v0.0.0-20200124154445-8697e4e28c5e
github.com/alexellis/hmac v0.0.0-20180624211220-5c52ab81c0de // indirect
github.com/alexellis/k3sup v0.0.0-20200211110243-d7d1e594bc55
github.com/bitnami-labs/sealed-secrets v0.9.8 // indirect
github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/docker/cli v0.0.0-20200221155518-740919cc7fc0 // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v1.13.1 // indirect
github.com/docker/docker-credential-helpers v0.6.3 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-metrics v0.0.1 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 // indirect
github.com/drone/envsubst v1.0.2 // indirect
github.com/google/go-github v17.0.0+incompatible // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
github.com/imdario/mergo v0.3.8
github.com/inlets/inletsctl v0.0.0-20200211123457-caff14436308
github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a
github.com/morikuni/aec v1.0.0
github.com/onsi/ginkgo v1.12.0 // indirect
github.com/onsi/gomega v1.9.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/opencontainers/runc v0.1.1 // indirect
github.com/openfaas/faas v0.0.0-20200224130102-7f5ba7d4351a // indirect
github.com/openfaas/faas-cli v0.0.0-20200222103242-ea687659ecf1 // indirect
github.com/openfaas/faas-provider v0.15.0 // indirect
github.com/openfaas/openfaas-cloud v0.0.0-20200224104731-641b1e0a1d2f // indirect
github.com/opentracing/opentracing-go v1.1.0 // indirect
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.4.1 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/spf13/cobra v0.0.5
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v2 v2.2.8
gotest.tools v2.2.0+incompatible // indirect
k8s.io/apimachinery v0.17.3 // indirect
k8s.io/client-go v11.0.0+incompatible // indirect
)
Loading

0 comments on commit ac46a1c

Please sign in to comment.