Skip to content

Commit 0ca6596

Browse files
Add support for SchedulerName for Flink pods (#300)
- Provides the ability to add Scheduler name from config.
1 parent e54fd58 commit 0ca6596

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

pkg/controller/config/config.go

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ type Config struct {
2525
MaxBackoffDuration config.Duration `json:"maxBackoffDuration" pflag:"\"30s\",Determines the max backoff for exponential retries."`
2626
MaxErrDuration config.Duration `json:"maxErrDuration" pflag:"\"5m\",Determines the max time to wait on errors."`
2727
FlinkJobVertexTimeout config.Duration `json:"flinkJobVertexTimeout" pflag:"\"3m\",Determines the max time to wait on job vertex state turns into RUNNING."`
28+
SchedulerName string `json:"schedulerName"`
2829
}
2930

3031
func GetConfig() *Config {

pkg/controller/config/config_flags.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/controller/flink/job_manager_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ func jobmanagerTemplate(app *v1beta1.FlinkApplication) *v1.Deployment {
371371
NodeSelector: app.Spec.JobManagerConfig.NodeSelector,
372372
Tolerations: app.Spec.JobManagerConfig.Tolerations,
373373
Affinity: app.Spec.JobManagerConfig.Affinity,
374+
SchedulerName: config.GetConfig().SchedulerName,
374375
},
375376
},
376377
},

pkg/controller/flink/task_manager_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ func taskmanagerTemplate(app *v1beta1.FlinkApplication) *v1.Deployment {
216216
NodeSelector: app.Spec.TaskManagerConfig.NodeSelector,
217217
Tolerations: app.Spec.TaskManagerConfig.Tolerations,
218218
Affinity: app.Spec.TaskManagerConfig.Affinity,
219+
SchedulerName: config.GetConfig().SchedulerName,
219220
},
220221
},
221222
},

0 commit comments

Comments
 (0)