istio: Index | Files | Directories

package kube

import ""


Package Files

conversion.go deregister.go register.go


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

    // TODO: move to API
    // The value for this annotation is a set of key value pairs (node labels)
    // that can be used to select a subset of nodes from the pool of k8s nodes
    // It is used for multi-cluster scenario, and with nodePort type gateway service.
    NodeSelectorAnnotation = ""

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 PodTLSMode Uses

func PodTLSMode(pod *coreV1.Pod) string

PodTLSMode returns the tls mode associated with the pod if pod has been injected with sidecar

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

func SplitKey Uses

func SplitKey(key string) (namespace string, name string, err error)

SplitKey returns namespace and name

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.



Package kube imports 17 packages (graph) and is imported by 6 packages. Updated 2021-01-25. Refresh now. Tools for package owners.