Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flag declaration in *-brokers #1177

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions broker/bucketbroker/cmd/bucketbroker/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ func (o *Options) AddFlags(fs *pflag.FlagSet) {
o.GetConfigOptions.BindFlags(fs)
fs.StringVar(&o.Address, "address", "/var/run/iri-bucketbroker.sock", "Address to listen on.")

fs.Float32Var(&o.QPS, "qps", config.QPS, "Kubernetes client qps.")
fs.IntVar(&o.Burst, "burst", config.Burst, "Kubernetes client burst.")

fs.StringVar(&o.Namespace, "namespace", o.Namespace, "Target Kubernetes namespace to use.")
fs.StringVar(&o.BucketPoolName, "bucket-pool-name", o.BucketPoolName, "Name of the target bucket pool to pin buckets to, if any.")
fs.StringToStringVar(&o.BucketPoolSelector, "bucket-pool-selector", o.BucketPoolSelector, "Selector of the target bucket pools to pin buckets to, if any.")
Expand Down
3 changes: 0 additions & 3 deletions broker/machinebroker/cmd/machinebroker/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ func (o *Options) AddFlags(fs *pflag.FlagSet) {
fs.StringToStringVar(&o.BrokerDownwardAPILabels, "broker-downward-api-label", nil, "The labels to broker via downward API. "+
"Example is for instance to broker \"root-machine-uid\" initially obtained via \"machinepoollet.ironcore.dev/machine-uid\".")

fs.Float32Var(&o.QPS, "qps", config.QPS, "Kubernetes client qps.")
fs.IntVar(&o.Burst, "burst", config.Burst, "Kubernetes client burst.")

fs.StringVar(&o.Namespace, "namespace", o.Namespace, "Target Kubernetes namespace to use.")
fs.StringVar(&o.MachinePoolName, "machine-pool-name", o.MachinePoolName, "Name of the target machine pool to pin machines to, if any.")
fs.StringToStringVar(&o.MachinePoolSelector, "machine-pool-selector", o.MachinePoolSelector, "Selector of the target machine pools to pin machines to, if any.")
Expand Down
3 changes: 0 additions & 3 deletions broker/volumebroker/cmd/volumebroker/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ func (o *Options) AddFlags(fs *pflag.FlagSet) {
o.GetConfigOptions.BindFlags(fs)
fs.StringVar(&o.Address, "address", "/var/run/iri-volumebroker.sock", "Address to listen on.")

fs.Float32Var(&o.QPS, "qps", config.QPS, "Kubernetes client qps.")
fs.IntVar(&o.Burst, "burst", config.Burst, "Kubernetes client burst.")

fs.StringVar(&o.Namespace, "namespace", o.Namespace, "Target Kubernetes namespace to use.")
fs.StringVar(&o.VolumePoolName, "volume-pool-name", o.VolumePoolName, "Name of the target volume pool to pin volumes to, if any.")
fs.StringToStringVar(&o.VolumePoolSelector, "volume-pool-selector", o.VolumePoolSelector, "Selector of the target volume pools to pin volumes to, if any.")
Expand Down
8 changes: 4 additions & 4 deletions utils/client/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ const (
// EgressSelectorConfigFlagName is the name of the egress-selector-config flag.
EgressSelectorConfigFlagName = "egress-selector-config"

// QPS is the default value for allowed queries per second for a client.
QPS float32 = 20.0
// QpsConfigFlagName is the name of the qps flag.
QpsConfigFlagName = "qps"

// Burst is the default value for allowed burst rate for a client.
Burst int = 30
// BurstConfigFlagName is the name of the burst flag.
BurstConfigFlagName = "burst"
)

var log = ctrl.Log.WithName("client").WithName("config")
Expand Down
4 changes: 2 additions & 2 deletions utils/client/config/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ func (o *GetConfigOptions) BindFlags(fs *pflag.FlagSet, opts ...func(*BindFlagOp
fs.StringVar(&o.BootstrapKubeconfig, bo.NameFunc(BootstrapKubeconfigFlagName), "", "Path to a bootstrap kubeconfig.")
fs.BoolVar(&o.RotateCertificates, bo.NameFunc(RotateCertificatesFlagName), false, "Whether to use automatic certificate / config rotation.")
fs.StringVar(&o.EgressSelectorConfig, bo.NameFunc(EgressSelectorConfigFlagName), "", "Path pointing to an egress selector config to use.")
fs.Float32Var(&o.QPS, "qps", QPS, "Kubernetes client qps.")
fs.IntVar(&o.Burst, "burst", Burst, "Kubernetes client burst.")
fs.Float32Var(&o.QPS, bo.NameFunc(QpsConfigFlagName), 0, "Kubernetes client qps.")
fs.IntVar(&o.Burst, bo.NameFunc(BurstConfigFlagName), 0, "Kubernetes client burst.")
}

// ApplyToGetConfig implements GetConfigOption.
Expand Down
Loading