kube

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiExtensionsClient added in v0.4.2

type ApiExtensionsClient interface {
	apiextensionsclient.Interface
}

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 NewConfigMaps added in v0.4.2

func NewConfigMaps(clientSet kubernetes.Interface) *ConfigMaps

NewConfigMaps ConfigMaps initialize construction

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 CustomResourceDefinition added in v0.4.2

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

CustomResourceDefinition implements CustomResourceDefinitionInterface

func NewCustomResourceDefinition added in v0.4.2

func NewCustomResourceDefinition(clientSet apiextensionsclient.Interface) *CustomResourceDefinition

NewCustomResourceDefinition returns a clientSet

func (*CustomResourceDefinition) Create added in v0.4.2

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

func (*CustomResourceDefinition) Delete added in v0.4.2

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

func (*CustomResourceDefinition) Get added in v0.4.2

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

func (*CustomResourceDefinition) List added in v0.4.2

List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors.

func (*CustomResourceDefinition) Update added in v0.4.2

Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any.

func (*CustomResourceDefinition) Watch added in v0.4.2

Watch returns a watch.Interface that watches the requested customResourceDefinitions.

type DeployData

type DeployData struct {
	Name           string
	App            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
	DockerImage    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 NewDeployment added in v0.4.2

func NewDeployment(clientSet kubernetes.Interface) *Deployment

NewDeployment ConfigMaps initialize construction

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) List added in v0.4.2

func (d *Deployment) List(namespace string, option metav1.ListOptions) (*extensionsV1beta1.DeploymentList, error)

func (*Deployment) Update

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

type Events added in v0.4.2

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

Events implements EventInterface

func NewEvents added in v0.4.2

func NewEvents(clientSet kubernetes.Interface) *Events

NewEvents returns a clientSet

func (*Events) Create added in v0.4.2

func (e *Events) Create(event *v1beta1.Event) (*v1beta1.Event, error)

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

func (*Events) Delete added in v0.4.2

func (e *Events) Delete(namespace, name string, opts *v1.DeleteOptions) error

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

func (*Events) Get added in v0.4.2

func (e *Events) Get(namespace, name string, opts v1.GetOptions) (*v1beta1.Event, error)

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

func (*Events) List added in v0.4.2

func (e *Events) List(namespace string, opts v1.ListOptions) (*v1beta1.EventList, error)

List takes label and field selectors, and returns the list of Events that match those selectors.

func (*Events) Update added in v0.4.2

func (e *Events) Update(event *v1beta1.Event) (*v1beta1.Event, error)

Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.

func (*Events) Watch added in v0.4.2

func (e *Events) Watch(namespace string, opts v1.ListOptions) (watch.Interface, error)

Watch returns a watch.Interface that watches the requested events.

type Ingress added in v1.0.4

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

func NewIngress added in v1.0.4

func NewIngress(clientSet kubernetes.Interface) *Ingress

func (*Ingress) Create added in v1.0.4

func (i *Ingress) Create(ingress *v1beta1.Ingress) (*v1beta1.Ingress, error)

func (*Ingress) Delete added in v1.0.4

func (i *Ingress) Delete(namespace, name string, opts *v1.DeleteOptions) error

func (*Ingress) Get added in v1.0.4

func (i *Ingress) Get(namespace, name string, opts v1.GetOptions) (*v1beta1.Ingress, error)

func (*Ingress) List added in v1.0.4

func (i *Ingress) List(namespace string, opts v1.ListOptions) (*v1beta1.IngressList, error)

func (*Ingress) Update added in v1.0.4

func (i *Ingress) Update(ingress *v1beta1.Ingress) (*v1beta1.Ingress, error)

func (*Ingress) Watch added in v1.0.4

func (i *Ingress) Watch(namespace string, opts v1.ListOptions) (watch.Interface, error)

type Pod

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

func NewPod

func NewPod(clientSet kubernetes.Interface) *Pod

NewPod ConfigMaps initialize construction

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

NewReplicaSet ConfigMaps initialize construction

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

NewReplicationController ConfigMaps initialize construction

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

NewService ConfigMaps initialize construction

func (*Service) Create

func (s *Service) Create(name, app, 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)

func (*Service) List added in v0.4.2

func (s *Service) List(namespace string, option metav1.ListOptions) (*corev1.ServiceList, error)

type Token

type Token string

Jump to

Keyboard shortcuts

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