kubernetes

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: Apache-2.0 Imports: 19 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectKubeConfig added in v0.1.27

func DetectKubeConfig() (config *rest.Config, err error)

DetectKubeConfig detects the kubeconfig for the kubernetes cluster and returns it

func ErrApplyManifest

func ErrApplyManifest(err error) error

func ErrServiceDiscovery added in v0.1.22

func ErrServiceDiscovery(err error) error

ErrServiceDiscovery returns an error of type "ErrServiceDiscovery" along with the passed error

Types

type ApplyOptions

type ApplyOptions struct {
	Namespace string
	Update    bool
	Delete    bool
}

type Client added in v0.1.26

type Client struct {
	RestConfig rest.Config          `json:"restconfig,omitempty"`
	Clientset  kubernetes.Interface `json:"clientset,omitempty"`
}

func New

func New(clientset kubernetes.Interface, cfg rest.Config) (*Client, error)

func (*Client) ApplyManifest added in v0.1.26

func (client *Client) ApplyManifest(contents []byte, recvOptions ApplyOptions) error

ApplyManifest applies, updates or deletes resources as specified in ApplyOptions. The namespace specified in ApplyOptions is used, if no namespace is specified then the namespace from manifest is used. If the the namespace does not exists, it will be created.

func (*Client) GetServiceEndpoint added in v0.1.26

func (client *Client) GetServiceEndpoint(ctx context.Context, svcName, namespace string) (*utils.Endpoint, error)

GetServiceEndpoint returns the endpoint for the given service

Jump to

Keyboard shortcuts

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