k8s

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cluster *lang.Cluster, cfg config.Plugins) (plugin.ClusterPlugin, error)

New creates new instance of the Kubernetes cluster plugin for specified Cluster and plugins config

Types

type ClusterConfig

type ClusterConfig struct {
	Namespace  string      `yaml:",omitempty"`
	Local      bool        `yaml:",omitempty"`
	Context    string      `yaml:",omitempty"`
	KubeConfig interface{} `yaml:",omitempty"` // it's just a kubeconfig, we don't need to parse it
}

ClusterConfig represents Kubernetes cluster plugin configuration

type Plugin

type Plugin struct {
	Cluster         *lang.Cluster
	RestConfig      *rest.Config
	ClientConfig    clientcmd.ClientConfig
	Namespace       string
	ExternalAddress string
	// contains filtered or unexported fields
}

Plugin represents Kubernetes cluster plugin

func (*Plugin) Cleanup

func (p *Plugin) Cleanup() error

Cleanup intended to run cleanup operations for plugin, but it's not used in Kubernetes cluster plugin

func (*Plugin) EndpointsForManifests added in v0.1.12

func (p *Plugin) EndpointsForManifests(deployName, targetManifest string, eventLog *event.Log) (map[string]string, error)

EndpointsForManifests returns endpoints for specified manifest

func (*Plugin) EnsureNamespace

func (p *Plugin) EnsureNamespace(client kubernetes.Interface, namespace string) error

EnsureNamespace ensures configured Kubernetes namespace

func (*Plugin) Init

func (p *Plugin) Init() error

Init parses Kubernetes cluster config and retrieves external address for Kubernetes cluster

func (*Plugin) NewClient

func (p *Plugin) NewClient() (kubernetes.Interface, error)

NewClient returns new instance of the Kubernetes client created from the cached in the plugin cluster config

func (*Plugin) NewHelmKube added in v0.1.12

func (p *Plugin) NewHelmKube(deployName string, eventLog *event.Log) *kube.Client

NewHelmKube returns new instance of the Helm Kube client

func (*Plugin) ResourcesForManifest added in v0.1.12

func (p *Plugin) ResourcesForManifest(deployName, targetManifest string, eventLog *event.Log) (plugin.Resources, error)

ResourcesForManifest returns resources for specified manifest

func (*Plugin) Validate

func (p *Plugin) Validate() error

Validate checks Kubernetes cluster by connecting to it and ensuring configured namespace

Jump to

Keyboard shortcuts

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