Skip to content

Commit

Permalink
Merge pull request #120 from syntasso/compression_docs
Browse files Browse the repository at this point in the history
chore: update Troubleshooting docs to reflect that Works and Workplacements have compressed contents
  • Loading branch information
ChunyiLyu authored Sep 26, 2024
2 parents 7ec2f95 + bbcdb3b commit 8b5ee96
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/main/08-troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ Let's first check:
kubectl get work <work-name> -o yaml
```
Please note that the `workload.content` is compressed to reduce the size of the Work, to inspect
the raw content of the document you can decode and decompress with `gzip` you can do the following:
```bash
// Get the filepath of the first scheduled document
kubectl get work <work-name> -o=jsonpath='{.spec.workloadGroups[0].workloads[0].filepath}'
// Get, decode and decompress the content of the first scheduled document
kubectl get work <work-name> -o=jsonpath='{.spec.workloadGroups[0].workloads[0].content}' | base64 -d | gzip -d
```
1. Check the document is scheduled to the correct Destination
- Check the `WorkPlacement` resource (an internal Kratix resource that is
created from the `Work` resource, representing the scheduling of a `Work`)
Expand All @@ -61,6 +72,15 @@ Let's first check:
kubectl get workplacement --selector kratix.io/resource-name=<request-name>
```
As with the `Work`, the `workload.content` in a WorkPlacement is compressed to reduce the size of the WorkPlacement, to inspect the raw content of the document you can decode and decompress with `gzip` you can do the following:
```bash
// Get the filepath of the first scheduled document
kubectl get work <workplacement-name> -o=jsonpath='{.spec.workloads[0].filepath}'
// Get, decode and decompress the content of the first scheduled document
kubectl get work <workplacement-name> -o=jsonpath='{.spec.workloads[0].content}' | base64 -d | gzip -d
```
If the `WorkPlacement` doesn't exist, this means that no Destination was found
that matches the required scheduling selectors. Kratix has been unable to
schedule the `Work`. See [below for further steps to
Expand Down

0 comments on commit 8b5ee96

Please sign in to comment.