Skip to content

Commit

Permalink
add check script
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumEnigmaa committed Sep 16, 2024
1 parent 7ab0408 commit 7abb46f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/manual_e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ As of now, the [apptest-framework](https://github.com/giantswarm/apptest-framewo

Before proceeding to any kind of test, you'll first have to deploy your custom branch app's version into a testing installation. Don't forget to suspend flux reconciliation for this app during the whole testing process. See [here](https://intranet.giantswarm.io/docs/dev-and-releng/flux/suspending-flux/#how-to-be-more-granular--subtle-with-suspending-resources-and-why-be-careful-with-this) for details on how to evict an app from flux's reconciliation.

Obviously you'll have to check that the deployment of your custom branch's version has gone smoothly. If the app is in a different state than `deployed` please describe the app and try to fix it according to the displayed events' description.
Once that's done, please run the `basic_checks.sh` script which will check that the app is in `deployed` state and that the `loki-canary` component is enabled.

Once your app is correctly deployed, :
Once your app is correctly deployed and configured :

- Let it run for a bit, like 10min or more.
- Make sure that the `loki-canary` component is enabled and deployed. If not, please create a user values configmap on the installation to enable the canary.
- Inspect the `Loki / Operational` dasboard which will give information on Loki's overall health.
- If everything appears to be fine, then you can revert the flux's evicting procedure that you did and let it reconcile to its original version.

Expand Down
23 changes: 23 additions & 0 deletions tests/manual_e2e/basic_checks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

echo "Checking if loki app is in deployed state"

deployed=$(kubectl get app -n giantswarm loki -o yaml | yq .status.release.status)

if [[ "$deployed" != "deployed" ]]; then
echo "loki app is not in deployed state. Please fix the app before retrying"
exit 1
else
echo "loki app is indeed in deployed state"
fi

echo "Checking if loki-canary is enabled"

canary=$(kubectl get cm -n giantswarm loki-chart-values -oyaml | yq .data.values | yq .loki.lokiCanary.enabled)

if [[ "$canary" != "true" ]]; then
echo "loki-canary is not enabled. Please enable it before retrying"
exit 1
else
echo "loki-canary is indeed enabled"
fi

0 comments on commit 7abb46f

Please sign in to comment.