kube

package
v0.0.0-...-127562d Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(cfg Config) (*Client, error)

New creates a kubernetes client

func (*Client) CreateConfigMap

func (c *Client) CreateConfigMap(namespace string, cm *corev1.ConfigMap) (*corev1.ConfigMap, error)

func (*Client) CreateIngress

func (c *Client) CreateIngress(namespace string, ing *extensionsv1.Ingress) (*extensionsv1.Ingress, error)

func (*Client) CreateJob

func (c *Client) CreateJob(namespace string, jobData *batchv1.Job) (*batchv1.Job, error)

func (*Client) CreatePod

func (c *Client) CreatePod(namespace string, pod *corev1.Pod) (*corev1.Pod, error)

Create pod

func (*Client) CreateSecret

func (c *Client) CreateSecret(namespace string, secret *corev1.Secret) (*corev1.Secret, error)

CreateSecret Create secret

func (*Client) CreateService

func (c *Client) CreateService(namespace string, svc *corev1.Service) (*corev1.Service, error)

func (*Client) DeleteConfigMap

func (c *Client) DeleteConfigMap(namespace, name string) error

func (*Client) DeleteIngress

func (c *Client) DeleteIngress(namespace, name string) error

func (*Client) DeleteSecret

func (c *Client) DeleteSecret(namespace, name string) error

DeleteSecret Delete secret

func (*Client) DeleteService

func (c *Client) DeleteService(namespace, name string) error

func (*Client) GetClusterRoles

func (c *Client) GetClusterRoles() (*rbacv1.ClusterRoleList, error)

func (*Client) GetConfigMap

func (c *Client) GetConfigMap(namespace, name string) (*corev1.ConfigMap, error)

GetConfigMap get cms

func (*Client) GetConfigMaps

func (c *Client) GetConfigMaps(namespace string) (*corev1.ConfigMapList, error)

func (*Client) GetCronJobs

func (c *Client) GetCronJobs(namespace string) (*v1beta1.CronJobList, error)

func (*Client) GetDaemonSets

func (c *Client) GetDaemonSets(namespace string) (*v1.DaemonSetList, error)

func (*Client) GetDeployment

func (c *Client) GetDeployment(namespace, name string) (*v1.Deployment, error)

GetDeployment get deployments

func (*Client) GetDeployments

func (c *Client) GetDeployments(namespace string) ([]v1.Deployment, error)

func (*Client) GetEndpoints

func (c *Client) GetEndpoints(namespace string) (*corev1.EndpointsList, error)

func (*Client) GetEvent

func (c *Client) GetEvent(namespace, name string) (*corev1.Event, error)

func (*Client) GetEvents

func (c *Client) GetEvents(namespace string) (*corev1.EventList, error)

func (*Client) GetIngress

func (c *Client) GetIngress(namespace, name string) (*extensionsv1.Ingress, error)

GetIngress return ingress

func (*Client) GetIngresses

func (c *Client) GetIngresses(namespace string) (*extensionsv1.IngressList, error)

GetIngresses return ingress list

func (*Client) GetJob

func (c *Client) GetJob(namespace, name string) (*batchv1.Job, error)

func (*Client) GetJobs

func (c *Client) GetJobs(namespace string) (*batchv1.JobList, error)

func (*Client) GetMetrics

func (c *Client) GetMetrics() (*mv1beta1.NodeMetricsList, error)

GetMetrics get cluster metrics.

func (*Client) GetNamespaces

func (c *Client) GetNamespaces() (*corev1.NamespaceList, error)

GetNamespaces get namespaces

func (*Client) GetNodes

func (c *Client) GetNodes() (*corev1.NodeList, error)

GetNodes get nodes

func (*Client) GetPVCs

func (c *Client) GetPVCs(namespace string) (*corev1.PersistentVolumeClaimList, error)

GetPVCs Get PVC list

func (*Client) GetPVs

func (c *Client) GetPVs() (*corev1.PersistentVolumeList, error)

GetPVs Get PV list

func (*Client) GetPod

func (c *Client) GetPod(namespace, name string) (*corev1.Pod, error)

func (*Client) GetPods

func (c *Client) GetPods(namespace string) (*corev1.PodList, error)

GetPods get pods

func (*Client) GetReplicationControllers

func (c *Client) GetReplicationControllers(namespace string) ([]corev1.ReplicationController, error)

func (*Client) GetRoles

func (c *Client) GetRoles(namespace string) (*rbacv1.RoleList, error)

func (*Client) GetSecret

func (c *Client) GetSecret(namespace, name string) (*corev1.Secret, error)

func (*Client) GetSecrets

func (c *Client) GetSecrets(namespace string) (*corev1.SecretList, error)

GetSecrets get secrets

func (*Client) GetService

func (c *Client) GetService(namespace, name string) (*corev1.Service, error)

func (*Client) GetServiceAccount

func (c *Client) GetServiceAccount(namespace, name string) (*corev1.ServiceAccount, error)

GetServiceAccount get serviceAccount by name

func (*Client) GetServiceAccounts

func (c *Client) GetServiceAccounts(namespace string) (*corev1.ServiceAccountList, error)

GetServiceAccounts get serviceAccounts

func (*Client) GetServices

func (c *Client) GetServices(namespace string) (*corev1.ServiceList, error)

GetServices get services

func (*Client) GetStatefulSets

func (c *Client) GetStatefulSets(namespace string) (*v1.StatefulSetList, error)

func (*Client) GetVersion

func (c *Client) GetVersion() (string, string, error)

Cluster resource GetVersion get server version

func (*Client) PatchConfigMap

func (c *Client) PatchConfigMap(namespace, name string, data []byte) (*corev1.ConfigMap, error)

func (*Client) PatchSecret

func (c *Client) PatchSecret(namespace, name string, data []byte) (*corev1.Secret, error)

func (*Client) UpdateConfigMap

func (c *Client) UpdateConfigMap(namespace string, cm *corev1.ConfigMap) (*corev1.ConfigMap, error)

func (*Client) UpdateSecret

func (c *Client) UpdateSecret(namespace string, secret *corev1.Secret) (*corev1.Secret, error)

UpdateSecret Update secret

type Config

type Config struct {
	Kubeconfig string
}

Jump to

Keyboard shortcuts

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