Skip to content

Commit

Permalink
Add support for SchedulerName for Flink pods (#300)
Browse files Browse the repository at this point in the history
- Provides the ability to add Scheduler name from config.
  • Loading branch information
anandswaminathan authored Apr 29, 2024
1 parent e54fd58 commit 0ca6596
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controller/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type Config struct {
MaxBackoffDuration config.Duration `json:"maxBackoffDuration" pflag:"\"30s\",Determines the max backoff for exponential retries."`
MaxErrDuration config.Duration `json:"maxErrDuration" pflag:"\"5m\",Determines the max time to wait on errors."`
FlinkJobVertexTimeout config.Duration `json:"flinkJobVertexTimeout" pflag:"\"3m\",Determines the max time to wait on job vertex state turns into RUNNING."`
SchedulerName string `json:"schedulerName"`
}

func GetConfig() *Config {
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/config/config_flags.go

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

1 change: 1 addition & 0 deletions pkg/controller/flink/job_manager_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ func jobmanagerTemplate(app *v1beta1.FlinkApplication) *v1.Deployment {
NodeSelector: app.Spec.JobManagerConfig.NodeSelector,
Tolerations: app.Spec.JobManagerConfig.Tolerations,
Affinity: app.Spec.JobManagerConfig.Affinity,
SchedulerName: config.GetConfig().SchedulerName,
},
},
},
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/flink/task_manager_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ func taskmanagerTemplate(app *v1beta1.FlinkApplication) *v1.Deployment {
NodeSelector: app.Spec.TaskManagerConfig.NodeSelector,
Tolerations: app.Spec.TaskManagerConfig.Tolerations,
Affinity: app.Spec.TaskManagerConfig.Affinity,
SchedulerName: config.GetConfig().SchedulerName,
},
},
},
Expand Down

0 comments on commit 0ca6596

Please sign in to comment.