Open Mrart opened 4 years ago
Could you make the change? Should be straightforward.
job not support 'selector'? I will push the two function togather.I will do it. I mean job selector not use as like jobmanger deploy selector.
@functicons ok,anthor thing. If we want use labels for schedule as our k8s can scheduler with it. but the deployment/job/services etcs. not add the flinkcluster metadata.labels. So It can not match the schedulers. What do you thing about it, We can set flinkcluster metadata.labels to all workloads?
@Mrart sorry, I don't fully understand your request. IIUC, you want to be able to apply nodeSelector to Job (submitter) of a Flink cluster, right? I think we can add a property in the jobSpec of the CR and translate it to the podSpec of the job resource. But nodeSelector only applies to Pods, it doesn't apply to Services.
Let me know if I misunderstood anything.
@functicons I want add global nodeseletor for cr, don't need use it for tm selector/ jm selector /job selector. Just one entry to set nodeselector for all workload, Do you agree this?
@Mrart sorry, I don't fully understand your request. IIUC, you want to be able to apply nodeSelector to Job (submitter) of a Flink cluster, right? I think we can add a property in the jobSpec of the CR and translate it to the podSpec of the job resource. But nodeSelector only applies to Pods, it doesn't apply to Services.
Let me know if I misunderstood anything.
Ingore this, jobSpec support selector has some problem.
What's the problem?
Job spec user selector ,need add manulSelector:true.
Hello, I tried locally with changes jobSpec
, manualSelector:true
but stopped with this error (selector
does not match template labels
) on creating this job pod. Any clue on this will be helpful. Thanks !
2020-09-09T21:43:21.983Z INFO controllers.FlinkCluster Failed to created job {"cluster": "topic-splitter/sampler-beta", "error": "Job.batch \"sampler-beta-job\" is invalid: [spec.selector: Required value, spec.template.metadata.labels: Invalid value: map[string]string{\"app\":\"flink\", \"cluster\":\"sampler-beta\"}: `selector` does not match template `labels`]"}
NodeSelector is for pod schedule,but now is only support NodeSelector for tm/jm pod