kapp

package
v0.0.0-...-fe3d3e7 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package kapp installs and manages instances of kapp-controller into Kubernetes clusters.

Index

Constants

View Source
const (
	DefaultKappValues = `` /* 464-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a client for interfacing with kapp-controller.

func (Client) Install

func (k Client) Install(opts InstallOpts) (*v1.Deployment, error)

Install performs and installation.

func (Client) Status

func (k Client) Status(ns, name string) string

Status gets the status of a package.

type InstallOpts

type InstallOpts struct {
	// MergedManifests represents the final (serialized) data for installing kapp-controller and its ancillary
	// resources. This assumes all objects are merged into one byte array. Think of this like a single YAML file
	// containing multiple Kubernetes resources.
	// It assumes the manifest are in their final state, meaning you could kubectl apply them.
	// If template rendering is required (e.g. ytt) this should be done before setting this value.
	MergedManifests []byte
	// Manifests represents the final (serialized) data for installing kapp-controller and its ancillary
	// resources. This assumes each object is contained in its own byte array. Think of this like a many YAML files
	// each containing one Kubernetes resources.
	// It assumes the manifest are in their final state, meaning you could kubectl apply them.
	// If template rendering is required (e.g. ytt) this should be done before setting this value.
	Manifests [][]byte
}

InstallOpts contains information about how to install kapp-controller.

type Manager

type Manager interface {
	// Install installs kapp-controller into the cluster. When successful, it returns the Deployment object that
	// manages the kapp-controller pod.
	Install(opts InstallOpts) (*v1.Deployment, error)
	// Status retrieves the pod status for kapp-controller. It expects to be passed the namespace and name for the
	// kapp-controller Deployment object. If it cannot talk to the cluster, that status is reported. If the
	// pod cannot be resolved, a status of not created is reported. Otherwise, the exact status message is returned.
	Status(ns, name string) string
}

Manager defines the interface for performing kapp operations.

func New

func New(kubeconfigBytes []byte) (Manager, error)

New instantiates a new KappManager.

Jump to

Keyboard shortcuts

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