istio: Index | Files | Directories

package kube

import ""


Package Files

conversion.go deregister.go queue.go register.go


const (
    // IngressClassAnnotation is the annotation on ingress resources for the class of controllers
    // responsible for it
    IngressClassAnnotation = ""

func ConvertProbePort Uses

func ConvertProbePort(c *coreV1.Container, handler *coreV1.Handler) (*model.Port, error)

func ConvertProbesToPorts Uses

func ConvertProbesToPorts(t *coreV1.PodSpec) (model.PortList, error)

ConvertProbesToPorts returns a PortList consisting of the ports where the pod is configured to do Liveness and Readiness probes

func ConvertService Uses

func ConvertService(svc coreV1.Service, domainSuffix string, clusterID string) *model.Service

func DeRegisterEndpoint Uses

func DeRegisterEndpoint(client kubernetes.Interface, namespace string, svcName string,
    ip string) error

DeRegisterEndpoint removes the endpoint (and the service if it already exists) from Kubernetes. It creates or updates as needed.

func ExternalNameServiceInstances Uses

func ExternalNameServiceInstances(k8sSvc coreV1.Service, svc *model.Service) []*model.ServiceInstance

func KeyFunc Uses

func KeyFunc(name, namespace string) string

KeyFunc is the internal API key function that returns "namespace"/"name" or "name" if "namespace" is empty

func RegisterEndpoint Uses

func RegisterEndpoint(client kubernetes.Interface, namespace string, svcName string,
    ip string, portsList []NamedPort, labels []string, annotations []string) error

RegisterEndpoint registers the endpoint (and the service if it doesn't already exists). It creates or updates as needed. When creating it adds the optional labels.

func SecureNamingSAN Uses

func SecureNamingSAN(pod *coreV1.Pod) string

SecureNamingSAN creates the secure naming used for SAN verification from pod metadata

func ServiceHostname Uses

func ServiceHostname(name, namespace, domainSuffix string) host.Name

ServiceHostname produces FQDN for a k8s service

type ChainHandler Uses

type ChainHandler struct {
    Funcs []Handler

ChainHandler applies handlers in a sequence

func (*ChainHandler) Append Uses

func (ch *ChainHandler) Append(h Handler)

Append a handler as the last handler in the chain

func (*ChainHandler) Apply Uses

func (ch *ChainHandler) Apply(obj interface{}, event model.Event) error

Apply is the handler function

type Handler Uses

type Handler func(obj interface{}, event model.Event) error

Handler specifies a function to apply on an object for a given event type

type NamedPort Uses

type NamedPort struct {
    Port int32
    Name string

NamedPort defines the Port and Name tuple needed for services and endpoints.

func Str2NamedPort Uses

func Str2NamedPort(str string) (NamedPort, error)

Str2NamedPort parses a proto:port string into a namePort struct.

type Queue Uses

type Queue interface {
    // Push a ticket
    // Run the loop until a signal on the channel
    Run(<-chan struct{})

Queue of work tickets processed using a rate-limiting loop

func NewQueue Uses

func NewQueue(errorDelay time.Duration) Queue

NewQueue instantiates a queue with a processing function

type Task Uses

type Task struct {
    Handler Handler
    Obj     interface{}
    Event   model.Event

Task object for the event watchers; processes until handler succeeds

func NewTask Uses

func NewTask(handler Handler, obj interface{}, event model.Event) Task

NewTask creates a task from a work item


controllerpackage controller implements the shared and reusable library for Kubernetes

Package kube imports 23 packages (graph) and is imported by 9 packages. Updated 2019-10-17. Refresh now. Tools for package owners.