8000 [Feature] Scheduler BatchJob Integration Service · arangodb/kube-arangodb@7022ac1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7022ac1

Browse files
committed
[Feature] Scheduler BatchJob Integration Service
1 parent cbb16bc commit 7022ac1

22 files changed

+2384
-263
lines changed

.golangci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ linters-settings:
6161
alias: mlSharedTests
6262
- pkg: github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1
6363
alias: mlApi
64+
- pkg: github.com/arangodb/kube-arangodb/integrations/scheduler/v1/definition
65+
alias: pbSchedulerV1
66+
- pkg: github.com/arangodb/kube-arangodb/integrations/scheduler/v1
67+
alias: pbImplSchedulerV1
6468
- pkg: github.com/arangodb/kube-arangodb/integrations/shutdown/v1/definition
6569
alias: pbShutdownV1
6670
- pkg: github.com/arangodb/kube-arangodb/integrations/shutdown/v1

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- (Feature) DebugPackage ArangoProfiles
1515
- (Feature) Scheduler CLI
1616
- (Feature) Parametrize ForceDelete timeout
17+
- (Feature) Scheduler BatchJob Integration Service
1718

1819
## [1.2.39](https://github.com/arangodb/kube-arangodb/tree/1.2.39) (2024-03-11)
1920
- (Feature) Extract Scheduler API

cmd/scheduler.go renamed to integrations/scheduler/v1/configuration.go

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,29 @@
1818
// Copyright holder is ArangoDB GmbH, Cologne, Germany
1919
//
2020

21-
package cmd
21+
package v1
2222

23-
import (
24-
"github.com/spf13/cobra"
23+
type Mod func(c Configuration) Configuration
2524

26-
"github.com/arangodb/kube-arangodb/pkg/scheduler"
27-
)
28-
29-
func init() {
30-
cmd := &cobra.Command{
31-
Use: "scheduler",
25+
func NewConfiguration() Configuration {
26+
return Configuration{
27+
Namespace: "default",
28+
VerifyAccess: true,
3229
}
30+
}
31+
32+
type Configuration struct {
33+
Namespace string
34+
35+
VerifyAccess bool
36+
}
37+
38+
func (c Configuration) With(mods ...Mod) Configuration {
39+
n := c
3340

34-
if err := scheduler.InitCommand(cmd); err != nil {
35-
panic(err.Error())
41+
for _, mod := range mods {
42+
n = mod(n)
3643
}
3744

38-
cmdMain.AddCommand(cmd)
45+
return n
3946
}

integrations/scheduler/v1/definition/batchjob.pb.go

Lines changed: 335 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0