Skip to content

Commit

Permalink
Add qps and bursts same like kubectl
Browse files Browse the repository at this point in the history
This will add the vales of qps and burst same like kubectl
to have the same response time on coomands
  • Loading branch information
piyush-garg committed Sep 1, 2022
1 parent 71b4d1a commit 6f2642d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/cli/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,12 @@ func (p *TektonParams) dynamicClient(config *rest.Config) (dynamic.Interface, er

// Only returns kube client, not tekton client
func (p *TektonParams) KubeClient() (k8s.Interface, error) {

config, err := p.config()
if err != nil {
return nil, err
}

kube, err := p.kubeClient(config)

if err != nil {
return nil, err
}
Expand All @@ -124,6 +122,10 @@ func (p *TektonParams) Clients(cfg ...*rest.Config) (*Clients, error) {
config = defaultConfig
}

// set values as done in kubectl
config.QPS = 50.0
config.Burst = 300

tekton, err := p.tektonClient(config)
if err != nil {
return nil, err
Expand Down

0 comments on commit 6f2642d

Please sign in to comment.