global

package
v0.0.0-...-295ed5c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//Kubeconfig - Kubernetes configuration file path
	Kubeconfig = flag.String("kubeconfig", "/root/.kube/config", "KubeConfig Path")
)

Functions

func DeleteDeployment

func DeleteDeployment(ns string, name string) error

DeleteDeployment - describe a deployment

func DeletePod

func DeletePod(ns string, name string) error

DeletePod - describe a pod

func LoadClient

func LoadClient(kubeconfigPath *string) (*k8s.Client, error)

LoadClient - Create kubernetes connexion client

Types

type ComponentStatus

type ComponentStatus struct {
	Name   string
	Status string
}

ComponentStatus - kubectl get cs

type ComponentStatusList

type ComponentStatusList []ComponentStatus

ComponentStatusList - List of cs

func ListComponentStatus

func ListComponentStatus() ComponentStatusList

ListComponentStatus - Return a cs list

type Configmap

type Configmap struct {
	Name      string
	Namespace string
	Created   string
}

Configmap - kubectl get configmap

type ConfigmapList

type ConfigmapList []Configmap

ConfigmapList - list of configmaps

func ListConfigmaps

func ListConfigmaps() ConfigmapList

ListConfigmaps - return a cm list

type Deployment

type Deployment struct {
	Status     string
	Name       string
	Namespace  string
	PodWanted  int32
	PodRunning int32
	Image      string
}

Deployment - kubectl get deployments

func GetDeployment

func GetDeployment(ns string, name string) Deployment

GetDeployment - describe a deployment

type DeploymentList

type DeploymentList []Deployment

DeploymentList - list of deployments

func ListDeployments

func ListDeployments() DeploymentList

ListDeployments - return a list of deploys

type Ingress

type Ingress struct {
	Name      string
	Namespace string
	Host      string
}

Ingress - kubectl get ingress

type IngressList

type IngressList []Ingress

IngressList - list of ingress

func ListIngresses

func ListIngresses() (IngressList, error)

ListIngresses - return a list of ingress

type Node

type Node struct {
	Status      string
	Name        string
	Labels      map[string]string
	OS          string
	Schedulable bool
}

Node - kubectl get node

func GetNode

func GetNode(name string) (Node, error)

GetNode - describe a node

type NodeList

type NodeList []Node

NodeList - list of node

func ListNodes

func ListNodes() (NodeList, error)

ListNodes - return a list of nodes

type PV

type PV struct {
	Name   string
	Size   string
	Status string
	Scope  string
}

PV - kubectl get pv

type PVC

type PVC struct {
	Name      string
	Namespace string
	Size      string
	Status    string
	Scope     string
}

PVC - kubectl get pvc

type PVClist

type PVClist []PVC

PVClist - list of pvc

func ListPVC

func ListPVC() PVClist

ListPVC - return pvc list

type PVlist

type PVlist []PV

PVlist - list of pv

func ListPV

func ListPV() PVlist

ListPV - return pv list

type Pod

type Pod struct {
	Status    string
	Name      string
	Namespace string
	Worker    string
	IP        string
	Image     string
}

Pod - kubectl get pod

func GetPod

func GetPod(ns string, name string) (Pod, error)

GetPod - describe a pod

type PodList

type PodList []Pod

PodList - list of pod

func ListPods

func ListPods() (PodList, error)

ListPods - return a list of pod

type Secret

type Secret struct {
	Name      string
	Namespace string
	Created   string
}

Secret - kubectl get secret

type SecretList

type SecretList []Secret

SecretList - list of secret

func ListSecrets

func ListSecrets() SecretList

ListSecrets - return a list of secret

type Service

type Service struct {
	Name      string
	Namespace string
	Type      string
	IP        string
	Port      string
	Label     string
}

Service - kubectl get service

func GetService

func GetService(ns string, name string) (Service, error)

GetService - describe a service

type ServiceList

type ServiceList []Service

ServiceList - list of service

func ListServices

func ListServices() (ServiceList, error)

ListServices - return a list of service

Jump to

Keyboard shortcuts

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