Skip to content

Latest commit

 

History

History
67 lines (47 loc) · 1.44 KB

File metadata and controls

67 lines (47 loc) · 1.44 KB

Run controller locally on kind

Use this flow when you want a fast feedback loop while developing the controller (e.g. debugging reconciliation logic, iterating on controller code, watching logs/events) against a local Kubernetes cluster created with kind.

For full end-to-end coverage, use the functional test harness (./test/prepare.sh + ./test/run.sh). That path deploys IrSO into the cluster and also installs extra dependencies (e.g. cert-manager, MariaDB operator), which is great for E2E but typically much slower to iterate on.

Prerequisites

  • go
  • kubectl
  • kind
  • make

Steps

  1. Create a local cluster:

    kind create cluster --name irso-dev
  2. Point kubectl to the kind context and confirm it:

    kubectl config use-context kind-irso-dev
    kubectl cluster-info
  3. Install CRDs:

    make install
  4. Run the controller locally (outside the cluster):

    make run RUNARGS="--webhook-port=0 --leader-elect=false"
  5. (Optional) Apply the sample Ironic resource:

    kubectl apply -f config/samples/v1alpha1_ironic.yaml
  6. Verify resources:

    kubectl get crd | grep ironics.ironic.metal3.io
    kubectl get ironic -A

    To stop the controller, press Ctrl+C in the terminal where make run is running.

  7. Delete the kind cluster:

    kind delete cluster --name irso-dev