Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type List ¶ added in v0.36.0
type List struct {
Services []Service `json:"items"`
}
List holds a list of services returned from kubectl get svc
type LoadBalancer ¶
LoadBalancer holds the ingress definitions
type Metadata ¶
type Metadata struct { CreatedAt time.Time `json:"creationTimestamp"` Labels map[string]string `json:"labels"` Name string `json:"name"` Namespace string `json:"namespace"` }
Metadata holds information like name, namespace, and labels
type Port ¶
type Port struct { NodePort int `json:"nodePort"` Port int `json:"port"` Protocol string `json:"protocol"` TargetPort int `json:"targetPort"` }
Port represents a service port definition
type Service ¶
type Service struct { Metadata Metadata `json:"metadata"` Spec Spec `json:"spec"` Status Status `json:"status"` }
Service represents a kubernetes service
func CreateServiceFromFile ¶
CreateServiceFromFile will create a Service from file with a name
func CreateServiceFromFileDeleteIfExist ¶ added in v0.36.0
CreateServiceFromFileDeleteIfExist will create a Service from file, deleting any pre-existing service with the same name
func GetAllByPrefix ¶ added in v0.36.0
GetAllByPrefix will return all services in a given namespace that match a prefix
func (*Service) GetNodePort ¶
GetNodePort will return the node port for a given pod
type Spec ¶
type Spec struct { ClusterIP string `json:"clusterIP"` Ports []Port `json:"ports"` Type string `json:"type"` }
Spec holds information like clusterIP and port
type Status ¶
type Status struct {
LoadBalancer LoadBalancer `json:"loadBalancer"`
}
Status holds the load balancer definition