Skip to content

Commit

Permalink
[Feature] Scheduler BatchJob Integration Service
Browse files Browse the repository at this point in the history
  • Loading branch information
ajanikow committed Mar 26, 2024
1 parent cbb16bc commit 409b1ff
Show file tree
Hide file tree
Showing 22 changed files with 2,386 additions and 265 deletions.
4 changes: 4 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ linters-settings:
alias: mlSharedTests
- pkg: github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1
alias: mlApi
- pkg: github.com/arangodb/kube-arangodb/integrations/scheduler/v1/definition
alias: pbSchedulerV1
- pkg: github.com/arangodb/kube-arangodb/integrations/scheduler/v1
alias: pbImplSchedulerV1
- pkg: github.com/arangodb/kube-arangodb/integrations/shutdown/v1/definition
alias: pbShutdownV1
- pkg: github.com/arangodb/kube-arangodb/integrations/shutdown/v1
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- (Feature) DebugPackage ArangoProfiles
- (Feature) Scheduler CLI
- (Feature) Parametrize ForceDelete timeout
- (Feature) Scheduler BatchJob Integration Service

## [1.2.39](https://github.com/arangodb/kube-arangodb/tree/1.2.39) (2024-03-11)
- (Feature) Extract Scheduler API
Expand Down
31 changes: 19 additions & 12 deletions cmd/scheduler.go → integrations/scheduler/v1/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,29 @@
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//

package cmd
package v1

import (
"github.com/spf13/cobra"
type Mod func(c Configuration) Configuration

"github.com/arangodb/kube-arangodb/pkg/scheduler"
)

func init() {
cmd := &cobra.Command{
Use: "scheduler",
func NewConfiguration() Configuration {
return Configuration{
Namespace: "default",
VerifyAccess: true,
}
}

type Configuration struct {
Namespace string

VerifyAccess bool
}

func (c Configuration) With(mods ...Mod) Configuration {
n := c

if err := scheduler.InitCommand(cmd); err != nil {
panic(err.Error())
for _, mod := range mods {
n = mod(n)
}

cmdMain.AddCommand(cmd)
return n
}
335 changes: 335 additions & 0 deletions integrations/scheduler/v1/definition/batchjob.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 409b1ff

Please sign in to comment.