Documentation
¶
Index ¶
- type Client
- func (c *Client) Delete(ctx context.Context, name, namespace string) (err error)
- func (c *Client) FindNode(ctx context.Context, namespace string, pod *v1.Pod) (*NodeInfo, *v1.Service, error)
- func (c *Client) GetNodes(ctx context.Context, namespace, labelSelector string) (nodes []NodeInfo, err error)
- func (c *Client) Set(ctx context.Context, name, namespace string, o Options) (svc *v1.Service, err error)
- type NodeInfo
- type Options
- type Port
- type Ports
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages communication with the Kubernetes Service.
func NewClient ¶
func NewClient(clientset kubernetes.Interface) *Client
NewClient constructs a new Client.
func (*Client) GetNodes ¶ added in v0.22.0
func (c *Client) GetNodes(ctx context.Context, namespace, labelSelector string) (nodes []NodeInfo, err error)
GetNodes returns list of nodes in the namespace with labelSelector. Nodes are filtered by api port. Endpoint is constructed from ClusterIP and api port.
type Port ¶
type Port struct { Name string AppProtocol string Nodeport int32 Port int32 Protocol string TargetPort string }
Port represents service's port
type Spec ¶
type Spec struct { ClusterIP string ExternalIPs []string ExternalName string ExternalTrafficPolicy string LoadBalancerIP string LoadBalancerSourceRanges []string Ports Ports PublishNotReadyAddresses bool Selector map[string]string SessionAffinity string SessionAffinityTimeoutSeconds int32 Type string }
Spec represents Kubernetes ServiceSpec
func (*Spec) ToK8S ¶
func (s *Spec) ToK8S() v1.ServiceSpec
ToK8S converts ServiceSpec to Kuberntes client object
Click to show internal directories.
Click to hide internal directories.