This project provides a Kubernetes operator for managing Flink jobs using a Kratix-backed state store.
- A running Kubernetes cluster
- Kratix see install guide
- Docker environment with the ability to build images for both amd64 or arm64 architectures.
# INPUT tests/test-input/object.yaml
# OUTPUT tests/test-output/
# ENVs see internal/configure-pipeline/.env
export WORKSPACE="<path-to-repo>"
export KRATIX_WORKFLOW_TYPE="promise" or "resource"cd internal/configure-pipeline
cargo build
cargo test -- --test-threads=1 # 1 thread is required only otherwise it will fail due to file managmentFirst, build the requisite workflow docker image. Two are available, based on Rust and shell. Both are functionally equivalent.
# rust based pipeline
docker build --tag opencredo/flink-configure-pipeline:dev ./internal/configure-pipeline# shell based pipeline
docker build --tag opencredo/flink-configure-pipeline:dev ./shell/configure-pipelineNext, load the image into your docker environment. Using kind:
kind load docker-image opencredo/flink-configure-pipeline:dev --name platformApply the promise:
kubectl apply --context $PLATFORM --filename promise.yamlNow wait until the flink operator is available in the worker cluster:
kubectl --context $WORKER get pods --watchNow you can fulfil a resource-request as a Flink job:
kubectl apply --context $PLATFORM --filename resource-request.yamlkubectl --context $PLATFORM get crds flinkdeps.example.promise.syntasso.io
kubectl logs -l=kratix-promise-id=flinkdep -n kratix-platform-system -c flinkdep-promise-pipelineDeleting the resource:
kubectl delete --context $PLATFORM --filename resource-request.yamlDeleting the promise:
kubectl delete --context $PLATFORM --filename promise.yaml