Skip to content

Commit 6c7b92b

Browse files
authored
Merge pull request #66 from mlbiam/master
1.0.9
2 parents 1ebffbd + f255b40 commit 6c7b92b

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
6868
- name: generate tag
6969
run: |-
70-
export PROJ_VERSION="1.0.8"
70+
export PROJ_VERSION="1.0.9"
7171
echo "Project Version: $PROJ_VERSION"
7272
echo "TAG=$PROJ_VERSION-$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV
7373
echo "SHORT_TAG=$PROJ_VERSION" >> $GITHUB_ENV

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# 1.0.9
2+
3+
**tasks:**
4+
- 1.0.9 [\#64](https://github.com/TremoloSecurity/kube-oidc-proxy/issues/64)
5+
6+
**enhancements:**
7+
- Add flags to be able to configure kubernetes client throttling [\#65](https://github.com/TremoloSecurity/kube-oidc-proxy/issues/65)
8+
19
# 1.0.8
210

311
**tasks:**

cmd/app/options/client.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import (
1010

1111
type ClientOptions struct {
1212
*genericclioptions.ConfigFlags
13+
14+
KubeClientQPS float32
15+
KubeClientBurst int
1316
}
1417

1518
func NewClientOptions(nfs *cliflag.NamedFlagSets) *ClientOptions {
@@ -27,6 +30,15 @@ func NewClientOptions(nfs *cliflag.NamedFlagSets) *ClientOptions {
2730

2831
func (c *ClientOptions) AddFlags(fs *pflag.FlagSet) *ClientOptions {
2932
c.ConfigFlags.AddFlags(fs)
33+
34+
// Extra flags
35+
fs.Float32Var(&c.KubeClientQPS, "kube-client-qps", c.KubeClientQPS, "Sets the QPS on the app "+
36+
"kubernetes client, this will configure throttling on requests sent to the apiserver "+
37+
"(If not set, it will use client default ones)")
38+
fs.IntVar(&c.KubeClientBurst, "kube-client-burst", c.KubeClientBurst, "Sets the burst on the app "+
39+
"kubernetes client, this will configure throttling on requests sent to the apiserver"+
40+
"(If not set, it will use client default ones)")
41+
3042
return c
3143
}
3244

cmd/app/run.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ func buildRunCommand(stopCh <-chan struct{}, opts *options.Options) *cobra.Comma
5959
}
6060
}
6161

62+
// Set client throttling settings for Kubernetes clients.
63+
if opts.Client.KubeClientBurst > 0 {
64+
restConfig.Burst = opts.Client.KubeClientBurst
65+
}
66+
if opts.Client.KubeClientQPS > 0 {
67+
restConfig.QPS = opts.Client.KubeClientQPS
68+
}
69+
6270
// Initialise token reviewer if enabled
6371
var tokenReviewer *tokenreview.TokenReview
6472
if opts.App.TokenPassthrough.Enabled {

0 commit comments

Comments
 (0)