kubernetes

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResourceBody

func GetResourceBody(resource string, appID int64, namespace string, cluster string, resourceType string, params string) []byte

GetResourceBody is the interface to get k8s resource from wayne http API

Types

type ConfigMap

type ConfigMap struct {
	// metav1.TypeMeta `json:",inline"`
	ObjectMeta ObjectMeta        `json:"objectMeta"`
	Data       map[string]string `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"`
}

ConfigMap : via k8s object

type ConfigmapBody

type ConfigmapBody struct {
	Data struct {
		ConfigMap
	} `json:"data"`
}

ConfigmapBody is wayne-kubernetes http API configmap response body

type ContainerStatus

type ContainerStatus struct {
	Name         string `json:"name,omitempty"`
	RestartCount int32  `json:"restartCount"`
}

ContainerStatus : via k8s object

type DeploymentBody

type DeploymentBody struct {
	Data struct {
		v1beta1.Deployment
	} `json:"data"`
}

DeploymentBody is wayne-kubernetes http API deployment response body

type IngressBody

type IngressBody struct {
	Data struct {
		extensionsv1beta1.Ingress
	} `json:"data"`
}

IngressBody is wayne-kubernetes http API ingress response body

type ObjectMeta

type ObjectMeta struct {
	// Name is unique within a namespace. Name is primarily intended for creation
	// idempotence and configuration definition.
	Name string `json:"name,omitempty"`

	// Namespace defines the space within which name must be unique. An empty namespace is
	// equivalent to the "default" namespace, but "default" is the canonical representation.
	// Not all objects are required to be scoped to a namespace - the value of this field for
	// those objects will be empty.
	Namespace string `json:"namespace,omitempty"`

	// Labels are key value pairs that may be used to scope and select individual resources.
	// Label keys are of the form:
	//     label-key ::= prefixed-name | name
	//     prefixed-name ::= prefix '/' name
	//     prefix ::= DNS_SUBDOMAIN
	//     name ::= DNS_LABEL
	// The prefix is optional.  If the prefix is not specified, the key is assumed to be private
	// to the user.  Other system components that wish to use labels must specify a prefix.
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations are unstructured key value data stored with a resource that may be set by
	// external tooling. They are not queryable and should be preserved when modifying
	// objects.  Annotation keys have the same formatting restrictions as Label keys. See the
	// comments on Labels for details.
	Annotations map[string]string `json:"annotations,omitempty"`

	// CreationTimestamp is a timestamp representing the server time when this object was
	// created. It is not guaranteed to be set in happens-before order across separate operations.
	// Clients may not set this value. It is represented in RFC3339 form and is in UTC.
	CreationTimestamp metaV1.Time `json:"creationTimestamp,omitempty"`
}

ObjectMeta is metadata about an instance of a resource.

type Pod

type Pod struct {
	Name            string            `json:"name,omitempty"`
	Namespace       string            `json:"namespace,omitempty"`
	ContainerStatus []ContainerStatus `json:"containerStatus,omitempty"`
	State           string            `json:"state,omitempty"`
	PodIP           string            `json:"podIp,omitempty"`
	NodeName        string            `json:"nodeName,omitempty"`
	StartTime       time.Time         `json:"startTime,omitempty"`
	Labels          map[string]string `json:"labels,omitempty"`
}

Pod : via k8s object

type PodBody

type PodBody struct {
	Data *Pod `json:"data"`
}

PodBody is wayne-kubernetes http API pod response body

func GetPod

func GetPod(appID int64, namespace string, cluster string, pod string) (obj PodBody)

GetPod is the interface to get k8s pod from wayne http API

type PodsBody

type PodsBody struct {
	Data []*Pod `json:"data"`
}

PodsBody is wayne-kubernetes http API pods response body

func ListPods

func ListPods(appID int64, namespace string, cluster string, params string) (obj PodsBody)

ListPods is the interface to list k8s pods from wayne http API

type ServiceBody

type ServiceBody struct {
	Data struct {
		v1.Service
	} `json:"data"`
}

ServiceBody is wayne-kubernetes http API service response body

Jump to

Keyboard shortcuts

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