resources

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package resources holds simple functions for synthesizing child resources from a ClusterIngress resource and any relevant ClusterIngress controller configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GatewayServiceNamespace

func GatewayServiceNamespace(ingressGateways []config.Gateway, gatewayName string) (string, error)

GatewayServiceNamespace returns the namespace of the gateway service that the `Gateway` object with name `gatewayName` is associated with.

func GetHTTPServer

func GetHTTPServer(gateway *v1alpha3.Gateway) *v1alpha3.Server

GetHTTPServer gets the HTTP `Server` from `Gateway`.

func GetSecrets

func GetSecrets(ci *v1alpha1.ClusterIngress, secretLister corev1listers.SecretLister) (map[string]*corev1.Secret, error)

GetSecrets gets the all of the secrets referenced by the given ClusterIngress, and returns a map whose key is the a secret namespace/name key and value is pointer of the secret.

func GetServers

func GetServers(gateway *v1alpha3.Gateway, ci *v1alpha1.ClusterIngress) []v1alpha3.Server

GetServers gets the `Servers` from `Gateway` that belongs to the given ClusterIngress.

func MakeHTTPServer

func MakeHTTPServer(httpProtocol network.HTTPProtocol) *v1alpha3.Server

MakeHTTPServer creates a HTTP Gateway `Server` based on the HTTPProtocol configureation.

func MakeSecrets

func MakeSecrets(ctx context.Context, originSecrets map[string]*corev1.Secret, ci *v1alpha1.ClusterIngress) []*corev1.Secret

MakeSecrets makes copies of the origin Secrets under the namespace of Istio gateway service.

func MakeServers

func MakeServers(ci *v1alpha1.ClusterIngress, gatewayServiceNamespace string, originSecrets map[string]*corev1.Secret) ([]v1alpha3.Server, error)

MakeServers creates the expected Gateway `Servers` based on the given ClusterIngress.

func MakeVirtualService

func MakeVirtualService(ci *v1alpha1.ClusterIngress, gateways []string) *v1alpha3.VirtualService

MakeVirtualService creates an Istio VirtualService as network programming. Such VirtualService specifies which Gateways and Hosts that it applies to, as well as the routing rules.

func SecretRef

func SecretRef(namespace, name string) corev1.ObjectReference

SecretRef returns the ObjectReference of a secret given the namespace and name of the secret.

func SortServers

func SortServers(servers []v1alpha3.Server) []v1alpha3.Server

SortServers sorts `Server` according to its port name.

func UpdateGateway

func UpdateGateway(gateway *v1alpha3.Gateway, want []v1alpha3.Server, existing []v1alpha3.Server) *v1alpha3.Gateway

UpdateGateway replaces the existing servers with the wanted servers.

Types

This section is empty.

Directories

Path Synopsis
Package names holds simple functions for synthesizing resource names.
Package names holds simple functions for synthesizing resource names.

Jump to

Keyboard shortcuts

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