Skip to content

Commit 1f7f670

Browse files
authored
[Feature] [Platform] Improve Registry Performance (#1934)
1 parent 463729d commit 1f7f670

File tree

8 files changed

+35
-6
lines changed

8 files changed

+35
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- (Bugfix) (Platform) Prevent NPE in case of missing Helm Release
1111
- (Feature) Unify Errors
1212
- (Documentation) Update Service Values Doc Type
13+
- (Feature) (Platform) Improve Registry Performance
1314

1415
## [1.2.50](https://github.com/arangodb/kube-arangodb/tree/1.2.50) (2025-07-04)
1516
- (Feature) (Platform) MetaV1 Integration Service

docs/api/ArangoBackupPolicy.V1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Parsed by https://godoc.org/github.com/robfig/cron
4242

4343
Type: `meta.LabelSelector` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.50/pkg/apis/backup/v1/backup_policy_spec.go#L39)</sup>
4444

45-
DeploymentSelector Selector definition for selecting matching ArangoBackup Custom Resources.
45+
DeploymentSelector Selector definition for selecting matching ArangoDeployment Custom Resources.
4646

4747
Links:
4848
* [Kubernetes Documentation](https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#LabelSelector)

pkg/apis/backup/v1/backup_policy_spec.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// DISCLAIMER
33
//
4-
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
4+
// Copyright 2016-2025 ArangoDB GmbH, Cologne, Germany
55
//
66
// Licensed under the Apache License, Version 2.0 (the "License");
77
// you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@ type ArangoBackupPolicySpec struct {
3333
// AllowConcurrent if false, ArangoBackup will not be created when previous Backups are not finished
3434
// +doc/default: true
3535
AllowConcurrent *bool `json:"allowConcurrent,omitempty"`
36-
// DeploymentSelector Selector definition for selecting matching ArangoBackup Custom Resources.
36+
// DeploymentSelector Selector definition for selecting matching ArangoDeployment Custom Resources.
3737
// +doc/type: meta.LabelSelector
3838
// +doc/link: Kubernetes Documentation|https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#LabelSelector
3939
DeploymentSelector *meta.LabelSelector `json:"selector,omitempty"`

pkg/crd/crds/backups-backuppolicy.schema.generated.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ v1:
1818
Parsed by https://godoc.org/github.com/robfig/cron
1919
type: string
2020
selector:
21-
description: DeploymentSelector Selector definition for selecting matching ArangoBackup Custom Resources.
21+
description: DeploymentSelector Selector definition for selecting matching ArangoDeployment Custom Resources.
2222
properties:
2323
matchExpressions:
2424
items:

pkg/platform/flags.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,10 @@ var (
134134
Description: "List of insecure registries",
135135
Default: nil,
136136
}
137+
138+
flagRegistryList = cli.Flag[[]string]{
139+
Name: "registry.docker.endpoint",
140+
Description: "List of boosted registries",
141+
Default: nil,
142+
}
137143
)

pkg/platform/package_export.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func packageExport() (*cobra.Command, error) {
3434
cmd.Use = "export [flags] package output"
3535
cmd.Short = "Export the package in the ZIP Format"
3636

37-
if err := cli.RegisterFlags(&cmd, flagPlatformEndpoint, flagRegistryUseCredentials, flagRegistryInsecure); err != nil {
37+
if err := cli.RegisterFlags(&cmd, flagPlatformEndpoint, flagRegistryUseCredentials, flagRegistryInsecure, flagRegistryList); err != nil {
3838
return nil, err
3939
}
4040

pkg/platform/package_import.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func packageImport() (*cobra.Command, error) {
3737
cmd.Use = "import [flags] registry package output"
3838
cmd.Short = "Imports the package from the ZIP format"
3939

40-
if err := cli.RegisterFlags(&cmd, flagRegistryUseCredentials, flagRegistryInsecure); err != nil {
40+
if err := cli.RegisterFlags(&cmd, flagRegistryUseCredentials, flagRegistryInsecure, flagRegistryList); err != nil {
4141
return nil, err
4242
}
4343

pkg/platform/regclient.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ func getRegClient(cmd *cobra.Command) (*regclient.RegClient, error) {
3535

3636
slog.SetLogLoggerLevel(slog.LevelDebug)
3737

38+
flags = append(flags, regclient.WithConfigHostDefault(config.Host{
39+
ReqConcurrent: 8,
40+
}))
41+
3842
flags = append(flags, regclient.WithRegOpts(reg.WithTransport(&goHttp.Transport{
3943
MaxConnsPerHost: 64,
4044
MaxIdleConns: 100,
@@ -55,6 +59,24 @@ func getRegClient(cmd *cobra.Command) (*regclient.RegClient, error) {
5559
}
5660

5761
v.TLS = config.TLSDisabled
62+
v.ReqConcurrent = 8
63+
64+
configs[el] = v
65+
}
66+
67+
regs, err := flagRegistryList.Get(cmd)
68+
if err != nil {
69+
return nil, err
70+
}
71+
72+
for _, el := range regs {
73+
v, ok := configs[el]
74+
if !ok {
75+
v.Name = el
76+
v.Hostname = el
77+
}
78+
79+
v.ReqConcurrent = 8
5880

5981
configs[el] = v
6082
}

0 commit comments

Comments
 (0)