Deployment Targets

Apache Flink Deployments reference a Deployment Target, which corresponds to different Kubernetes namespaces in the same Kubernetes cluster, that Ververica Platform runs in.

Additionally, the DeploymentTarget resource can provide a patch set that is applied to all Deployment resources that reference it.

Once a DeploymentTarget resource is created, you can reference it in Deployment resources. Note that a created DeploymentTarget are immutable.

Deleting a DeploymentTarget is only possible if it is not referenced by any Deployment.

Specification

Kubernetes

This is a required attribute that defines which Kubernetes namespace to use for Flink deployments. The spec.kubernetes.namespace field is an optional String. If not set, Ververica Platform will use the same Kubernetes namespace it is running in.

kind: DeploymentTarget
spec:
  kubernetes:
    namespace: staging

It is required that Ververica Platform’s ServiceAccount has proper access rights that allow managing Flink clusters in other Kubernetes namespaces.

For convenience, you can create the necessary Kubernetes Roles and RoleBindings via the Helm charts using the appmanager.rbac.additionalNamespaces value.

Warning

It is recommended to run Ververica Platform and the Flink Jobs managed by Ververica Platform in separate Kubernetes Namespaces.

Deployment Patch Set (Experimental)

Note

This is an experimental feature and there are no guarantees about future API compatibility for this feature.

We allow to specify JSON patches that are applied whenever a Deployment is created or modified.

kind: DeploymentTarget
spec:
  deploymentPatchSet:
  - op: add
    path: /spec/template/spec/flinkConfiguration/state.checkpoints.dir
    value: s3://my-bucket/checkpoints
  - op: add
    path: /spec/template/spec/flinkConfiguration/state.savepoints.dir
    value: s3://my-bucket/savepoints

This examples adds two entries into the flinkConfiguration of each Deployment. The provided patches are applied in order. If a patch fails, the complete Deployment operation will fail. You can address any field of a Deployment via the path attribute.

Please refer to the RFC for details on the supported operations.