Skip to main content
Version: 1.2

Deployment Manager configuration

Configuration of Deployment Manager, which is component of the Designer that deploys scenario to given Engine (e.g. Streaming-Lite runtime or Flink in Streaming-Flink mode). Type of Deployment Manager is defined with type parameter, e.g. for running scenarios with Flink streaming job we would configure:

deploymentConfig {     
type: "flinkStreaming"
restUrl: "http://localhost:8081"

Look at configuration areas to understand where Deployment Manager configuration should be placed in Nussknacker configuration.

Streaming-Lite on Kubernetes

Please remember, that K8s Deployment Manager has to be run with properly configured K8s access. If you install the Designer in K8s cluster (e.g. via Helm chart) this comes out of the box. If you want to run the Designer outside the cluster, you have to configure .kube/config properly.

streaming-lite-k8s Deployment Manager has the following configuration options:

ParameterTypeDefault valueDescription
dockerImageNamestringtouk/nussknacker-lite-kafka-runtimeRuntime image (please note that it's not touk/nussknacker - which is designer image)
dockerImageTagstringcurrent nussknacker version
scalingConfig{fixedReplicasCount: int} or {tasksPerReplica: int}{ tasksPerReplica: 4 }see below
configExecutionOverridesconfig{}see below
k8sDeploymentConfigconfig{}see below
nussknackerInstanceNamestring{?NUSSKNACKER_INSTANCE_NAME}see below

Customizing K8s deployment

By default, each scenario creates K8s Deployment. By default, Nussknacker will create following deployment:

apiVersion: apps/v1
kind: Deployment
annotations: |-
"versionId" : 2,
"processName" : "DetectLargeTransactions",
"processId" : 7,
"user" : "",
"modelVersion" : 2
labels: "helm-release-name" "7" detectlargetransactions-080df2c5a7 "2"
minReadySeconds: 10
matchLabels: "7"
type: Recreate
labels: "7" detectlargetransactions-080df2c5a7 "2"
name: scenario-7-detectlargetransactions
- env:
value: /data/scenario.json
value: /opt/nussknacker/conf/application.conf,/data/modelConfig.conf
value: /data/deploymentConfig.conf
- name: POD_NAME
apiVersion: v1
image: touk/nussknacker-lite-kafka-runtime:1.3.0 # filled with dockerImageName/dockerImageTag
path: /alive
port: 8558
scheme: HTTP
name: runtime
failureThreshold: 60
path: /ready
port: 8558
scheme: HTTP
periodSeconds: 1
- mountPath: /data
name: configmap
- configMap:
name: scenario-7-detectlargetransactions-ad0834f298
name: configmap

You can customize it adding e.g. own volumes, deployment strategy etc. with k8sDeploymentConfig settings, e.g. add additional custom label environment variable to the container, add custom sidecar container:

spec {
metadata: {
labels: {
myCustomLabel: addMeToDeployment
containers: [
#`runtime` is default container executing scenario
name: runtime
env: [
name: sidecar-log-collector
image: sidecar-log-collector:latest
command: [ "command-to-upload", "/remote/path/of/flink-logs/" ]

This config will be merged into final deployment. Please note that you cannot override names or labels configured by Nussknacker.

Overriding configuration passed to runtime.

By default, configuration of Streaming-Lite runtime consists of

  • application.conf from runtime image - see this for default.
  • the configuration from modelConfig

In some circumstances you want to change values in modelConfig without having to modify base image. E.g. different accounts/credentials should be used in Designer and in Runtime. For those cases you can use configExecutionOverrides setting:

deploymentConfig {     
configExecutionOverrides {
password: "sfd2323afdf" # this will be used in the Runtime
modelConfig {
password: "aaqwmpor909232" # this will be used in the Designer

Configuring replicas count

Each scenario has its own, configured parallelism. It describes how many worker threads, across all replicas, should be used to process events. With scalingConfig one can affect replicas count (each replica receives the same number of worker threads). Following options are possible:

  • { fixedReplicasCount: x }
  • { tasksPerReplica: y }
  • by default tasksPerReplica: 4

Please note that:

  • it's not possible to set both config options at the same time
  • due to rounding, exact workers count may be different from parallelism (e.g. for fixedReplicasCount = 3, parallelism = 5, there will be 2 tasks per replica, total workers = 6)

Nussknacker instance name

Value of nussknackerInstanceName will be passed to scenario runtime pods as a Kubernetes label. In a standard scenario, its value is taken from Nussknacker's pod label which, when installed using helm should be set to helm release name.

It can be used to identify scenario deployments and its resources bound to a specific Nussknacker helm release.

flinkStreaming Deployment Manager has the following configuration options:

ParameterTypeDefault valueDescription
restUrlstringThe only required parameter, REST API endpoint of the Flink cluster
jobManagerTimeoutduration1 minuteTimeout for communication with FLink cluster. Consider extending if e.g. you have long savepoint times etc.
shouldVerifyBeforeDeploybooleantrueBy default, before redeployment of scenario with state from savepoint, verification of savepoint compatibility is performed. There are some cases when it can be too time consuming or not possible. Use this flag to disable it.
queryableStateProxyUrlstringSome Nussknacker extensions require access to Flink queryable state. This should be comma separated list of host:port addresses of queryable state proxies of all taskmanagers in the cluster
shouldCheckAvailableSlotsbooleantrueWhen set to true, Nussknacker checks if there are free slots to run new job. This check should be disabled on Flink Kubernetes Native deployments, where Taskmanager is started on demand.