Documentation ¶
Index ¶
- Variables
- func ByProtocol(ports []v1.PortDef, include bool, protocols ...v1.Protocol) (result []v1.PortDef)
- func CollectContainerPorts(container *v1.Container, devMode bool) (result []v1.PortDef)
- func CopyServicePorts(ports []corev1.ServicePort) (result []corev1.ServicePort)
- func DedupPorts(ports []corev1.ServicePort) (result []corev1.ServicePort)
- func FilterDevPorts(ports []v1.PortDef, devMode bool) (result []v1.PortDef)
- func FunctionPortDefs(publish bool) []v1.PortDef
- func IsLinked(app *v1.AppInstance, name string) bool
- func LinkService(app *v1.AppInstance, name string) string
- func PortPublishForService(serviceName string, bindings []v1.PortBinding) (result []v1.PortPublish)
- func RemoveNonHTTPPorts(ports []corev1.ServicePort) []corev1.ServicePort
- func ToServicePort(port v1.PortDef) corev1.ServicePort
- func ToServicePorts(ports []v1.PortDef) []corev1.ServicePort
- type BoundPorts
- type ListenDef
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RouterPortDef = v1.PortDef{ Publish: true, Port: 80, Protocol: v1.ProtocolHTTP, TargetPort: 8080, } )
Functions ¶
func ByProtocol ¶
func CollectContainerPorts ¶
func CopyServicePorts ¶
func CopyServicePorts(ports []corev1.ServicePort) (result []corev1.ServicePort)
func DedupPorts ¶
func DedupPorts(ports []corev1.ServicePort) (result []corev1.ServicePort)
func FunctionPortDefs ¶ added in v0.10.0
func LinkService ¶
func LinkService(app *v1.AppInstance, name string) string
func PortPublishForService ¶
func PortPublishForService(serviceName string, bindings []v1.PortBinding) (result []v1.PortPublish)
func RemoveNonHTTPPorts ¶
func RemoveNonHTTPPorts(ports []corev1.ServicePort) []corev1.ServicePort
RemoveNonHTTPPorts removes all ports from the slice that do not have AppProtocol set to HTTP. This is useful for ExternalName Services, which cause problems for Istio if they have non-HTTP ports. See https://github.com/istio/istio/issues/20703. Kubernetes does not care about ports on ExternalName Services, so it is safe to remove them. Traefik does care about ports on ExternalName Services, but only on HTTP ones.
func ToServicePort ¶
func ToServicePort(port v1.PortDef) corev1.ServicePort
func ToServicePorts ¶
func ToServicePorts(ports []v1.PortDef) []corev1.ServicePort
Types ¶
type BoundPorts ¶
func ApplyBindings ¶
func ApplyBindings(mode v1.PublishMode, bindings []v1.PortPublish, ports []v1.PortDef) (result BoundPorts)
func (BoundPorts) ByHostname ¶
func (b BoundPorts) ByHostname() map[string][]v1.PortDef
func (BoundPorts) ServicePorts ¶
func (b BoundPorts) ServicePorts() (result []corev1.ServicePort, err error)
Click to show internal directories.
Click to hide internal directories.