Skip to content

Commit

Permalink
fix(workflow): match discovery burst and qps for kubectl with upstr…
Browse files Browse the repository at this point in the history
…eam kubectl binary (#11603)

Signed-off-by: vadasambar <suraj.bankar@acquia.com>
  • Loading branch information
vadasambar committed Aug 30, 2023
1 parent 7e4ab29 commit d3cb451
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions workflow/executor/resource.go
Expand Up @@ -372,9 +372,14 @@ func runKubectl(args ...string) ([]byte, error) {
}()
var buf bytes.Buffer
if err := kubectlcmd.NewKubectlCommand(kubectlcmd.KubectlOptions{
Arguments: args,
ConfigFlags: genericclioptions.NewConfigFlags(true),
IOStreams: genericclioptions.IOStreams{Out: &buf, ErrOut: os.Stderr},
Arguments: args,
// TODO(vadasambar): use `DefaultConfigFlags` variable from upstream
// as value for `ConfigFlags` once https://github.com/kubernetes/kubernetes/pull/120024 is merged
ConfigFlags: genericclioptions.NewConfigFlags(true).
WithDeprecatedPasswordFlag().
WithDiscoveryBurst(300).
WithDiscoveryQPS(50.0),
IOStreams: genericclioptions.IOStreams{Out: &buf, ErrOut: os.Stderr},
}).Execute(); err != nil {
return nil, err
}
Expand Down

0 comments on commit d3cb451

Please sign in to comment.