k8sutil

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2017 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sutil

type K8sutil struct {
	Config     *rest.Config
	TprClient  *rest.RESTClient
	Kclient    KubeInterface
	MasterHost string
}

K8sutil defines the kube object

func New

func New(kubeCfgFile, masterHost string) (*K8sutil, error)

New creates a new instance of k8sutil

func (*K8sutil) CreateKongAdminService

func (k *K8sutil) CreateKongAdminService(namespace string) error

CreateKongAdminService creates the kong proxy service

func (*K8sutil) CreateKongDeployment

func (k *K8sutil) CreateKongDeployment(baseImage string, replicas *int32, namespace string) error

CreateKongDeployment creates the kong deployment

func (*K8sutil) CreateKongProxyService

func (k *K8sutil) CreateKongProxyService(namespace string) error

CreateKongProxyService creates the kong proxy service

func (*K8sutil) CreateKubernetesThirdPartyResource

func (k *K8sutil) CreateKubernetesThirdPartyResource() error

CreateKubernetesThirdPartyResource checks if Kong TPR exists. If not, create

func (*K8sutil) DeleteAdminService

func (k *K8sutil) DeleteAdminService(namespace string) error

DeleteAdminService creates the kong admin service

func (*K8sutil) DeleteKongDeployment

func (k *K8sutil) DeleteKongDeployment(namespace string) error

DeleteKongDeployment deletes kong deployment

func (*K8sutil) DeleteProxyService

func (k *K8sutil) DeleteProxyService(namespace string) error

DeleteProxyService creates the kong proxy service

func (*K8sutil) GetKongClusters

func (k *K8sutil) GetKongClusters() ([]tpr.KongCluster, error)

GetKongClusters returns a list of custom clusters defined

func (*K8sutil) MonitorKongEvents

func (k *K8sutil) MonitorKongEvents(stopchan chan struct{}) (<-chan *tpr.KongCluster, <-chan error)

MonitorKongEvents watches for new or removed clusters

type KubeInterface

type KubeInterface interface {
	Services(namespace string) coreType.ServiceInterface
	ThirdPartyResources() extensionsType.ThirdPartyResourceInterface
	Deployments(namespace string) extensionsType.DeploymentInterface
	ReplicaSets(namespace string) extensionsType.ReplicaSetInterface
	Secrets(namespace string) coreType.SecretInterface
}

KubeInterface abstracts the kubernetes client

Jump to

Keyboard shortcuts

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