Documentation ¶
Overview ¶
Package resources holds simple functions for synthesizing child resources from a ClusterIngress 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 MakeSecrets(ctx context.Context, originSecrets map[string]*corev1.Secret, ...) []*corev1.Secret
- func MakeServers(ci *v1alpha1.ClusterIngress, gatewayServiceNamespace string, ...) ([]v1alpha3.Server, error)
- func MakeVirtualService(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
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 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 ¶
SortServers sorts `Server` according to its port name.
Types ¶
This section is empty.