k8s

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package k8s defines types needed

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIClient

func NewAPIClient(tlscfg *tls.Config, reqTimeout time.Duration) (*http.Client, error)

func NewAPIRequest

func NewAPIRequest(ctx context.Context, token string, reqURL string) (*http.Request, error)

Types

type Node

type Node struct {
	Metadata NodeMetadata `json:"metadata"`
	Status   NodeStatus   `json:"status"`
}

type NodeCondition

type NodeCondition struct {
	Type    string `json:"type"`
	Status  string `json:"status"`
	Message string `json:"message"`
}

type NodeInfo

type NodeInfo struct {
	KernelVersion  string `json:"kernelVersion"`
	OSImage        string `json:"osImage"`
	KubeletVersion string `json:"kubeletVersion"`
}

type NodeList

type NodeList struct {
	Items []Node `json:"items"`
}

type NodeMetadata

type NodeMetadata struct {
	Name     string            `json:"name"`
	SelfLink string            `json:"selfLink"`
	Labels   map[string]string `json:"labels"`
}

type NodeSizes added in v0.4.2

type NodeSizes struct {
	CPU              string `json:"cpu"`
	Memory           string `json:"memory"`
	Pods             string `json:"pods"`
	EphemeralStorage string `json:"ephemeral-storage"`
}

type NodeStatus

type NodeStatus struct {
	Conditions  []NodeCondition `json:"conditions"`
	NodeInfo    NodeInfo        `json:"nodeInfo"`
	Capacity    NodeSizes       `json:"capacity"`
	Allocatable NodeSizes       `json:"allocatable"`
}

type Pod added in v0.6.5

type Pod struct {
	Metadata PodMetadata `json:"metadata"`
	Spec     PodSpec     `json:"spec"`
}

type PodList added in v0.6.5

type PodList struct {
	Items []*Pod `json:"items"`
}

type PodMetadata added in v0.6.5

type PodMetadata struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	SelfLink  string `json:"selfLink"`
}

type PodSpec added in v0.6.5

type PodSpec struct {
	Status PodStatus `json:"status"`
}

type PodStatus added in v0.6.5

type PodStatus struct {
	PodIP string `json:"podIP"`
}

type Service

type Service struct {
	Metadata ServiceMetadata `json:"metadata"`
	Spec     ServiceSpec     `json:"spec"`
}

type ServiceList

type ServiceList struct {
	Items []*Service `json:"items"`
}

type ServiceMetadata

type ServiceMetadata struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	SelfLink  string `json:"selfLink"`
}

type ServicePort

type ServicePort struct {
	Name       string      `json:"name"`
	Protocol   string      `json:"protocol"`
	Port       uint        `json:"port"`
	TargetPort interface{} `json:"targetPort"`
}

type ServiceSpec

type ServiceSpec struct {
	Ports    []ServicePort     `json:"ports"`
	Selector map[string]string `json:"selector"`
}

Jump to

Keyboard shortcuts

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