Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Latest commit

 

History

History
25 lines (17 loc) · 1.4 KB

CONTRIBUTING.md

File metadata and controls

25 lines (17 loc) · 1.4 KB

Contributing guidelines

Filing issues

File issues using the standard Github issue tracker for the repo.

Building the code

  1. Run ./build.sh
  2. To run the tests: go test -v ./kubestate

You will need a Kubernetes cluster to fetch metrics from. A quick way to get going is to use Minikube.

You can use client_test.go as way to test if you can successfully contact the cluster. Remove Skip from SkipConvey to enable the tests and then run go test -v ./kubestate

To test the snap task locally with the snap server (snapd or snapteld):

  1. Load the plugin: snapctl plugin load build/snap-plugin-collector-kubestate or snaptel plugin load build/snap-plugin-collector-kubestate if you have latest version of Snap.
  2. If you want to publish the results to a file, you need to download the file publisher plugin and load that too: snapctl plugin load snap-plugin-publisher-file_linux_x86_64
  3. Create a task using the example task after editing the config to point to your Kubernetes config file: snapctl task create -t examples/task.json
  4. snapctl task list to check if it is running and then snapctl task watch <task id> to see the value being fetched.