Merge pull request #5215 from mszacillo/priorityclass-flinkdeployment

Adding generic handling of priorityclass + namespace for flinkdeployment interpreter
This commit is contained in:
karmada-bot 2024-07-18 23:58:11 +08:00 committed by GitHub
commit 32924ad5d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -64,11 +64,19 @@ spec:
requires.resourceRequest.memory = observedObj.spec.taskManager.resource.memory
end
-- Until multiple podTemplates are supported, interpreter will only take affinity and toleration input to common podTemplate
-- Until multiple podTemplates are supported, interpreter will only take affinity, toleration, and priorityclass input to common podTemplate
if observedObj.spec.podTemplate ~= nil and observedObj.spec.podTemplate.spec ~= nil then
requires.nodeClaim.nodeSelector = observedObj.spec.podTemplate.spec.nodeSelector
requires.nodeClaim.tolerations = observedObj.spec.podTemplate.spec.tolerations
priorityclass = observedObj.spec.podTemplate.spec.priorityClassName
if not isempty(priorityclass) then
requires.priorityClassName = priorityclass
end
end
if not isempty(observedObj.metadata.namespace) then
requires.namespace = observedObj.metadata.namespace
end
return replica, requires