Skip to content

Latest commit

 

History

History
98 lines (72 loc) · 2.28 KB

running-locally.md

File metadata and controls

98 lines (72 loc) · 2.28 KB

Running Locally

Pre-Requisites

Quickstart

Run the following to have the plugin deployed into a local cluster

make cluster-up
make deploy

Developing Locally

Make targets are added to allow doing common operational tasks. Run make help to see all options.

Setup cluster

  1. Once the pre-requisites are met, you can create the local Kubernetes cluster using

    make cluster-up
  2. Using any of these methods, once the cluster is created, verify the cluster is running using

    kubectl get nodes
  3. You should see an output similar to

    NAME                 STATUS   ROLES           AGE   VERSION
    kind-control-plane   Ready    control-plane   64s   v1.27.3
    

Tear down cluster

To delete the local cluster, run

make cluster-down

Build and Deploy

  1. To build the image

    # with the defaults - `ghcr.io/mbtamuli/csi-quickstart/emptydirclone:latest`
    make docker-build

    Note: You can change the image name or tag as follows, which also works with docker-push,kind-load and deploy targets

    # setting the image name - `myimage:latest`
    make docker-build IMG=myimage
    
    # setting the image name and tag - `myimage:1.0.0`
    make docker-build IMG=myimage TAG=1.0.0
  2. To push the image

    make docker-push
  3. To load the image locally into the cluster created in Setup Cluster

    make kind-load
  4. To deploy the manifests

    make deploy

Running tests and checking logs

  1. Check plugin logs. Run the following in a separate terminal as it will "follow" the logs

    make logs
  2. Run csc tests

    make csc-tests
  3. Run the e2e tests using. See e2e

    make e2e