Reference dataflow workload app for the Kafka/NiFi/Flink platform.
This repo contains only deployable workload manifests. Platform/runtime resources (Kafka brokers, Flink cluster, NiFi deployment, Keycloak, oauth2-proxy) remain in k8s-kafka.
manifests/batch-processing-examples.yaml- ConfigMap with staged pipeline topic + consumer group config
- ConfigMap with NiFi flow reference doc (two NiFi chains)
Jobto create staged Kafka topicsJobto seed stage-1 input topicJobto submit Flink SQL stage-1 pipelineJobto submit Flink SQL stage-2 pipelineJobto verify final output topic is readable by the NiFi Kafka principal
manifests/nifi-declarative-flow-crs.yaml- NiFiKop declarative CRs for NiFi workflow lifecycle:
NifiCluster(external mode)NifiRegistryClientNifiParameterContext- Registry bootstrap
JobforflowVersion: 1 NifiDataflow- NiFi stage-chain bootstrap
Jobthat declaratively creates/updates/starts processor chains for stage-1 and stage-2 Kafka bridging
- This file is applied by Argo from
manifests/. - Registry
flowVersion: 1is created automatically by the bootstrap Job.
- NiFiKop declarative CRs for NiFi workflow lifecycle:
manifests/nifi-registry.yaml- Internal NiFi Registry deployment + service + PVC
- Stores versioned flow definitions consumed by
NifiDataflowresources
The deployed example models this path:
- Flink stage 1 consumes
batch.example.stage1.input.v1and writesbatch.example.stage1.flink-to-nifi.v1. - NiFi stage 1 consumes
batch.example.stage1.flink-to-nifi.v1, does simple transform, writesbatch.example.stage2.nifi-to-flink.v1. - Flink stage 2 consumes
batch.example.stage2.nifi-to-flink.v1and writesbatch.example.stage2.flink-to-nifi.v1. - NiFi stage 2 consumes
batch.example.stage2.flink-to-nifi.v1, does simple transform, writesbatch.example.stage3.nifi-final.v1.
What is automated by manifests:
- Topic creation
- Seed stage-1 input data
- Flink stage-1 SQL submission
- Flink stage-2 SQL submission
- Final output verification using NiFi Kafka credentials
- NiFi stage-1 and stage-2 processor chain bootstrap and start-up
What remains operator-driven in NiFi UI:
- Applying any business routing/sink logic in NiFi
Use manifests/nifi-declarative-flow-crs.yaml for GitOps-managed NiFi workflows.
- Provide required secrets for the declarative CR file:
secret/data/k8s-kafka-nifikop-client-cert-pemsecret/data/k8s-kafka-nifikop-client-key-pemsecret/data/k8s-kafka-nifi-ca-cert-pemsecret/data/k8s-kafka-nifi-registry-bucket-idsecret/data/k8s-kafka-nifi-registry-flow-id
flowVersion: 1is bootstrapped automatically if missing.- NiFi processor topology is then reconciled by the stage-chain bootstrap Job (also declarative in manifests).
Notes:
- External-cluster reconciliation needs non-interactive NiFi API auth (
basicortls). bucketIdandflowIdcome from NiFi Registry flow metadata.- NiFiKop must watch
dataflownamespace in addition tokafka.
This repo is deployed by the dataflow-example-app Argo CD Application defined in:
https://github.com/dotcomrow/dataflow-apps
Target namespace: dataflow