Skip to main content
Version: Current

Flink deployment managers

The deployment managers below run streaming scenarios on infrastructure that provisions a Flink cluster for them. Each one is a JAR in the managers directory of the Designer and is configured as a deployment target of a scenario type, see Scenario Deployment configuration.

Besides flinkStreaming, three Deployment Managers run Flink scenarios on infrastructure that provisions a Flink cluster for them:

  • flinkStreaming deploys to a Flink cluster that is already running - a standalone or session cluster reached through its REST API - or to the MiniCluster embedded in the Designer.
  • flink-k8s-operator creates a FlinkDeployment resource per scenario for the Flink Kubernetes Operator, so every scenario gets its own Flink cluster in your Kubernetes cluster. Choose it when you run Kubernetes yourself and want per-scenario isolation without operating a long-running Flink cluster.
  • awsManagedFlink runs every scenario as an application of Amazon Managed Service for Apache Flink. Choose it when the data stays in AWS and nobody should operate Flink at all; it supports the fewest operations - no stop with savepoint, no savepoints on demand, no live data preview.
  • ververica deploys to Ververica Platform, per-job or to a session cluster. Choose it when VVP already runs your Flink workloads; it is the only one of the three supporting stop with savepoint, savepoints on demand and deployment targets created at runtime. It needs a Nussknacker build for Flink 1.20 and Scala 2.12, the versions Ververica Runtime runs.

All three run scenario tests on a Flink MiniCluster inside the Designer, and each of them can be one of the targets of a scenario type, next to flinkStreaming targets.

Deployment Manager of type flink-k8s-operator runs every scenario as its own Flink application cluster, by creating a FlinkDeployment resource (flink.apache.org/v1beta1) that the Apache Flink Kubernetes Operator turns into a JobManager and TaskManagers. The operator itself has to be installed in the cluster and watch k8sNamespace.

deploymentConfig {
type: "flink-k8s-operator"
k8sNamespace: "nussknacker"
flinkImage: "<Flink image>"
flinkVersion: "v2_2"
jobJarStoragePVCName: "job-jars-pvc"
jobJarStorageMountPoint: "/mnt/jobjars"
jobStateStoragePVCName: "job-states-pvc"
jobStateStorageMountPoint: "/mnt/jobstates"
}
ParameterImportanceTypeDefault valueDescription
k8sNamespaceHighstringNamespace the FlinkDeployment resources are created, listed and deleted in.
flinkImageHighstringImage of the JobManager and TaskManager pods.
flinkVersionHighstringspec.flinkVersion of the FlinkDeployment, in the operator's notation, e.g. v2_2. It has to match flinkImage.
jobJarStoragePVCNameHighstringPersistentVolumeClaim holding the scenario JAR files, mounted in the Flink pods at jobJarStorageMountPoint.
jobJarStorageMountPointHighstringWhere the JAR storage is mounted - in the Flink pods, and in the Designer, which writes the JAR files there unless podForJobJars is set.
jobStateStoragePVCNameHighstringPersistentVolumeClaim for checkpoints, savepoints and high-availability data, mounted in the Flink pods at jobStateStorageMountPoint.
jobStateStorageMountPointHighstringMount point of the state storage in the Flink pods.
podForJobJarsLowstringFor a Designer that cannot mount the JAR storage, e.g. one running outside the cluster: name of a pod in k8sNamespace that mounts it at jobJarStorageMountPoint, as the Flink pods do. The JAR file is then streamed into that pod with kubectl exec, so kubectl has to be on the Designer's PATH.
jobJarUploadTimeoutLowduration5 minutes(podForJobJars only) How long streaming the JAR file into that pod may take before the deployment fails.
cancelTimeoutLowduration5 minutesHow long a cancel waits for the operator to remove the FlinkDeployment before it fails. The cancel request waits as long, so beyond the Designer's pekko.http.server.request-timeout (1 minute by default) the request times out while the cancel goes on, the scenario showing DuringCancel until it ends.
serviceAccountMediumstringflink-service-accountService account of the Flink pods (spec.serviceAccount).
deploymentNamePrefixLowstringflink-Prefix of the FlinkDeployment name; the rest of the name is the id of the scenario's first deployment.
jobParallelismMediumint1spec.job.parallelism.
numberOfTaskSlotsInTaskManagerMediumint1taskmanager.numberOfTaskSlots.
taskManagerReplicasMediumint1Number of TaskManager pods.
jobManagerMemoryMediumstring1024mJobManager memory.
jobManagerCpuMediumintJobManager CPU; the operator's default when not set.
taskManagerMemoryMediumstring1024mTaskManager memory.
taskManagerCpuMediumintTaskManager CPU; the operator's default when not set.
jobUpgradeModeMediumstringsavepointspec.job.upgradeMode: how the operator carries the state over when the scenario is redeployed - savepoint, last-state or stateless.
allowNonRestoredStateLowbooleantruespec.job.allowNonRestoredState: whether a redeployed scenario may start from a savepoint containing state that no node of the new version claims.
additionalFlinkConfigurationMediummap of strings{}Added to spec.flinkConfiguration, overriding the entries set by Nussknacker (see below).
nodeSelectorLowmap of strings{}Node selector of the Flink pods.
additionalVolumesLowlist of objects[]Extra pod volumes: { name, persistentVolumeClaim: { claimName } }, { name, hostPath: { path, type } } or { name, secret: { secretName } }.
additionalVolumeMountsLowlist of objects[]Extra mounts of the Flink container: { name, mountPath, subPath, readOnly }, subPath and readOnly optional.
additionalLibs.imageNameLowstringImage of an init container that copies the files from additionalLibs.libsPath into the Flink pods.
additionalLibs.libsPathLowstringDirectory in that image the files are copied from.
additionalLibs.libsNamesLowlist of stringsThe copied files that are mounted into /opt/flink/lib of the Flink container.
additionalLibs.imagePullSecretsLowstringImage pull secret for additionalLibs.imageName.
modelArtifactLowobjectSee Reducing the deployment artifact.
miniCluster.configLowmap of strings{}Configuration of the Flink MiniCluster in the Designer that runs scenario tests.
scenarioTesting.timeoutLowduration55 secondsTimeout of a scenario test.
scenarioTesting.parallelismLowint1Parallelism of a scenario test.

How a scenario is deployed:

  • The model is packed into one JAR file named after its MD5 (jars/<md5>.jar) and copied onto the JAR storage, where the Flink pods read it from (jarURI: local://<jobJarStorageMountPoint>/jars/<md5>.jar). The scenario, its version, the deployment data and the model configuration are passed as program arguments of the job.
  • Nussknacker sets these entries of spec.flinkConfiguration: taskmanager.numberOfTaskSlots, a Prometheus metrics reporter on port 9249, high-availability.type: kubernetes, the checkpoint, savepoint and high-availability directories under jobStateStorageMountPoint, and the nu-scenario-name, nu-process-version and nu-deployment-id entries Nussknacker uses to find the resource of a scenario and to report its version. Do not override the last three.
  • The job restarts from the latest savepoint on failure (restartPolicy: FromSavepointOnFailure).
  • Deploying a scenario that already has a FlinkDeployment replaces the spec of that resource, and the operator upgrades the job according to jobUpgradeMode. Otherwise a new FlinkDeployment is created.
  • Cancel deletes the FlinkDeployment and waits up to 30 seconds for it to disappear. Nussknacker takes no savepoint of its own, so the next deployment of a canceled scenario starts without state. Stop works the same as cancel, and making a savepoint on demand is not supported.

Statuses come from the job state the operator reports: CREATED, RECONCILING, SCHEDULED, DEPLOYING and INITIALIZING are shown as during deploy, RUNNING as running, FINISHED as finished (during deploy while the resource is upgrading), CANCELLING as during cancel, CANCELED as canceled, RESTARTING as restarting and FAILED as failed. A scenario without a FlinkDeployment is canceled.

Requirements and limitations:

  • The Designer talks to the Kubernetes API with the in-cluster service account when it runs in Kubernetes, and with the default kubeconfig otherwise. It needs get, list, create, update and delete on flinkdeployments in k8sNamespace.
  • Scenario tests run on a Flink MiniCluster inside the Designer.
  • Live data preview reads modelConfig.liveDataPreview.storage, which has to be DESIGNER_DB or DESIGNER_API when live data preview is enabled - without it the Designer refuses the configuration.
  • It can be one of the configured targets, but declares no target type, so targets of this kind cannot be created at runtime.

Deployment Manager of type awsManagedFlink runs every scenario as an application of Amazon Managed Service for Apache Flink, with the Flink 2.2 runtime.

scenarioTypes {
"streaming-aws" {
deploymentConfig {
type: "awsManagedFlink"
credentials {
provider: "default"
}
region: "eu-central-1"
s3BucketName: "nussknacker-applications"
serviceExecutionRoleArn: "arn:aws:iam::123456789012:role/nussknacker-managed-flink"
cloudWatchLogStreamArn: "arn:aws:logs:eu-central-1:123456789012:log-group:nussknacker:log-stream:scenarios"
}
modelConfig {
classPath: ["model/defaultModel.jar", "model/flinkExecutor.jar", "model/awsManagedFlinkExecutorPlugin.jar",
"components/flink", "components/common"]
}
category: "Streaming"
}
}
ParameterImportanceTypeDefault valueDescription
regionHighstringAWS region of the applications and of the S3 bucket, e.g. eu-central-1.
s3BucketNameHighstringS3 bucket the application JAR file and the deployment properties are uploaded to.
serviceExecutionRoleArnHighstringIAM role the applications run with.
credentials.providerHighstringdefault - the AWS SDK default credentials chain (environment variables, system properties, web identity token, profile, container or instance role); static - the keys below.
credentials.accessKeyIdMediumstringAccess key id, required with provider: "static".
credentials.secretAccessKeyMediumstringSecret access key, required with provider: "static".
cloudWatchLogStreamArnMediumstringCloudWatch log stream the applications log to. When set, it is added to, or updated in, an existing application on the next deployment.
miniCluster.configLowmap of strings{}Configuration of the Flink MiniCluster in the Designer that runs scenario tests.
scenarioTesting.timeoutLowduration55 secondsTimeout of a scenario test.
scenarioTesting.parallelismLowint1Parallelism of a scenario test.

model/awsManagedFlinkExecutorPlugin.jar has to be in modelConfig.classPath of the scenario type: it is what lets the job read its scenario from S3 at startup. Put it only in the classpath of the scenario types deployed to AWS: it also replaces the way the Flink job environment is prepared, leaving it to the application's configuration in AWS.

How a scenario is deployed:

  • The whole model classpath is merged into one JAR file, nussknacker-application-code-<hash>.jar, built once per Designer run. Entries that occur in several JAR files with different content fail the build, unless a rule in modelConfig.applicationJarMergeRules resolves them, e.g. applicationJarMergeRules: [{ pattern: "META-INF/some.properties", strategy: "concat" }]. The pattern is an Ant-style path, and the strategy one of concat, discard, deduplicate, filterDistinctLines, first and rename.
  • The scenario, its version, the deployment data and the model configuration are written to deployment-properties-<hash>.json. Both files are uploaded to the root of s3BucketName, each only once - an object that is already there is not overwritten. Nothing is ever removed from the bucket, so set a lifecycle rule on it.
  • The application is named after the scenario: characters other than letters, digits, _, . and - become _, and a hash of the name is appended. As AWS limits the name to 128 characters, a scenario name longer than 111 characters cannot be deployed.
  • A new application is created with the S3 locations of both files and started. An existing one gets its code and properties updated, and is started if it was not running (READY); a running application is updated in place.
  • Cancel stops the application, which stays in AWS; it is not deleted.

Statuses come from the application status: RUNNING and AUTOSCALING are shown as running, STARTING and UPDATING as during deploy, STOPPING, FORCE_STOPPING and DELETING as during cancel, READY as canceled, ROLLING_BACK, ROLLED_BACK and MAINTENANCE as restarting.

Permissions:

  • The identity of the Designer: s3:PutObject on the bucket; kinesisanalytics:DescribeApplication, CreateApplication, UpdateApplication, StartApplication, StopApplication and AddApplicationCloudWatchLoggingOption; iam:PassRole on the service execution role.
  • The service execution role: trusted by kinesisanalytics.amazonaws.com, with s3:GetObject on the bucket and, with cloudWatchLogStreamArn, the permissions to write to that log group.

Limitations:

  • Nussknacker sets no Flink application configuration - checkpointing, parallelism, scaling and snapshots are the defaults of AWS and can be changed on the application in AWS.
  • Stop, making a savepoint and deploying from a chosen savepoint are not supported. Nussknacker passes no restore configuration when it starts or updates an application, so whether the state of the previous run is restored follows the snapshot settings of the application in AWS.
  • Live data preview is not available, and scenario tests run on a Flink MiniCluster inside the Designer.
  • It can be one of the configured targets, but declares no target type, so targets of this kind cannot be created at runtime.

Ververica Platform​

Deployment Manager of type ververica runs scenarios as deployments of Ververica Platform (VVP), through its REST API - either one Flink cluster per scenario on a VVP deployment target (perJob), or as jobs on a session cluster that is run outside Nussknacker (session, see Session clusters).

Before you start, make sure that:

  • Nussknacker is installed from the installation bundle built for Flink 1.20 and Scala 2.12.
  • Your VVP has an engine version on Flink 1.20. Nussknacker is tested with vera-4.5-jdk17-flink-1.20 (Ververica Runtime 4.5.0).
  • You can change the configuration of the VVP app-manager.
  • You have a ReadWriteMany volume that the Designer and the job pods can share.
  • The VVP namespace has a deployment target for perJob, or a running session cluster for session, and an API token with the editor role for the Designer.

Setting it up:

  1. Configure VVP as described in Configuring Ververica Platform.
  2. Mount the volume read-write in the Designer at designerPath.
  3. Configure the ververica deployment target as below.
deploymentConfig {
type: "ververica"
baseUrl: "https://vvp.example.com"
auth {
type: "apiToken"
token: ${VVP_API_TOKEN}
}
namespace: "default"
workspace: "default"
engineVersion: "vera-4.5-jdk17-flink-1.20"
deploymentMode {
type: perJob
deploymentTargetName: "k8s-target"
}
sharedModelDirectory {
designerPath: "/opt/nussknacker/nussknacker-model"
jobPath: "/flink/nussknacker-model"
}
flinkConfiguration {
"state.backend.type": "rocksdb"
}
}
ParameterImportanceTypeRequiredDefault valueDescription
baseUrlHighstringyesURL of VVP. A path prefix, e.g. of a reverse proxy, is kept.
consoleUrlLowstringnoAbsolute http(s) URL of the VVP web console as a browser opens it, e.g. https://vvp.example.com/. A target created at runtime with this field left empty takes the value of its entry. When set, administrators get a Ververica Platform link in the menu. baseUrl is not used in its place, as it is often reachable only from inside the cluster. A tab with id ververica in tabs takes precedence.
engineVersionHighstringyesA Flink 1.20 engine version of your VVP, e.g. vera-4.5-jdk17-flink-1.20.
deploymentMode.typeHighstringyesperJob or session.
deploymentMode.deploymentTargetNameHighstringfor perJobVVP deployment target the scenarios run on.
deploymentMode.jobResources.jobmanager.cpuMediumnumberno1(perJob only) CPUs of the JobManager.
deploymentMode.jobResources.jobmanager.memoryMediumstringno1Gi(perJob only) Memory of the JobManager.
deploymentMode.jobResources.taskmanager.cpuMediumnumberno1(perJob only) CPUs of a TaskManager.
deploymentMode.jobResources.taskmanager.memoryMediumstringno1Gi(perJob only) Memory of a TaskManager.
deploymentMode.clusterNameHighstringfor sessionSession cluster the scenarios run on. It is provisioned, started and stopped outside Nussknacker and has to be RUNNING when a scenario is deployed.
auth.typeHighstringnononenone, apiToken, credentials or sso. Without the auth block no Authorization header is sent.
auth.tokenHighstringfor apiTokenAPI token sent as a bearer token.
auth.username, auth.passwordHighstringfor credentialsExchanged for a token at POST <baseUrl>/api/v1/auth/tokens.
auth.ssoIdHighstringfor ssoId of the SSO client; the token is taken from the access_token cookie set by GET <baseUrl>/authentication/callback?sso_id=<ssoId>.
namespaceMediumstringnodefaultVVP namespace.
workspaceMediumstringnodefaultVVP workspace.
flinkConfigurationMediummap of stringsno{}Flink configuration of the deployments (flinkConf).
sharedModelDirectory.designerPathHighstringfor perJobAbsolute path where the Designer writes the model, one directory per model - see The model on a shared volume. Not for session.
sharedModelDirectory.jobPathHighstringfor perJobAbsolute path of the same volume in the job pods.
sharedModelDirectory.unusedRetentionLowdurationno1 dayA model directory no active deployment uses is deleted once no deploy has used it for this long.
modelConfigOverrideLowobjectnoMerged over the model configuration the job runs with, e.g. to point at files that only exist in the VVP pods.
deleteFailedDeploymentOnCancelLowbooleannofalseCanceling a scenario whose job has failed deletes the VVP deployment, with its savepoints and history.
savepointPolling.intervalLowdurationno1 secondHow often a savepoint being made, or the one of a stop, is checked.
savepointPolling.timeoutLowdurationno60 secondsHow long to wait for such a savepoint.
jobStopPolling.intervalLowdurationno1 secondHow often a redeploy checks that the previous job has stopped.
jobStopPolling.timeoutLowdurationno5 minutesHow long a redeploy waits for the previous job to stop with a savepoint. A jobStopPolling block that sets only interval gets 60 seconds here.
requestTimeoutLowdurationno1 minuteTimeout of a call to VVP.
artifactUploadTimeoutLowdurationno10 minutesTimeout of an artifact upload.
tokenRefreshMarginLowdurationno5 minutes(credentials, sso) How long before its expiry a token is replaced.
miniCluster.configLowmap of stringsno{}Configuration of the Flink MiniCluster in the Designer that runs scenario tests.
scenarioTesting.timeoutLowdurationno55 secondsTimeout of a scenario test.
scenarioTesting.parallelismLowintno1Parallelism of a scenario test.

How a scenario is deployed:

  • The Designer copies the model to the shared volume, unless the volume has it already, and the job loads it from there. Only a small stub JAR goes to the VVP artifact storage, and only when VVP does not have it yet. On a session cluster the whole model JAR is uploaded instead (see Session clusters). Every deployment uploads nussknacker-deployment-<deploymentId>.json with the scenario, its version, the deployment data and the model configuration; its location is the only argument of the job.
  • The VVP deployment is named after the scenario. A scenario name made only of letters, digits, _ and -, up to 128 characters, is used as is; otherwise every run of other characters becomes -, the name is cut to 119 characters and a hash of the original name is appended. The deployment carries the labels nussknackerScenarioId, nussknackerVersionId and nussknackerDeploymentId; a VVP deployment of the same name that belongs to another scenario is never taken over - the deployment fails.
  • First deployment: the VVP deployment is created, with the scenario's parallelism (default 1), and started without state.
  • Redeploy of a scenario whose job is active: the job is stopped with a savepoint, Nussknacker waits until it has stopped (jobStopPolling), updates the deployment and starts it from that state (LATEST_STATE). When no job is active, the deployment is updated and started without state. Deploying from a chosen savepoint is not supported.
  • Cancel stops the job without a savepoint. The VVP deployment is kept - Nussknacker only deletes it on cancel of a failed job with deleteFailedDeploymentOnCancel.
  • Stop stops the job with a savepoint and returns its location; making a savepoint of a running scenario is supported too.

Statuses come from the newest job of the deployment: STARTING is shown as during deploy, RUNNING as running, CANCELLING as during cancel, CANCELLED as canceled, FINISHED as finished and FAILED as a problem with the failure message from VVP. A deployment deleted in the VVP console is reported as a problem until the scenario is canceled.

Requirements and limitations:

  • Scenario tests run on a Flink MiniCluster inside the Designer.
  • Live data preview reads modelConfig.liveDataPreview.storage, which has to be DESIGNER_DB or DESIGNER_API when live data preview is enabled - without it the Designer refuses the configuration.
  • Periodic scenarios are not supported.

Configuring Ververica Platform​

This is what the VVP side needs. A VVP admin can follow the list.

  1. Engine version. Use a stock engine version on Flink 1.20. Nussknacker is tested with vera-4.5-jdk17-flink-1.20 (Ververica Runtime 4.5.0). Register nothing: the Ververica Runtime image runs the scenarios as it is.

  2. Deployment target. Create a per-job deployment target in the VVP namespace that the Designer uses (namespace). Its name goes to deploymentMode.deploymentTargetName.

  3. API token. Create an API token with the editor role in the same namespace. The Designer uses it as auth.token. A namespace owner creates the token and the deployment target.

  4. Volume mount. The Designer adds no volumes to the deployments it creates. So mount the volume with the model through the platform-wide deployment defaults of VVP, vvp-appmanager.globalDeploymentDefaults in the Helm values - see Platform-Wide Deployment Defaults in the Ververica documentation. A volumeMounts list there replaces the platform mounts of VVP instead of adding to them, so it repeats them (the first three entries):

    vvp-appmanager:
    globalDeploymentDefaults:
    spec:
    template:
    spec:
    kubernetes:
    pods:
    volumeMounts:
    - name: flink-logs
    volume: { name: flink-logs, emptyDir: {} }
    volumeMount: { name: flink-logs, mountPath: /opt/flink/log }
    - name: flink-tmp-dir
    volume: { name: flink-tmp-dir, emptyDir: {} }
    volumeMount: { name: flink-tmp-dir, mountPath: /opt/flink/flink-tmp-dir }
    - name: flink-sts-dir
    volume: { name: flink-sts-dir, emptyDir: {} }
    volumeMount: { name: flink-sts-dir, mountPath: /flink/sts-secrets/sts-credential }
    - name: nussknacker-model
    volume:
    name: nussknacker-model
    persistentVolumeClaim: { claimName: nussknacker-model, readOnly: true }
    volumeMount: { name: nussknacker-model, mountPath: /flink/nussknacker-model, readOnly: true }
    • mountPath of nussknacker-model is the jobPath of sharedModelDirectory.
    • Compare the platform mounts with the Ververica page for your VVP version.
    • In charts older than 3.1.3, globalDeploymentDefaults is one YAML string that replaces the chart's default as a whole: copy that default first, and add kubernetes to it.
    • The value applies only to VVP deployments created after the AppManager restart. A scenario deployed before keeps its VVP deployment without the mount: delete that VVP deployment, and deploy the scenario again.
    • Namespace-level deployment defaults that set kubernetes replace these mounts too. Leave kubernetes out of them.
  5. Claim in every namespace. A pod can use only a claim of its own Kubernetes namespace (see Claims As Volumes). The mount is platform-wide, so a claim named nussknacker-model has to exist in every Kubernetes namespace that VVP deploys into - also where no Nussknacker scenario runs. There, a small empty claim is enough. Without the claim, the job pods stay Pending.

  6. Session clusters (only for session). Run the session cluster on a Flink 1.20 engine version. Raise the upload limit of VVP to at least the size of the model JAR - see Session clusters.

The model on a shared volume​

With sharedModelDirectory, the Designer writes the model to a volume, and the job pods load it from there:

  • The Designer mounts the volume read-write at designerPath, and VVP mounts it at jobPath in the job pods.
  • On the first deploy of a model, the Designer copies it to <designerPath>/<model hash>/. The job loads its classpath from <jobPath>/<model hash>/, and a deploy uploads to VVP only a small stub JAR and the deployment descriptor.
  • After a deploy, at most once an hour, the Designer deletes the model directories that no active deployment of its VVP namespace uses and no deploy used within unusedRetention. So every Designer that writes to one volume has to deploy into the same VVP namespace.
  • The job pods can run on many nodes, so the volume has to be ReadWriteMany (see Access Modes), for example NFS.
  • A PersistentVolume binds one claim only. When the Designer runs in another Kubernetes namespace than the jobs, give each namespace its own claim and PersistentVolume on the same storage, for example on the same NFS export.
  • It works for perJob targets only. A session cluster gets the model by upload - see Session clusters.

Session clusters​

With deploymentMode { type: session, clusterName: "..." }, the scenarios run as jobs on a session cluster that is provisioned, started and stopped outside Nussknacker.

  • The session cluster has to run on a Flink 1.20 engine version, and has to be RUNNING when a scenario is deployed.
  • sharedModelDirectory does not work with a session cluster - the Designer refuses it. Instead, a deploy uploads the model as nussknacker-model-<md5>.jar to the VVP artifact storage, only when VVP does not have it yet.
  • The model JAR is about 400 MB, while the default upload limit of VVP is 200 MB (the Helm value global.upload.maxFileSize, see Artifacts in the Ververica documentation). Raise the limit before you deploy to a session cluster.
  • There are no jobResources for a session cluster: its jobs get the resources of the session cluster.

Ververica targets created at runtime​

The ververica Deployment Manager can be listed in dynamicTargets.deploymentManagers, so that targets can be created at runtime. deploymentMode.type of the entry decides the target type it declares: perJob declares Ververica per-job, session declares Ververica session cluster. To offer both, list ververica twice. Only the perJob entry takes sharedModelDirectory:

dynamicTargets {
deploymentManagers: [
{
type: "ververica"
baseUrl: "https://vvp.example.com"
engineVersion: "vera-4.5-jdk17-flink-1.20"
deploymentMode { type: perJob }
sharedModelDirectory {
designerPath: "/opt/nussknacker/nussknacker-model"
jobPath: "/flink/nussknacker-model"
}
}
{
type: "ververica"
baseUrl: "https://vvp.example.com"
engineVersion: "vera-4.5-jdk17-flink-1.20"
deploymentMode { type: session }
}
]
}

Parameters of a created target, named by the configuration key they set:

  • Ververica per-job: deploymentMode.deploymentTargetName (required) and the four deploymentMode.jobResources.* keys;
  • Ververica session cluster: deploymentMode.clusterName (required);
  • both: baseUrl, engineVersion and auth.type (required), consoleUrl, auth.token, auth.username, auth.password, auth.ssoId, namespace, workspace, requestTimeout, artifactUploadTimeout, tokenRefreshMargin, savepointPolling.* and jobStopPolling.*.

The values given in the entry are offered as the defaults. flinkConfiguration, modelConfigOverride, sharedModelDirectory, deleteFailedDeploymentOnCancel, miniCluster and scenarioTesting are not parameters - they come from the entry only.