Skip to content

Commit

Permalink
Fix Cluster Controller Default (#43)
Browse files Browse the repository at this point in the history
.. for good this time!!!
  • Loading branch information
spjmurray authored Apr 11, 2024
1 parent 857c6f2 commit 5765f0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions charts/unikorn/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Helm chart for deploying Unikorn

type: application

version: v0.2.3
appVersion: v0.2.3
version: v0.2.4
appVersion: v0.2.4

icon: https://raw.githubusercontent.com/unikorn-cloud/unikorn/main/icons/default.png
9 changes: 4 additions & 5 deletions pkg/server/handler/cluster/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (

coreclient "github.com/unikorn-cloud/core/pkg/client"
"github.com/unikorn-cloud/core/pkg/server/errors"
"github.com/unikorn-cloud/core/pkg/util"
unikornv1 "github.com/unikorn-cloud/unikorn/pkg/apis/unikorn/v1alpha1"
"github.com/unikorn-cloud/unikorn/pkg/provisioners/helmapplications/clusteropenstack"
"github.com/unikorn-cloud/unikorn/pkg/provisioners/helmapplications/vcluster"
Expand Down Expand Up @@ -213,13 +214,11 @@ func (c *Client) Create(ctx context.Context, organizationName, projectName strin
}

// Implicitly create the controller manager.
clusterManagerName := "default"

if options.ClusterManager != nil {
clusterManagerName = *options.ClusterManager
if options.ClusterManager == nil {
options.ClusterManager = util.ToPointer("default")
}

if err := clustermanager.NewClient(c.client).CreateImplicit(ctx, organizationName, projectName, clusterManagerName); err != nil {
if err := clustermanager.NewClient(c.client).CreateImplicit(ctx, organizationName, projectName, *options.ClusterManager); err != nil {
return err
}

Expand Down

0 comments on commit 5765f0d

Please sign in to comment.