kontrol

package module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 6 Imported by: 0

README

kontrol CI godoc goreportcard license

Kontrol is a CLI and Kubernetes controller with the goal of making packaging and deploying other controllers easier. It does this by providing a way to package a controller along with the Kubernetes manifests required for it to run.

It doesn't reinvent the wheel; it intends to operate on the controller's image after something like docker has built it, it can be used with kubebuilder and it outputs manifests that can be applied with kubectl.

install

From a release.

Using brew:

brew install frantjc/tap/kontrol

From source:

git clone https://github.com/frantjc/kontrol
cd kontrol
make

Using go:

go install github.com/frantjc/kontrol/cmd/kontrol

In GitHub Actions:

  - uses: frantjc/kontrol@0.2

usage

Package

Build your controller's image:

docker build path/to/controller -t your/tag

Bundle your controller's manifests with the image:

kontrol package your/tag \
    --crds path/to/crds.yaml \
    --roles path/to/role.yaml
Deploy

Apply your controller's manifests:

kontrol deploy your/tag | kubectl apply -f -

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Semver = "0.0.0"

Semver is the semantic version of kontrol. Meant to be be overridden at build time.

Functions

func GetSemver

func GetSemver() string

GetSemver returns the semantic version of kontrol as built from Semver and debug build info.

func WithLogger

func WithLogger(ctx context.Context, logger Logger) context.Context

WithLogger returns a Context from the parent Context with the given Logger inside of it.

Types

type Logger

type Logger = logr.Logger

Logger is an alias to logr.Logger in case the logging library is desired to be swapped out.

func LoggerFrom

func LoggerFrom(ctx context.Context) Logger

LoggerFrom returns a Logger embedded within the given Context or a no-op Logger if no such Logger exists.

func NewLogger

func NewLogger() Logger

NewLogger creates a new Logger.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=frantj.cc
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=frantj.cc
cmd
pkg
lbl

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL