e2e/

directory
v0.6.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2023 License: MIT

README

Here is how to run e2e locally. Make sure that you have installed Docker and Kind.

  1. Build the docker images
export KUBECONFIG=~/.kube/config
OUTPUT_TYPE=type=docker make docker-build-member-agent docker-build-hub-agent docker-build-refresh-token
  1. Create the kind clusters and install the helm.
make creat-kind-cluster

or

make create-hub-kind-cluster
make create-member-kind-cluster
make install-helm
  1. Run the test

run the e2e test suite

make run-e2e

or test manually

kubectl --context=kind-hub-testing delete ns local-path-storage
kubectl --context=kind-hub-testing apply -f examples/fleet_v1alpha1_membercluster.yaml
kubectl --context=kind-hub-testing apply -f test/integration/manifests/resources
kubectl --context=kind-hub-testing apply -f test/integration/manifests/resources
kubectl --context=kind-hub-testing apply -f test/integration/manifests/placement/select-namespace.yaml
  1. Check the controller logs

check the logs of the hub cluster controller

kubectl --context=kind-hub-testing -n fleet-system get pod 

NAME                       READY   STATUS    RESTARTS   AGE
hub-agent-8bb6d658-6jj7n   1/1     Running   0          11m

check the logs of the member cluster controller

kubectl --context=kind-member-testing -n fleet-system get pod 
  1. check the hub metrics
kubectl --context=kind-hub-testing -n fleet-system  port-forward hub-agent-8bb6d658-6jj7n 13622:8080

Forwarding from 127.0.0.1:13622 -> 8080
Forwarding from [::1]:13622 -> 8080

curl http://127.0.0.1:13622/metrics

Use a local prometheus to draw graphs. Download prometheus binary for your local machine. Start the prometheus.

prometheus --config.file=test/e2e/prometheus.yml 

6.uninstall the resources

make uninstall-helm
make clean-e2e-tests

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL