kube

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSet

type ClientSet interface {
	kubernetes.Interface
}

type Config

type Config struct {
	// contains filtered or unexported fields
}

type ConfigMaps

type ConfigMaps struct {
	// contains filtered or unexported fields
}

func (*ConfigMaps) Create

func (c *ConfigMaps) Create(name, namespace string, data map[string]string) (*coreV1.ConfigMap, error)

func (*ConfigMaps) Delete

func (c *ConfigMaps) Delete(name, namespace string) error

func (*ConfigMaps) Get

func (c *ConfigMaps) Get(name, namespace string) (config *coreV1.ConfigMap, err error)

func (*ConfigMaps) Update

func (c *ConfigMaps) Update(name, namespace string, configMap *coreV1.ConfigMap) (*coreV1.ConfigMap, error)

type DeployData

type DeployData struct {
	Name           string
	NameSpace      string
	Replicas       int32
	Labels         map[string]string
	Image          string
	Ports          []int
	Envs           map[string]string
	HostPathVolume map[string]string
	NodeSelector   map[string]string
	NodeName       string
}

type DeployRequest

type DeployRequest struct {
	App            string
	Namespace      string
	Version        string
	Tag            string
	DockerRegistry string
	Env            []corev1.EnvVar
	Labels         map[string]string
	Ports          []corev1.ContainerPort
	Replicas       *int32
	NodeSelector   map[string]string
	ReadinessProbe *corev1.Probe
	LivenessProbe  *corev1.Probe
	Volumes        []corev1.Volume
	VolumeMounts   []corev1.VolumeMount
}

type Deployment

type Deployment struct {
	// contains filtered or unexported fields
}

func (*Deployment) Delete

func (d *Deployment) Delete(name, namespace string, option *metav1.DeleteOptions) error

func (*Deployment) Deploy

func (d *Deployment) Deploy(request *DeployRequest) (*extensionsV1beta1.Deployment, error)

@Title Deploy @Description deploy application @Param pipeline @Return error

func (*Deployment) DeployNode

func (d *Deployment) DeployNode(deployData *DeployData) (string, error)

func (*Deployment) ExtensionsV1beta1Deploy

func (d *Deployment) ExtensionsV1beta1Deploy(app, project, imageTag, dockerRegistry string, env interface{}, labels map[string]string, ports interface{}, replicas int32, force bool, healthEndPoint, nodeSelector string) (string, error)

func (*Deployment) Get

func (d *Deployment) Get(name, namespace string, option metav1.GetOptions) (*extensionsV1beta1.Deployment, error)

func (*Deployment) Update

func (d *Deployment) Update(deployment *extensionsV1beta1.Deployment) error

type Pod

type Pod struct {
	// contains filtered or unexported fields
}

func NewPod

func NewPod(clientSet kubernetes.Interface) *Pod

func (*Pod) Create

func (p *Pod) Create(pod *corev1.Pod) (*corev1.Pod, error)

func (*Pod) GetPodList

func (p *Pod) GetPodList(namespace string, opts metav1.ListOptions) (*corev1.PodList, error)

func (*Pod) GetPodLogs

func (p *Pod) GetPodLogs(namespace, name string, opts *corev1.PodLogOptions) (*restclient.Request, error)

func (*Pod) GetPods

func (p *Pod) GetPods(namespace, name string, opts metav1.GetOptions) (*corev1.Pod, error)

func (*Pod) Watch

func (p *Pod) Watch(listOptions metav1.ListOptions, namespace string) (watch.Interface, error)

type ReplicaSet

type ReplicaSet struct {
	// contains filtered or unexported fields
}

func NewReplicaSet

func NewReplicaSet(clientSet kubernetes.Interface) *ReplicaSet

func (*ReplicaSet) Create

func (rs *ReplicaSet) Create(replica *v1.ReplicaSet) (*v1.ReplicaSet, error)

func (*ReplicaSet) Delete

func (rs *ReplicaSet) Delete(name, namespace string, option *metav1.DeleteOptions) error

func (*ReplicaSet) List

func (rs *ReplicaSet) List(name, namespace string, option metav1.ListOptions) (*v1.ReplicaSetList, error)

type ReplicationController

type ReplicationController struct {
	// contains filtered or unexported fields
}

func NewReplicationController

func NewReplicationController(clientSet kubernetes.Interface) *ReplicationController

func (*ReplicationController) Create

func (rc *ReplicationController) Create(name, namespace string, replicas int32) (*corev1.ReplicationController, error)

func (*ReplicationController) Delete

func (rc *ReplicationController) Delete(name, namespace string, option *metav1.DeleteOptions) (err error)

func (*ReplicationController) Watch

func (rc *ReplicationController) Watch(name, namespace string, completedHandler func() error) error

type RestConfig

type RestConfig struct {
	*rest.Config
}

type Secret

type Secret struct {
	Interface v1.SecretInterface
	// contains filtered or unexported fields
}

func NewSecret

func NewSecret(clientSet kubernetes.Interface) *Secret

Create new instance of type Secret

func (*Secret) Create

func (s *Secret) Create(username, password, token, name, namespace string) error

Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any.

func (*Secret) Delete

func (s *Secret) Delete(name, namespace string) error

Delete takes name of the secret and deletes it. Returns an error if one occurs.

func (*Secret) Get

func (s *Secret) Get(name, namespace string) (*corev1.Secret, error)

Get takes name of the secret, and returns the corresponding secret object, and an error if there is any.

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(clientSet kubernetes.Interface) *Service

func (*Service) Create

func (s *Service) Create(name, namespace string, ports interface{}) error

func (*Service) CreateService

func (s *Service) CreateService(name, namespace string, ports []corev1.ServicePort) error

func (*Service) Delete

func (s *Service) Delete(name, namespace string) error

func (*Service) Get

func (s *Service) Get(name, namespace string) (*corev1.Service, error)

type Token

type Token string

Jump to

Keyboard shortcuts

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