Skip to content

Latest commit

 

History

History
97 lines (65 loc) · 2.04 KB

development.md

File metadata and controls

97 lines (65 loc) · 2.04 KB

Development

Telemetry Manager has been bootstrapped with Kubebuilder 3.6.0. To add more APIs, use Kubebuilder.

Prerequisites

  • Install kubebuilder 3.6.0, which is the base framework for Telemetry Manager. Required to add new APIs.
  • Install Golang 1.20 or newer (for development and local execution).
  • Install Docker.
  • Install golangci-lint.
  • Install ginkgo CLI to run the E2E test commands straight from your terminal.

Other dependencies will be downloaded by the make targets to the bin sub-folder.

Development Commands

For development, use the following commands:

  • Run golangci-lint and lint manifests

    make lint
  • Autofix all automatically-fixable linter complaints

    make lint-autofix
  • Regenerate YAML manifests (CRDs and RBAC)

    make manifests
  • Install CRDs to cluster in current kubeconfig context

    make install
  • Uninstall CRDs to cluster in current kubeconfig context

    make uninstall
  • Run Telemetry Manager locally (uses current kubeconfig context)

    make run
  • Build container image and deploy to cluster in current kubeconfig context

    export IMG=<my container repo>
    make docker-build
    make docker-push
    kubectl create ns kyma-system
    make deploy-dev
  • Clean up everything

    make undeploy

Testing Commands

For testing, use the following commands:

  • Run unit tests

    make test
  • Deploy module with Lifecycle Manager on a k3d cluster

    make provision-k3d-e2e
  • Run e2e tests

    ginkgo run --tags e2e --label-filter="<e2e test suite label>" test/e2e

    Example:

    ginkgo run --tags e2e --label-filter="logs" test/e2e