mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-10-19 08:07:58 +02:00
Orchard Controller: implement an SSH server that acts as a jump host (#179)
* proxy.Connections(): require io.ReadWriteCloser instead of net.Conn * Orchard Controller: implement an SSH server that acts as a jump host * Issue a warning if the name used will be invalid in the future * Further restrict uppercase characters in names in the future The rationale is similar to https://github.com/kubernetes/kubernetes/issues/71140. We won't want to munge the user's input and introduce subtle bugs doing lowercase comparisons.
This commit is contained in:
@@ -3,6 +3,7 @@ package create
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/cirruslabs/orchard/internal/simplename"
|
||||
"github.com/cirruslabs/orchard/pkg/client"
|
||||
v1 "github.com/cirruslabs/orchard/pkg/resource/v1"
|
||||
"github.com/spf13/cobra"
|
||||
@@ -66,6 +67,11 @@ func newCreateVMCommand() *cobra.Command {
|
||||
func runCreateVM(cmd *cobra.Command, args []string) error {
|
||||
name := args[0]
|
||||
|
||||
// Issue a warning if the name used will be invalid in the future
|
||||
if err := simplename.ValidateNext(name); err != nil {
|
||||
_, _ = fmt.Fprintf(os.Stderr, "WARNING: %v\n", err)
|
||||
}
|
||||
|
||||
// Convert arguments
|
||||
var hostDirs []v1.HostDir
|
||||
|
||||
|
||||
Reference in New Issue
Block a user