Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions tests/run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

# Deploy the custom resource definitions
kubectl create -f deploy/crds/charts.helm.k8s.io_skydives_crd.yaml
kubectl create -f deploy/crds/charts.helm.k8s.io_netflowcollectors_crd.yaml

# Install the operator
kubectl create -f deploy/service_account.yaml
kubectl create -f deploy/role.yaml
kubectl create -f deploy/role_binding.yaml
kubectl create -f deploy/operator.yaml

# Create a general Skydive resource
kubectl create -f deploy/crds/charts.helm.k8s.io_v1alpha1_skydive_cr.yaml
# Create Skydive as netflow collector resource
kubectl create -f deploy/crds/charts.helm.k8s.io_v1alpha1_netflowcollector_cr.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one of the _cr.yaml should be installed at a time. Each of them deploys a Skydive, and only one Skydive instance can run at a cluster (unless this was fixed)


# Do some tests...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. For kubectl create -f deploy/crds/charts.helm.k8s.io_v1alpha1_netflowcollector_cr.yaml
    kubectl get pods
    We expect the same as with helm deployment - skydive pods are up and running
    NAME READY STATUS RESTARTS AGE
    netflow-collector-skydive-agent-f8zgq 1/1 Running 0 3m8s
    netflow-collector-skydive-agent-klbmb 1/1 Running 0 3m8s
    netflow-collector-skydive-agent-zmb5m 1/1 Running 0 3m8s
    netflow-collector-skydive-analyzer-866d9778c4-bw4pk 3/3 Running 0 3m8s
    skydive-operator-67c958f454-fkg9j 1/1 Running 0 3m28s

  2. The same as above for kubectl create -f deploy/crds/charts.helm.k8s.io_v1alpha1_netflowcollector_cr.yaml (after removing the above by running kubectl delete -f deploy/crds/charts.helm.k8s.io_v1alpha1_skydive_cr.yaml)

  3. When deploying the charts.helm.k8s.io_v1alpha1_netflowcollector_cr.yaml we can optionally go deeper:
    kubectl describe pods netflow-collector-skydive-analyzer-866
    and see it has 3 containers: skydive-analyzer, skydive-exporter and skydive-minio, and all are running