service

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

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.Clientset) *Client

NewClient constructs a new Client.

func (*Client) Delete added in v0.4.1

func (c *Client) Delete(ctx context.Context, name, namespace string) (err error)

Delete deletes Service

func (*Client) Set

func (c *Client) Set(ctx context.Context, name, namespace string, o Options) (err error)

Set updates Service or creates it if it does not exist

type Options

type Options struct {
	Annotations map[string]string
	Labels      map[string]string
	ServiceSpec Spec
}

Options holds optional parameters for the Client.

type Port

type Port struct {
	Name        string
	AppProtocol string
	Nodeport    int32
	Port        int32
	Protocol    string
	TargetPort  string
}

Port represents service's port

type Ports

type Ports []Port

Ports represents service's ports

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
	TopologyKeys                  []string
	Type                          string
}

Spec represents Kubernetes ServiceSpec

func (*Spec) ToK8S

func (s *Spec) ToK8S() v1.ServiceSpec

ToK8S converts ServiceSpec to Kuberntes client object

Jump to

Keyboard shortcuts

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