Documentation ¶
Overview ¶
Package resources holds simple functions for synthesizing child resources from an Ingress resource and any relevant ClusterIngress controller configuration.
Index ¶
- func GatewayServiceNamespace(ingressGateways []config.Gateway, gatewayName string) (string, error)
- func GetHTTPServer(gateway *v1alpha3.Gateway) *v1alpha3.Server
- func GetSecrets(ci *v1alpha1.ClusterIngress, secretLister corev1listers.SecretLister) (map[string]*corev1.Secret, error)
- func GetServers(gateway *v1alpha3.Gateway, ci *v1alpha1.ClusterIngress) []v1alpha3.Server
- func MakeHTTPServer(httpProtocol network.HTTPProtocol) *v1alpha3.Server
- func MakeIngressVirtualService(ci *v1alpha1.ClusterIngress, gateways []string) *v1alpha3.VirtualService
- func MakeMeshVirtualService(ci *v1alpha1.ClusterIngress) *v1alpha3.VirtualService
- func MakeSecrets(ctx context.Context, originSecrets map[string]*corev1.Secret, ...) []*corev1.Secret
- func MakeServers(ci *v1alpha1.ClusterIngress, gatewayServiceNamespace string, ...) ([]v1alpha3.Server, error)
- func MakeVirtualServices(ci *v1alpha1.ClusterIngress, gateways []string) []*v1alpha3.VirtualService
- func SecretRef(namespace, name string) corev1.ObjectReference
- func SortServers(servers []v1alpha3.Server) []v1alpha3.Server
- func UpdateGateway(gateway *v1alpha3.Gateway, want []v1alpha3.Server, existing []v1alpha3.Server) *v1alpha3.Gateway
- func VirtualServiceNamespace(_ *v1alpha1.ClusterIngress) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GatewayServiceNamespace ¶
GatewayServiceNamespace returns the namespace of the gateway service that the `Gateway` object with name `gatewayName` is associated with.
func GetHTTPServer ¶
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 ¶
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 MakeIngressVirtualService ¶
func MakeIngressVirtualService(ci *v1alpha1.ClusterIngress, gateways []string) *v1alpha3.VirtualService
MakeIngressVirtualService creates Istio VirtualService as network programming for Istio Gateways other than 'mesh'.
func MakeMeshVirtualService ¶
func MakeMeshVirtualService(ci *v1alpha1.ClusterIngress) *v1alpha3.VirtualService
MakeMeshVirtualService creates Istio VirtualService as network programming for Istio network mesh.
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 MakeVirtualServices ¶
func MakeVirtualServices(ci *v1alpha1.ClusterIngress, gateways []string) []*v1alpha3.VirtualService
MakeVirtualServices creates Istio VirtualServices as network programming.
These 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 ¶
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.
func VirtualServiceNamespace ¶
func VirtualServiceNamespace(_ *v1alpha1.ClusterIngress) string
VirtualServiceNamespace gives the namespace of the child VirtualServices for a given ClusterIngress.
Types ¶
This section is empty.