Skip to content

Commit

Permalink
Add tests for weaviate-operator and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrancoa committed Aug 30, 2024
1 parent d9582e1 commit de5a1f2
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 4 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Run Tests

on:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Kind Cluster
uses: helm/kind-action@v1
with:
cluster_name: test-cluster

- name: Build the Weaviate Operator image
run: make docker-build

- name: Install Weaviate Operator
run: make deploy

- name: Wait for weaviate-operator-controller-manager to be ready
run: |
kubectl wait --for=condition=available deployment/weaviate-operator-controller-manager -n weaviate-operator-system --timeout=300s
if [ $? -ne 0 ]; then
kubectl logs deployment/weaviate-operator-controller-manager -n weaviate-operator-system
fi
- name: Create Weaviate namespace
run: kubectl create namespace weaviate

- name: Install CR
run: kubectl apply -f config/samples/apps_v1alpha1_weaviatecluster.yaml -n weaviate

- name: Wait for Pods to be Ready
run: |
kubectl wait sts/weaviate -n weaviate --for jsonpath='{.status.readyReplicas}'=${REPLICAS} --timeout=${TIMEOUT}
if [ $? -ne 0 ]; then
kubectl logs -l app=weaviate -n weaviate --all-containers=true --prefix
fi

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Before getting started, make sure you have the following prerequisites:
- Have a kubernetes cluster.
- Ensure that your user is authorized with cluster-admin permissions.

If you want to deploy a local kubernetes cluster for local testing you can install kind:
If you want to deploy a local kubernetes cluster for local testing you can [install kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation):
```
brew install kind
```
Expand All @@ -35,11 +35,11 @@ kind create cluster --wait 120s --name weaviate-k8s --config /tmp/kind-config.ya
The Weaviate Operator wraps the [weaviate-helm](https://github.com/weaviate/weaviate-helm) Helm charts, creating a CRD and CRs which allow passing specific values to configure the application.


## Run the operator
## Deploy the operator

There are multiple ways to run the operator:
There are multiple ways to run the `weaviate-operator`:

1. The easiest way is to run the one-command Manifest:
1. The easiest way is to apply the one-single-command Manifest:

```shell
kubectl apply -f https://github.com/weaviate/weaviate-operator/releases/download/0.0.1/operator.yaml
Expand Down

0 comments on commit de5a1f2

Please sign in to comment.