Skip to content

Latest commit

 

History

History
100 lines (68 loc) · 3.24 KB

developer_guide.md

File metadata and controls

100 lines (68 loc) · 3.24 KB

Development guidelines for KubeSlice Worker

The KubeSlice-worker operator manages the life cycle of KubeSlice worker cluster related CRDs. It is strongly recommended to use a released version. Follow the instructions provided in this guide.

Building and Installing kubeslice-worker in a Local Kind Cluster

For more information, see getting started with kind clusters.

Setting up Development Environment

  • Go (version 1.17 or later) installed and configured in your machine (Installing Go)
  • Docker installed and running in your local machine
  • A running kind cluster
  • kubectl installed and configured
  • Follow the getting started from above, to install kubeslice-controller

Building Docker Images

  1. Clone the latest version of kubeslice-controller from the master branch.
git clone https://github.com/kubeslice/worker-operator.git
cd worker-operator
  1. Adjust image name variable IMG in the Makefile to change the docker tag to be built. Default image is set as IMG ?= aveshasystems/worker-operator:latest. Modify this if required.
make docker-build
  1. Loading kubeslice-worker Image into your Kind cluster (link). If needed, replace aveshasystems/worker-operator with your locally built image name in the previous step. See loading an image into your cluster.
kind load docker-image aveshasystems/worker-operator --name kind
  1. Check the loaded image in the cluster. Modify the node name if required.
docker exec -it kind-control-plane crictl images

Installation

To install:

  1. Create chart values file yourvaluesfile.yaml. Refer to values.yaml to create yourvaluesfile.yaml and update the operator image subsection to use the local image.

From the sample:

operator:
  image: docker.io/aveshasystems/worker-operator
  tag: 0.2.3

Change it to:

operator:
  image: <my-custom-image> 
  tag: <unique-tag>
  1. Deploy the Updated Chart
make chart-deploy VALUESFILE=yourvaluesfile.yaml

Running test cases

After running the below command, you should see that all test cases have passed.

make test

Uninstalling the kubeslice-worker

Refer to the uninstall guide

  1. Detach the application from the slice.

  2. Delete the slice.

  3. On the worker cluster, undeploy the kubeslice-worker charts.

# uninstall all the resources
make chart-undeploy

License

Apache License 2.0