-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
25 lines (19 loc) · 767 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package main
import (
"os"
"github.com/nilic/kubectl-rsh/cmd"
"k8s.io/cli-runtime/pkg/genericclioptions"
kcmdutil "k8s.io/kubectl/pkg/cmd/util"
// Import to initialize client auth plugins.
_ "k8s.io/client-go/plugin/pkg/client/auth"
)
func main() {
kubeConfigFlags := genericclioptions.NewConfigFlags(true).WithDiscoveryBurst(350).WithDiscoveryQPS(50.0)
matchVersionKubeConfigFlags := kcmdutil.NewMatchVersionFlags(kubeConfigFlags)
f := kcmdutil.NewFactory(matchVersionKubeConfigFlags)
ioStreams := genericclioptions.IOStreams{In: os.Stdin, Out: os.Stdout, ErrOut: os.Stderr}
cmdRsh := cmd.NewCmdRsh(f, ioStreams)
kubeConfigFlags.AddFlags(cmdRsh.PersistentFlags())
matchVersionKubeConfigFlags.AddFlags(cmdRsh.PersistentFlags())
cmdRsh.Execute()
}