Skip to content

Commit

Permalink
refactor(autok3s): remove octopus ui
Browse files Browse the repository at this point in the history
Signed-off-by: Jason-ZW <zhenyang@rancher.com>
  • Loading branch information
rancher-sy-bot committed Oct 14, 2020
1 parent efb10d1 commit 17beffe
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 25 deletions.
8 changes: 1 addition & 7 deletions pkg/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,14 @@ func InitK3sCluster(cluster *types.Cluster) error {

logrus.Infof("[%s] deploying additional manifests\n", cluster.Provider)

// deploy additional UI manifests. e.g. (none/dashboard/octopus-ui).
// deploy additional UI manifests. e.g. (none/dashboard).
switch cluster.UI {
case "dashboard":
if _, err := execute(&hosts.Host{Node: cluster.MasterNodes[0]}, false,
[]string{fmt.Sprintf(deployUICommand, base64.StdEncoding.EncodeToString(
[]byte(fmt.Sprintf(dashboardTmpl, cluster.Repo))), common.K3sManifestsDir)}); err != nil {
return err
}
case "octopus-ui":
if _, err := execute(&hosts.Host{Node: cluster.MasterNodes[0]}, false,
[]string{fmt.Sprintf(deployUICommand, base64.StdEncoding.EncodeToString(
[]byte(octopusTmpl)), common.K3sManifestsDir)}); err != nil {
return err
}
}

logrus.Infof("[%s] successfully deployed additional manifests\n", cluster.Provider)
Expand Down
16 changes: 0 additions & 16 deletions pkg/cluster/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,3 @@ spec:
externalPort: 8999
internalPort: 8999
`

const octopusTmpl = `
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: octopus-ui
namespace: kube-system
spec:
chart: octopus-ui
repo: http://charts.cnrancher.com/octopus
targetNamespace: octopus-system
valuesContent: |-
service:
type: LoadBalancer
port: 8999
`
2 changes: 1 addition & 1 deletion pkg/providers/alibaba/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (p *Alibaba) GetCreateFlags(cmd *cobra.Command) *pflag.FlagSet {
Name: "ui",
P: &p.UI,
V: p.UI,
Usage: "Specify K3s UI. e.g.(none/dashboard/octopus-ui)",
Usage: "Specify K3s UI. e.g.(none/dashboard)",
Required: true,
},
{
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/native/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (p *Native) GetCreateFlags(cmd *cobra.Command) *pflag.FlagSet {
Name: "ui",
P: &p.UI,
V: p.UI,
Usage: "Specify K3s UI. e.g.(none/dashboard/octopus-ui)",
Usage: "Specify K3s UI. e.g.(none/dashboard)",
Required: true,
},
{
Expand Down

0 comments on commit 17beffe

Please sign in to comment.