Skip to content

Commit

Permalink
remove unnecessary WithExternalFrameworks option
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrove-oss committed Apr 26, 2024
1 parent b16ba15 commit bbb905f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions cmd/kueue/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ func setupIndexes(ctx context.Context, mgr ctrl.Manager, cfg *configapi.Configur

opts := []jobframework.Option{
jobframework.WithEnabledFrameworks(cfg.Integrations),
jobframework.WithExternalFrameworks(cfg.Integrations),
}
return jobframework.SetupIndexes(ctx, mgr.GetFieldIndexer(), opts...)
}
Expand Down Expand Up @@ -272,7 +271,6 @@ func setupControllers(mgr ctrl.Manager, cCache *cache.Cache, queues *queue.Manag
jobframework.WithKubeServerVersion(serverVersionFetcher),
jobframework.WithIntegrationOptions(corev1.SchemeGroupVersion.WithKind("Pod").String(), cfg.Integrations.PodOptions),
jobframework.WithEnabledFrameworks(cfg.Integrations),
jobframework.WithExternalFrameworks(cfg.Integrations),
jobframework.WithManagerName(constants.KueueName),
jobframework.WithLabelKeysToCopy(cfg.Integrations.LabelKeysToCopy),
}
Expand Down
11 changes: 0 additions & 11 deletions pkg/controller/jobframework/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ type Options struct {
// IntegrationOptions key is "$GROUP/$VERSION, Kind=$KIND".
IntegrationOptions map[string]any
EnabledFrameworks sets.Set[string]
ExternalFrameworks sets.Set[string]
ManagerName string
LabelKeysToCopy []string
}
Expand Down Expand Up @@ -136,16 +135,6 @@ func WithEnabledFrameworks(i *configapi.Integrations) Option {
}
}

// WithExternalFrameworks adds external framework names from the ConfigAPI.
func WithExternalFrameworks(i *configapi.Integrations) Option {
return func(o *Options) {
if i == nil || len(i.ExternalFrameworks) == 0 {
return
}
o.ExternalFrameworks = sets.New(i.ExternalFrameworks...)
}
}

// WithManagerName adds the kueue's manager name.
func WithManagerName(n string) Option {
return func(o *Options) {
Expand Down
3 changes: 0 additions & 3 deletions pkg/controller/jobframework/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ func TestSetupControllers(t *testing.T) {
WithEnabledFrameworks(&configapi.Integrations{
Frameworks: []string{"batch/job", "kubeflow.org/mpijob"},
}),
WithExternalFrameworks(&configapi.Integrations{
ExternalFrameworks: []string{"workload.codeflare.dev/v1beta2, Kind=AppWrapper"},
}),
},
mapperGVKs: []schema.GroupVersionKind{
batchv1.SchemeGroupVersion.WithKind("Job"),
Expand Down

0 comments on commit bbb905f

Please sign in to comment.