Documentation
¶
Index ¶
- Variables
- func ExtractObjectsFromReader(reader io.Reader, namespace string) ([]*unstructured.Unstructured, error)
- func GetIngressClass(ingress networkingv1.Ingress) string
- func GetRuleGroups(ingresses []networkingv1.Ingress) map[string]IngressRuleGroup
- func NameFromHost(host string) string
- func PtrTo[T any](a T) *T
- func ReadIngressesFromCluster(ctx context.Context, client client.Client, ingressClasses sets.Set[string]) (map[types.NamespacedName]*networkingv1.Ingress, error)
- func ReadIngressesFromFile(filename, namespace string, ingressClasses sets.Set[string]) (map[types.NamespacedName]*networkingv1.Ingress, error)
- func RouteName(ingressName, host string) string
- func ToBackendRef(ib networkingv1.IngressBackend, path *field.Path) (*gatewayv1.BackendRef, *field.Error)
- func ToGatewayResources(ir intermediate.IR) (i2gw.GatewayResources, field.ErrorList)
- func ToIR(ingresses []networkingv1.Ingress, ...) (intermediate.IR, field.ErrorList)
- type IngressRuleGroup
- type Rule
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GatewayGVK = schema.GroupVersionKind{ Group: "gateway.networking.k8s.io", Version: "v1", Kind: "Gateway", } HTTPRouteGVK = schema.GroupVersionKind{ Group: "gateway.networking.k8s.io", Version: "v1", Kind: "HTTPRoute", } TLSRouteGVK = schema.GroupVersionKind{ Group: "gateway.networking.k8s.io", Version: "v1alpha2", Kind: "TLSRoute", } TCPRouteGVK = schema.GroupVersionKind{ Group: "gateway.networking.k8s.io", Version: "v1alpha2", Kind: "TCPRoute", } ReferenceGrantGVK = schema.GroupVersionKind{ Group: "gateway.networking.k8s.io", Version: "v1beta1", Kind: "ReferenceGrant", } )
Functions ¶
func ExtractObjectsFromReader ¶ added in v0.2.0
func ExtractObjectsFromReader(reader io.Reader, namespace string) ([]*unstructured.Unstructured, error)
ExtractObjectsFromReader extracts all objects from a reader, which is created from YAML or JSON input files. It retrieves all objects, including nested ones if they are contained within a list. The function takes a namespace parameter to optionally return only namespaced resources.
func GetIngressClass ¶
func GetIngressClass(ingress networkingv1.Ingress) string
func GetRuleGroups ¶
func GetRuleGroups(ingresses []networkingv1.Ingress) map[string]IngressRuleGroup
func NameFromHost ¶
func ReadIngressesFromCluster ¶ added in v0.2.0
func ReadIngressesFromFile ¶ added in v0.2.0
func ReadIngressesFromFile(filename, namespace string, ingressClasses sets.Set[string]) (map[types.NamespacedName]*networkingv1.Ingress, error)
func ToBackendRef ¶
func ToBackendRef(ib networkingv1.IngressBackend, path *field.Path) (*gatewayv1.BackendRef, *field.Error)
func ToGatewayResources ¶ added in v0.4.0
func ToGatewayResources(ir intermediate.IR) (i2gw.GatewayResources, field.ErrorList)
ToGatewayResources converts the received intermediate.IR to i2gw.GatewayResource without taking into consideration any provider specific logic.
func ToIR ¶ added in v0.4.0
func ToIR(ingresses []networkingv1.Ingress, options i2gw.ProviderImplementationSpecificOptions) (intermediate.IR, field.ErrorList)
ToIR converts the received ingresses to intermediate.IR without taking into consideration any provider specific logic.
Types ¶
type IngressRuleGroup ¶
type IngressRuleGroup struct { Namespace string Name string IngressClass string Host string TLS []networkingv1.IngressTLS Rules []Rule }
type Rule ¶
type Rule struct { Ingress networkingv1.Ingress IngressRule networkingv1.IngressRule }
Click to show internal directories.
Click to hide internal directories.