Skip to content

Commit

Permalink
docs: adding instructions for building pipeline image
Browse files Browse the repository at this point in the history
  • Loading branch information
burythehammer committed Jul 4, 2024
1 parent 9c1be53 commit 60fe1ea
Showing 1 changed file with 35 additions and 12 deletions.
47 changes: 35 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ This project provides a Kubernetes operator for managing Flink jobs using a Krat
- Kratix [see install guide](https://docs.kratix.io/main/guides/installing-kratix/single-cluster)
- Docker environment with the ability to build images for both amd64 or arm64 architectures.



### Test Changes
```bash

Expand All @@ -29,38 +27,63 @@ cargo build
cargo test -- --test-threads=1 # 1 thread is required only otherwise it will fail due to file managment
```

### Setup

#### Creating the workflow image

First, build the requisite workflow docker image. Two are available, based on Rust and shell. Both are functionally equivalent.

### Setup (Promise)
```bash
kubectl apply --context $PLATFORM --filename promise.yaml
# rust based pipeline
docker build --tag opencredo/flink-configure-pipeline:dev ./internal/configure-pipeline
```

```bash
# shell based pipeline
docker build --tag opencredo/flink-configure-pipeline:dev ./shell/configure-pipeline
```

Next, load the image into your docker environment. Using kind:

```bash
kind load docker-image opencredo/flink-configure-pipeline:dev --name platform
```


### Creating the promise
Apply the promise:

```bash
kubectl apply --context $PLATFORM --filename promise.yaml
```

Now wait until the flink operator is available in the worker cluster:
```bash
kubectl --context $WORKER get pods --watch
```

### Setup (Request)
Once the flink operator is running as seen in the previous step you are ready to fulfil a [resource-request](resource-request.yaml) as a Flink job:
### Creating the flink promise request

Now you can fulfil a [resource-request](resource-request.yaml) as a Flink job:
```bash
kubectl apply --context $PLATFORM --filename resource-request.yaml
```


### Kratix Verification

```bash
kubectl --context $PLATFORM get crds flinkdeps.example.promise.syntasso.io

kubectl logs -l=kratix-promise-id=flinkdep -n kratix-platform-system -c flinkdep-promise-pipeline

```

### Teardown (Request)
### Teardown

Deleting the resource:
```bash
kubectl delete --context $PLATFORM --filename resource-request.yaml
```

### Teardown (Promise)
Deleting the promise:
```bash
kubectl delete --context $PLATFORM --filename promise.yaml

```

0 comments on commit 60fe1ea

Please sign in to comment.