linode-cloud-controller-manager

Development Guide

Prerequisites

The Linode Cloud Controller Manager development requires:

Setting Up Development Environment

The simplest way to set up your development environment is using Devbox:

  1. Install Devbox by following the instructions at jetpack.io/devbox/docs/installing_devbox/

  2. Start the development environment:

devbox shell

This will automatically set up all required dependencies and tools for development.

Option 2: Manual Setup

  1. If you haven't set up a Go development environment, follow these instructions to install Go.

On macOS, you can use Homebrew:

brew install golang

Getting Started

Download Source

go get github.com/linode/linode-cloud-controller-manager
cd $(go env GOPATH)/src/github.com/linode/linode-cloud-controller-manager

Building the Project

Build Binary

Use the following Make targets to build and run a local binary:

# Build the binary
make build

# Run the binary
make run

# You can also run the binary directly to pass additional args
dist/linode-cloud-controller-manager

Building Docker Images

To build and push a Docker image:

# Set the repo/image:tag with the TAG environment variable
# Then run the docker-build make target
IMG=linode/linode-cloud-controller-manager:canary make docker-build

# Push Image
IMG=linode/linode-cloud-controller-manager:canary make docker-push

To run the Docker image:

docker run -ti linode/linode-cloud-controller-manager:canary

Managing Dependencies

The Linode Cloud Controller Manager uses Go Modules to manage dependencies.

To update or add dependencies:

go mod tidy

Development Guidelines

Code Quality Standards

Code Structure

Security & Performance

Documentation & Testing

Pull Request Process

  1. Ensure your code follows the project's coding standards
  2. Update documentation as needed
  3. Add or update tests as appropriate
  4. Make sure all tests pass locally
  5. Submit the PR with a clear description of the changes

Getting Help

For development related questions or discussions, join us in #linode on the Kubernetes Slack.