kubernetes

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecOptions

type ExecOptions struct {
	Container         string
	Command           []string
	Stdin             io.Reader
	Stdout, Stderr    io.Writer
	TTY               bool
	TerminalSizeQueue remotecommand.TerminalSizeQueue
}

type Kube

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

Kube is struct for kubernetes client

func (*Kube) CreateConfigMap

func (k *Kube) CreateConfigMap(cm *api_core.ConfigMap) (*api_core.ConfigMap, error)

CreateConfigMap creates config map

func (*Kube) CreateDeployment

func (k *Kube) CreateDeployment(depl *api_apps.Deployment) (*api_apps.Deployment, error)

CreateDeployment creates deployment

func (*Kube) CreateEndpoint

func (k *Kube) CreateEndpoint(endpoint *api_core.Endpoints) (*api_core.Endpoints, error)

CreateEndpoint creates endpoint

func (*Kube) CreateIngress

func (k *Kube) CreateIngress(ingress *api_extensions.Ingress) (*api_extensions.Ingress, error)

CreateIngress creates ingress

func (*Kube) CreateLimitRange added in v1.0.7

func (k *Kube) CreateLimitRange(nsName string) error

CreateNamespaceQuota creates namespace quota

func (*Kube) CreateNamespace

func (k *Kube) CreateNamespace(ns *api_core.Namespace) (*api_core.Namespace, error)

CreateNamespace creates namespace

func (*Kube) CreateNamespaceQuota

func (k *Kube) CreateNamespaceQuota(nsName string, quota *api_core.ResourceQuota) (*api_core.ResourceQuota, error)

CreateNamespaceQuota creates namespace quota

func (*Kube) CreatePersistentVolumeClaim

func (k *Kube) CreatePersistentVolumeClaim(pvc *api_core.PersistentVolumeClaim) (*api_core.PersistentVolumeClaim, error)

CreatePersistentVolumeClaim creates pvc

func (*Kube) CreateSecret

func (k *Kube) CreateSecret(secret *api_core.Secret) (*api_core.Secret, error)

CreateSecret creates secret

func (*Kube) CreateService

func (k *Kube) CreateService(svc *api_core.Service) (*api_core.Service, error)

CreateService creates service

func (*Kube) DeleteConfigMap

func (k *Kube) DeleteConfigMap(namespace, cm string) error

DeleteConfigMap deletes config map

func (*Kube) DeleteDeployment

func (k *Kube) DeleteDeployment(ns string, deployName string) error

DeleteDeployment deletes deployment

func (*Kube) DeleteDeploymentSolution added in v1.0.5

func (k *Kube) DeleteDeploymentSolution(ns string, solutionID string) error

DeleteDeployment deletes deployments

func (*Kube) DeleteEndpoint

func (k *Kube) DeleteEndpoint(namespace, endpoint string) error

DeleteEndpoint deletes endpoint

func (*Kube) DeleteIngress

func (k *Kube) DeleteIngress(ns string, ingress string) error

DeleteIngress deletes ingress

func (*Kube) DeleteNamespace

func (k *Kube) DeleteNamespace(nsName string) error

DeleteNamespace deletes namespace

func (*Kube) DeletePersistentVolumeClaim

func (k *Kube) DeletePersistentVolumeClaim(ns string, pvc string) error

DeletePersistentVolumeClaim deletes pvc

func (*Kube) DeletePod

func (k *Kube) DeletePod(ns string, po string) error

DeletePod deletes pod

func (*Kube) DeleteSecret

func (k *Kube) DeleteSecret(nsName string, secretName string) error

DeleteSecret deletes secret

func (*Kube) DeleteService

func (k *Kube) DeleteService(namespace, serviceName string) error

DeleteService deletes service

func (*Kube) Exec

func (k *Kube) Exec(ns string, po string, opt *ExecOptions) error

func (*Kube) GetConfigMap

func (k *Kube) GetConfigMap(namespace, cm string) (*api_core.ConfigMap, error)

GetConfigMap returns config map

func (*Kube) GetConfigMapList

func (k *Kube) GetConfigMapList(namespace string) (*api_core.ConfigMapList, error)

GetConfigMapList returns config maps list

func (*Kube) GetDeployment

func (k *Kube) GetDeployment(ns string, deploy string) (*api_apps.Deployment, error)

GetDeployment returns deployment

func (*Kube) GetDeploymentList

func (k *Kube) GetDeploymentList(ns string, owner string) (*api_apps.DeploymentList, error)

GetDeploymentList returns deployments list

func (*Kube) GetDeploymentSolutionList added in v1.0.5

func (k *Kube) GetDeploymentSolutionList(ns string, solutionID string) (*api_apps.DeploymentList, error)

func (*Kube) GetDockerSecretList added in v1.0.5

func (k *Kube) GetDockerSecretList(nsName string) (*api_core.SecretList, error)

GetDockerSecretList returns Docker secrets list

func (*Kube) GetEndpoint

func (k *Kube) GetEndpoint(namespace, endpoint string) (*api_core.Endpoints, error)

GetEndpoint returns endpoint

func (*Kube) GetEndpointList

func (k *Kube) GetEndpointList(namespace string) (*api_core.EndpointsList, error)

GetEndpointList returns endpoints list

func (*Kube) GetIngress

func (k *Kube) GetIngress(ns string, ingress string) (*api_extensions.Ingress, error)

GetIngress returns ingress

func (*Kube) GetIngressList

func (k *Kube) GetIngressList(ns string) (*api_extensions.IngressList, error)

GetIngressList returns ingresses list

func (*Kube) GetNamespace

func (k *Kube) GetNamespace(nsName string) (*api_core.Namespace, error)

GetNamespace returns namespace

func (*Kube) GetNamespaceList added in v1.0.5

func (k *Kube) GetNamespaceList(owner string) (*api_core.NamespaceList, error)

GetNamespaceList returns namespaces list

func (*Kube) GetNamespaceQuota

func (k *Kube) GetNamespaceQuota(ns string) (*api_core.ResourceQuota, error)

GetNamespaceQuota returns namespace (quota)

func (*Kube) GetNamespaceQuotaList

func (k *Kube) GetNamespaceQuotaList(owner string) (*api_core.ResourceQuotaList, error)

GetNamespaceQuotaList returns namespaces (quotas) list

func (*Kube) GetPersistentVolumeClaim

func (k *Kube) GetPersistentVolumeClaim(ns string, pvcName string) (*api_core.PersistentVolumeClaim, error)

GetPersistentVolumeClaim returns pvc

func (*Kube) GetPersistentVolumeClaimsList

func (k *Kube) GetPersistentVolumeClaimsList(ns string) (interface{}, error)

GetPersistentVolumeClaimsList returns pvc list

func (*Kube) GetPod

func (k *Kube) GetPod(ns string, po string) (interface{}, error)

GetPod returns pod

func (*Kube) GetPodList

func (k *Kube) GetPodList(ns string, owner string) (interface{}, error)

GetPodList returns pods list

func (*Kube) GetPodListByDeployment added in v1.0.5

func (k *Kube) GetPodListByDeployment(ns string, deploy string) (interface{}, error)

func (*Kube) GetPodLogs

func (k *Kube) GetPodLogs(ns string, po string, opt *LogOptions) (io.ReadCloser, error)

GetPodLogs attaches client to pod log

func (*Kube) GetSecret

func (k *Kube) GetSecret(nsName string, secretName string) (*api_core.Secret, error)

GetSecret returns secret

func (*Kube) GetService

func (k *Kube) GetService(namespace, serviceName string) (*api_core.Service, error)

GetService returns service

func (*Kube) GetServiceList

func (k *Kube) GetServiceList(nsname string) (*api_core.ServiceList, error)

GetServiceList returns services list

func (*Kube) GetServiceSolutionList added in v1.0.5

func (k *Kube) GetServiceSolutionList(ns string, solutionID string) (*api_core.ServiceList, error)

func (*Kube) GetStorageClassesList added in v1.0.6

func (k *Kube) GetStorageClassesList() (*api_storage.StorageClassList, error)

func (*Kube) GetTLSSecretList added in v1.0.5

func (k *Kube) GetTLSSecretList(nsName string) (*api_core.SecretList, error)

GetTLSSecretList returns TLS secrets list

func (*Kube) RegisterClient

func (k *Kube) RegisterClient(cfgpath string) error

RegisterClient creates kubernetes client

func (*Kube) UpdateConfigMap

func (k *Kube) UpdateConfigMap(cm *api_core.ConfigMap) (*api_core.ConfigMap, error)

UpdateConfigMap updates config map

func (*Kube) UpdateDeployment

func (k *Kube) UpdateDeployment(depl *api_apps.Deployment) (*api_apps.Deployment, error)

UpdateDeployment updates deployment

func (*Kube) UpdateEndpoint

func (k *Kube) UpdateEndpoint(endpoint *api_core.Endpoints) (*api_core.Endpoints, error)

UpdateEndpoint updates endpoint

func (*Kube) UpdateIngress

func (k *Kube) UpdateIngress(ingress *api_extensions.Ingress) (*api_extensions.Ingress, error)

UpdateIngress updates ingress

func (*Kube) UpdateNamespaceQuota

func (k *Kube) UpdateNamespaceQuota(nsName string, quota *api_core.ResourceQuota) (*api_core.ResourceQuota, error)

UpdateNamespaceQuota updates namespace quota

func (*Kube) UpdatePersistentVolumeClaim

func (k *Kube) UpdatePersistentVolumeClaim(pvc *api_core.PersistentVolumeClaim) (*api_core.PersistentVolumeClaim, error)

UpdatePersistentVolumeClaim updates pvc

func (*Kube) UpdateSecret

func (k *Kube) UpdateSecret(secret *api_core.Secret) (*api_core.Secret, error)

UpdateSecret updates secret

func (*Kube) UpdateService

func (k *Kube) UpdateService(service *api_core.Service) (*api_core.Service, error)

UpdateService updates service

type LogOptions

type LogOptions struct {
	Container string
	Tail      int64
	Follow    bool
	Previous  bool
}

TODO: Imp struct to GetPodLogs func

Jump to

Keyboard shortcuts

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