Skip to content

Commit a1bcbf1

Browse files
committed
Adding nil check for podTemplate
Signed-off-by: mszacillo <[email protected]>
1 parent 4f16de2 commit a1bcbf1

File tree

1 file changed

+4
-2
lines changed
  • pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/flink.apache.org/v1beta1/FlinkDeployment

1 file changed

+4
-2
lines changed

pkg/resourceinterpreter/default/thirdparty/resourcecustomizations/flink.apache.org/v1beta1/FlinkDeployment/customizations.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ spec:
5656
5757
-- Until multiple podTemplates are supported, interpreter will only take affinity and toleration input to common podTemplate
5858
59-
requires.nodeClaim.nodeSelector = observedObj.spec.podTemplate.spec.nodeSelector
60-
requires.nodeClaim.tolerations = observedObj.spec.podTemplate.spec.tolerations
59+
if observedObj.spec.podTemplate ~= nil and observedObj.spec.podTemplate.spec ~= nil then
60+
requires.nodeClaim.nodeSelector = observedObj.spec.podTemplate.spec.nodeSelector
61+
requires.nodeClaim.tolerations = observedObj.spec.podTemplate.spec.tolerations
62+
end
6163
6264
return replica, requires
6365
end

0 commit comments

Comments
 (0)