client

package
v0.0.0-...-c938c57 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*kubernetes.Clientset
	// contains filtered or unexported fields
}

Client is a wrapper type around the kubernetes client.

func New

func New() (*Client, error)

New returns a pointer to a new instance of client.

func (*Client) Apply

func (c *Client) Apply(g *SpecGroup) error

Apply will create or update all resources in the spec group.

func (*Client) Deployments

func (c *Client) Deployments() typedappsv1beta1.DeploymentInterface

Deployments is a shortcut to the deployment client which uses the configured namespace.

func (*Client) IsMinikube

func (c *Client) IsMinikube() (bool, error)

IsMinikube checks if the configured cluster is running on minikube. Although not ideal, some logic must be changed when interacting with a minikube cluster. ex: LoadBalancer services never get an externalIP.

func (*Client) Namespace

func (c *Client) Namespace(namespace string) *Client

Namespace copies the client and changes the namespace of the

func (*Client) Nodes

func (c *Client) Nodes() typedcorev1.NodeInterface

Nodes is a shortcut to the node client.

func (*Client) Services

func (c *Client) Services() typedcorev1.ServiceInterface

Services is a shortcut to the service client which uses the configured namespace.

type SpecGroup

type SpecGroup struct {
	Deployments []*appsv1beta1.Deployment
	Services    []*apicorev1.Service
}

SpecGroup is a collection of specs that are logically linked.

Jump to

Keyboard shortcuts

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