Gallardot commented on code in PR #14930:
URL:
https://github.com/apache/dolphinscheduler/pull/14930#discussion_r1336533748
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java:
##########
@@ -184,8 +187,11 @@ public Job buildK8sJob(K8sTaskMainParameters
k8STaskMainParameters) {
.endTemplate()
.withBackoffLimit(retryNum)
.endSpec();
-
- return jobBuilder.build();
+ job = jobBuilder.build();
+ if (!StringUtils.isEmpty(pullSecret)) {
+ job.getSpec().getTemplate().getSpec()
+ .setImagePullSecrets(singletonList(new
LocalObjectReference(pullSecret)));
+ }
Review Comment:
I'm a bit confused about this code. Why not use `withImagePullSecrets`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]