ferenc-csaky commented on code in PR #1258:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/1258#discussion_r4643605347


##########
docs/content/docs/deployment/overview.md:
##########
@@ -83,6 +83,8 @@ In Standalone mode the operator creates every Kubernetes 
resource itself: the Jo
 
 The replica count is also exposed through the Kubernetes scale subresource: 
`kubectl scale flinkdeployment <name> --replicas=<n>` and a 
[HorizontalPodAutoscaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
 targeting the resource both drive `spec.taskManager.replicas` directly, a 
natural pairing with Reactive Mode. In Native mode the field has no effect, 
there the TaskManager count follows the job's slot needs.
 
+How the job jar reaches the cluster depends on the scheme of 
`spec.job.jarURI`. A `local://` URI, or a path without a scheme, points to a 
jar inside the image, and `file://`, `http://` and `https://` URIs are loaded 
from where they point; the operator puts these on the classpath of every Flink 
process. A jar on a Flink file system, such as `s3://` or `hdfs://`, is fetched 
by the JobManager on startup and shipped to the TaskManagers from there. This 
needs Flink 1.19 or newer and the matching [filesystem 
plugin](https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/filesystems/plugins/)
 enabled in the image.

Review Comment:
   1. The operator doesn't access S3 here, it only adds `--jars=s3://...` to 
the JobManager args. The JobManager fetches the jar with the cluster's S3 
config, the same one checkpoints on S3 use, so the operator needs no 
credentials and no restart. Changing credentials in `flinkConfiguration` 
redeploys the cluster like any spec change.
   2. The fetch runs before the token manager: 
`StandaloneApplicationClusterEntryPoint#main` fetches the jar inside the 
security context, before `ClusterEntrypoint#initializeServices` calls 
`obtainDelegationTokens()`. So a Kerberos login works for the fetch, delegation 
tokens don't (I think). Native application mode has the same order, and this PR 
doesn't change it. I only checked this in the code, I didn't test it.
   3. Right, the operator fetches nothing new. It only writes the URI into the 
JobManager args, and the JobManager downloads the jar with Flink's 
`ArtifactFetchManager`, like native application mode does for `pipeline.jars`. 
The operator's `URI#toURL()` check opens no connection, and `http(s)` jars stay 
on `pipeline.classpaths` as before.



-- 
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]

Reply via email to