Skip to content

Commit

Permalink
Merge pull request #91 from loft-sh/revert-89-feature/88-port-flag
Browse files Browse the repository at this point in the history
Revert "Add --port flag to specify service port on the create command"
  • Loading branch information
FabianKramm authored Jul 19, 2021
2 parents e205f5a + 0fd0d32 commit 6687c96
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion chart/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
type: {{ .Values.service.type }}
ports:
- name: https
port: {{ .Values.service.port }}
port: 443
targetPort: 8443
protocol: TCP
selector:
Expand Down
1 change: 0 additions & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,3 @@ annotations: {}
# Service configurations
service:
type: ClusterIP
port: 443
13 changes: 0 additions & 13 deletions cmd/vclusterctl/cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ type CreateCmd struct {
CreateClusterRole bool
Expose bool
Connect bool
Port int

log log.Logger
}
Expand Down Expand Up @@ -112,7 +111,6 @@ vcluster create test --namespace test
cobraCmd.Flags().BoolVar(&cmd.CreateClusterRole, "create-cluster-role", false, "If true a cluster role will be created to access nodes, storageclasses and priorityclasses")
cobraCmd.Flags().BoolVar(&cmd.Expose, "expose", false, "If true will create a load balancer service to expose the vcluster endpoint")
cobraCmd.Flags().BoolVar(&cmd.Connect, "connect", false, "If true will run vcluster connect directly after the vcluster was created")
cobraCmd.Flags().IntVar(&cmd.Port, "port", 443, "If specified, use this port in the service")
return cobraCmd
}

Expand Down Expand Up @@ -311,17 +309,6 @@ rbac:
values += `
service:
type: LoadBalancer`

if cmd.Port != 443 {
values += fmt.Sprintf(`
port: %v`, cmd.Port)
}
} else {
if cmd.Port != 443 {
values += fmt.Sprintf(`
service:
port: %v`, cmd.Port)
}
}

values = strings.ReplaceAll(values, "##IMAGE##", image)
Expand Down

0 comments on commit 6687c96

Please sign in to comment.