[ 
https://issues.apache.org/jira/browse/FLINK-33992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17823168#comment-17823168
 ] 

Gyula Fora commented on FLINK-33992:
------------------------------------

For session job submissions the jar generally has to be downloaded and 
submitted from the operator itself. So initContainers are not really applicable 
here unless you mean download it into the session cluster lib itself which only 
works in some special cases.

> Add option to fetch the jar from private repository in FlinkSessionJob
> ----------------------------------------------------------------------
>
>                 Key: FLINK-33992
>                 URL: https://issues.apache.org/jira/browse/FLINK-33992
>             Project: Flink
>          Issue Type: Improvement
>          Components: Kubernetes Operator
>            Reporter: Sweta Kalakuntla
>            Priority: Major
>
> FlinkSessionJob spec does not have a capability to download job jar from 
> remote private repository. It can currently only download from public 
> repositories. 
> Adding capability to supply credentials  to the *spec.job.jarURI* in 
> FlinkSessionJob, will solve that problem.
> If I use initContainer to download the jar in FlinkDeployment and try to 
> access that in FlinkSessionJob, the operator is unable to find the jar in the 
> defined path.
> ---
> apiVersion: flink.apache.org/v1beta1
> kind: FlinkSessionJob
> metadata:
>   name: job1
> spec:
>   deploymentName: session-cluster
>   job:
>     jarURI: file:///opt/flink/job.jar
>     parallelism: 4
>     upgradeMode: savepoint
> (edited)
> caused by: java.io.FileNotFoundException: /opt/flink/job.jar (No such file or 
> directory)
> at java.base/java.io.FileInputStream.open0(Native Method)
> at java.base/java.io.FileInputStream.open(Unknown Source)
> at java.base/java.io.FileInputStream.<init>(Unknown Source)
> at 
> org.apache.flink.core.fs.local.LocalDataInputStream.<init>(LocalDataInputStream.java:50)
> at 
> org.apache.flink.core.fs.local.LocalFileSystem.open(LocalFileSystem.java:134)
> at 
> org.apache.flink.kubernetes.operator.artifact.FileSystemBasedArtifactFetcher.fetch(FileSystemBasedArtifactFetcher.java:44)
> at 
> org.apache.flink.kubernetes.operator.artifact.ArtifactManager.fetch(ArtifactManager.java:63)
> at 
> org.apache.flink.kubernetes.operator.service.AbstractFlinkService.uploadJar(AbstractFlinkService.java:707)
> at 
> org.apache.flink.kubernetes.operator.service.AbstractFlinkService.submitJobToSessionCluster(AbstractFlinkService.java:212)
> at 
> org.apache.flink.kubernetes.operator.reconciler.sessionjob.SessionJobReconciler.deploy(SessionJobReconciler.java:73)
> at 
> org.apache.flink.kubernetes.operator.reconciler.sessionjob.SessionJobReconciler.deploy(SessionJobReconciler.java:44)
> at 
> org.apache.flink.kubernetes.operator.reconciler.deployment.AbstractFlinkResourceReconciler.reconcile(AbstractFlinkResourceReconciler.java:120)
> at 
> org.apache.flink.kubernetes.operator.controller.FlinkSessionJobController.reconcile(FlinkSessionJobController.java:109)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to