kubectl

package
v2.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Walk

func Walk(d interface{}, match MatchFn, replace ReplaceFn)

Walk walks over an interface and replaces keys that match the match function with the replace function

Types

type DeployConfig

type DeployConfig struct {
	KubeClient *kubernetes.Clientset // This is not used yet, however the plan is to use it instead of calling kubectl via cmd
	CmdPath    string
	Context    string
	Namespace  string
	Manifests  []string
	Log        log.Logger
}

DeployConfig holds the necessary information for kubectl deployment

func New

func New(kubectl *kubernetes.Clientset, deployConfig *v1.DeploymentConfig, log log.Logger) (*DeployConfig, error)

New creates a new deploy config for kubectl

func (*DeployConfig) Delete

func (d *DeployConfig) Delete() error

Delete deletes all matched manifests from kubernetes

func (*DeployConfig) Deploy

func (d *DeployConfig) Deploy(generatedConfig *generated.Config, forceDeploy bool) error

Deploy deploys all specified manifests via kubectl apply and adds to the specified image names the corresponding tags

func (*DeployConfig) Status

func (d *DeployConfig) Status() ([][]string, error)

Status prints the status of all matched manifests from kubernetes

type Manifest

type Manifest map[interface{}]interface{}

Manifest is the type that holds the data of a single kubernetes manifest

type MatchFn

type MatchFn func(key, value string) bool

MatchFn defines the match function

type ReplaceFn

type ReplaceFn func(value string) string

ReplaceFn defines the replace function

Jump to

Keyboard shortcuts

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