mirror of
https://github.com/fluxcd/flux2.git
synced 2026-05-05 09:38:50 +00:00
Add the kube client qps and burst to the global args
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
150d9d7ae6
commit
0d8194c800
46 changed files with 114 additions and 76 deletions
|
|
@ -30,6 +30,8 @@ import (
|
|||
"k8s.io/cli-runtime/pkg/genericclioptions"
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||
|
||||
runclient "github.com/fluxcd/pkg/runtime/client"
|
||||
|
||||
"github.com/fluxcd/flux2/pkg/manifestgen/install"
|
||||
)
|
||||
|
||||
|
|
@ -117,6 +119,7 @@ func (r *RequestError) Error() string {
|
|||
|
||||
var rootArgs = NewRootFlags()
|
||||
var kubeconfigArgs = genericclioptions.NewConfigFlags(false)
|
||||
var kubeclientOptions = new(runclient.Options)
|
||||
|
||||
func init() {
|
||||
rootCmd.PersistentFlags().DurationVar(&rootArgs.timeout, "timeout", 5*time.Minute, "timeout for this operation")
|
||||
|
|
@ -134,6 +137,8 @@ func init() {
|
|||
kubeconfigArgs.APIServer = &apiServer
|
||||
rootCmd.PersistentFlags().StringVar(kubeconfigArgs.APIServer, "server", *kubeconfigArgs.APIServer, "The address and port of the Kubernetes API server")
|
||||
|
||||
kubeclientOptions.BindFlags(rootCmd.PersistentFlags())
|
||||
|
||||
rootCmd.RegisterFlagCompletionFunc("context", contextsCompletionFunc)
|
||||
rootCmd.RegisterFlagCompletionFunc("namespace", resourceNamesCompletionFunc(corev1.SchemeGroupVersion.WithKind("Namespace")))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue