utils

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindPort

func FindPort(pod *api_v1.Pod, svcPort *api_v1.ServicePort) (int32, error)

FindPort locates the container port for the given pod and portName. If the targetPort is a number, use that. If the targetPort is a string, look that string up in all named ports in all containers in the target pod. If no match is found, fail.

func HasChanges

func HasChanges(old *extensions.Ingress, current *extensions.Ingress) bool

HasChanges determines if current ingress has changes compared to old ingress

func IsMaster

func IsMaster(ing *extensions.Ingress) bool

IsMaster determines is an ingress is a master or not

func IsMinion

func IsMinion(ing *extensions.Ingress) bool

IsMinion determines is an ingress is a minion or not

func ParseNamespaceName

func ParseNamespaceName(value string) (ns string, name string, err error)

ParseNamespaceName parses the string in the <namespace>/<name> format and returns the name and the namespace. It returns an error in case the string does not follow the <namespace>/<name> format.

Types

type StoreToConfigMapLister

type StoreToConfigMapLister struct {
	cache.Store
}

StoreToConfigMapLister makes a Store that lists ConfigMaps

func (*StoreToConfigMapLister) List

func (s *StoreToConfigMapLister) List() (cfgm api_v1.ConfigMapList, err error)

List lists all Ingress' in the store.

type StoreToEndpointLister

type StoreToEndpointLister struct {
	cache.Store
}

StoreToEndpointLister makes a Store that lists Endponts

func (*StoreToEndpointLister) GetServiceEndpoints

func (s *StoreToEndpointLister) GetServiceEndpoints(svc *api_v1.Service) (ep api_v1.Endpoints, err error)

GetServiceEndpoints returns the endpoints of a service, matched on service name.

type StoreToIngressLister

type StoreToIngressLister struct {
	cache.Store
}

StoreToIngressLister makes a Store that lists Ingress. TODO: Move this to cache/listers post 1.1.

func (*StoreToIngressLister) GetByKeySafe

func (s *StoreToIngressLister) GetByKeySafe(key string) (ing *extensions.Ingress, exists bool, err error)

GetByKeySafe calls Store.GetByKeySafe and returns a copy of the ingress so it is safe to modify.

func (*StoreToIngressLister) GetServiceIngress

func (s *StoreToIngressLister) GetServiceIngress(svc *api_v1.Service) (ings []extensions.Ingress, err error)

GetServiceIngress gets all the Ingress' that have rules pointing to a service. Note that this ignores services without the right nodePorts.

func (*StoreToIngressLister) List

func (s *StoreToIngressLister) List() (ing extensions.IngressList, err error)

List lists all Ingress' in the store.

type StoreToSecretLister

type StoreToSecretLister struct {
	cache.Store
}

StoreToSecretLister makes a Store that lists Secrets

Jump to

Keyboard shortcuts

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