Skip to content

Commit b45136c

Browse files
bug: fixing some installation related bugs (#30)
after introducing the token based authentication and the localhost installation without ssh some bugs remained. these were caught while developing the integration test suite for the project. - the configuration overwrite question logic was inverted. - we need to also create the namespace when installing custom helm. - forcing the init script creation.
1 parent 9cf094e commit b45136c

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

cmd/helmvm/install.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ func copyUserProvidedConfig(c *cli.Context) error {
151151
// configuration file.
152152
func overwriteExistingConfig() (bool, error) {
153153
var useCurrent = &survey.Confirm{
154-
Message: "Do you want to use the existing configuration ?",
155-
Default: true,
154+
Message: "Do you want to create a new cluster configuration ?",
155+
Default: false,
156156
}
157157
logrus.Warn("A cluster configuration file was found. This means you already")
158158
logrus.Warn("have created a cluster configured. You can either use the existing")

pkg/addons/custom/custom.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ func (c *Custom) applyChart(ctx context.Context, chart *chart.Chart, values map[
6969
act := action.NewInstall(c.config)
7070
act.Namespace = "helmvm"
7171
act.ReleaseName = chart.Name()
72+
act.CreateNamespace = true
7273
if _, err := act.RunWithContext(ctx, chart, values); err != nil {
7374
return fmt.Errorf("unable to install chart %s: %w", chart.Name(), err)
7475
}

pkg/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ func renderSingleNodeConfig(ctx context.Context) (*v1beta1.Cluster, error) {
311311
Role: "controller+worker",
312312
UploadBinary: true,
313313
NoTaints: true,
314-
InstallFlags: []string{"--disable-components konnectivity-server"},
314+
InstallFlags: []string{"--force", "--disable-components konnectivity-server"},
315315
Connection: rig.Connection{
316316
Localhost: &rig.Localhost{
317317
Enabled: true,

pkg/config/host.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ type hostcfg struct {
2020

2121
// render returns a cluster.Host from the given config.
2222
func (h *hostcfg) render() *cluster.Host {
23-
ifls := []string{"--disable-components konnectivity-server"}
23+
ifls := []string{"--force", "--disable-components konnectivity-server"}
2424
if h.Role == "worker" {
25-
ifls = nil
25+
ifls = []string{"--force"}
2626
}
2727
return &cluster.Host{
2828
Role: h.Role,

0 commit comments

Comments
 (0)