Documentation
¶
Index ¶
- Constants
- func IterYAMLBytes(input []byte, handle func([]byte) error) error
- type ControllerResources
- type Defaulter
- type InfraIRMap
- type Resources
- func (in *Resources) DeepCopy() *Resources
- func (in *Resources) DeepCopyInto(out *Resources)
- func (r *Resources) GetBackend(namespace, name string) *egv1a1.Backend
- func (r *Resources) GetConfigMap(namespace, name string) *corev1.ConfigMap
- func (r *Resources) GetEndpointSlicesForBackend(svcNamespace, svcName, backendKind string) []*discoveryv1.EndpointSlice
- func (r *Resources) GetEnvoyProxy(namespace, name string) *egv1a1.EnvoyProxy
- func (r *Resources) GetNamespace(name string) *corev1.Namespace
- func (r *Resources) GetSecret(namespace, name string) *corev1.Secret
- func (r *Resources) GetService(namespace, name string) *corev1.Service
- func (r *Resources) GetServiceImport(namespace, name string) *mcsapiv1a1.ServiceImport
- type Validator
- type XdsIRMap
Constants ¶
const ( KindConfigMap = "ConfigMap" KindClientTrafficPolicy = "ClientTrafficPolicy" KindBackendTrafficPolicy = "BackendTrafficPolicy" KindBackendTLSPolicy = "BackendTLSPolicy" KindBackend = "Backend" KindEnvoyPatchPolicy = "EnvoyPatchPolicy" KindEnvoyExtensionPolicy = "EnvoyExtensionPolicy" KindSecurityPolicy = "SecurityPolicy" KindEnvoyProxy = "EnvoyProxy" KindGateway = "Gateway" KindGatewayClass = "GatewayClass" KindGRPCRoute = "GRPCRoute" KindHTTPRoute = "HTTPRoute" KindNamespace = "Namespace" KindTLSRoute = "TLSRoute" KindTCPRoute = "TCPRoute" KindUDPRoute = "UDPRoute" KindService = "Service" KindServiceImport = "ServiceImport" KindSecret = "Secret" KindHTTPRouteFilter = "HTTPRouteFilter" KindReferenceGrant = "ReferenceGrant" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ControllerResources ¶
type ControllerResources []*Resources
ControllerResources holds all the GatewayAPI resources per GatewayClass
func (*ControllerResources) DeepCopy ¶
func (c *ControllerResources) DeepCopy() *ControllerResources
DeepCopy creates a new ControllerResources. It is handwritten since the tooling was unable to copy into a new slice
func (*ControllerResources) Equal ¶
func (c *ControllerResources) Equal(y *ControllerResources) bool
Equal implements the Comparable interface used by watchable.DeepEqual to skip unnecessary updates.
type Defaulter ¶ added in v1.3.1
type Defaulter struct {
// contains filtered or unexported fields
}
Defaulter can set default values for crd object according to their schema.
func (*Defaulter) ApplyDefault ¶ added in v1.3.1
func (d *Defaulter) ApplyDefault(obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
ApplyDefault applies default values for input object, and return the object with default values.
type InfraIRMap ¶
type Resources ¶
type Resources struct {
// EnvoyProxyForGatewayClass holds EnvoyProxy attached to GatewayClass
EnvoyProxyForGatewayClass *egv1a1.EnvoyProxy `json:"envoyProxyForGatewayClass,omitempty" yaml:"envoyProxyForGatewayClass,omitempty"`
// EnvoyProxiesForGateways holds EnvoyProxiesForGateways attached to Gateways
EnvoyProxiesForGateways []*egv1a1.EnvoyProxy `json:"envoyProxiesForGateways,omitempty" yaml:"envoyProxiesForGateways,omitempty"`
GatewayClass *gwapiv1.GatewayClass `json:"gatewayClass,omitempty" yaml:"gatewayClass,omitempty"`
Gateways []*gwapiv1.Gateway `json:"gateways,omitempty" yaml:"gateways,omitempty"`
HTTPRoutes []*gwapiv1.HTTPRoute `json:"httpRoutes,omitempty" yaml:"httpRoutes,omitempty"`
GRPCRoutes []*gwapiv1.GRPCRoute `json:"grpcRoutes,omitempty" yaml:"grpcRoutes,omitempty"`
TLSRoutes []*gwapiv1a2.TLSRoute `json:"tlsRoutes,omitempty" yaml:"tlsRoutes,omitempty"`
TCPRoutes []*gwapiv1a2.TCPRoute `json:"tcpRoutes,omitempty" yaml:"tcpRoutes,omitempty"`
UDPRoutes []*gwapiv1a2.UDPRoute `json:"udpRoutes,omitempty" yaml:"udpRoutes,omitempty"`
ReferenceGrants []*gwapiv1b1.ReferenceGrant `json:"referenceGrants,omitempty" yaml:"referenceGrants,omitempty"`
Namespaces []*corev1.Namespace `json:"namespaces,omitempty" yaml:"namespaces,omitempty"`
Services []*corev1.Service `json:"services,omitempty" yaml:"services,omitempty"`
ServiceImports []*mcsapiv1a1.ServiceImport `json:"serviceImports,omitempty" yaml:"serviceImports,omitempty"`
EndpointSlices []*discoveryv1.EndpointSlice `json:"endpointSlices,omitempty" yaml:"endpointSlices,omitempty"`
Secrets []*corev1.Secret `json:"secrets,omitempty" yaml:"secrets,omitempty"`
ConfigMaps []*corev1.ConfigMap `json:"configMaps,omitempty" yaml:"configMaps,omitempty"`
ExtensionRefFilters []unstructured.Unstructured `json:"extensionRefFilters,omitempty" yaml:"extensionRefFilters,omitempty"`
EnvoyPatchPolicies []*egv1a1.EnvoyPatchPolicy `json:"envoyPatchPolicies,omitempty" yaml:"envoyPatchPolicies,omitempty"`
ClientTrafficPolicies []*egv1a1.ClientTrafficPolicy `json:"clientTrafficPolicies,omitempty" yaml:"clientTrafficPolicies,omitempty"`
BackendTrafficPolicies []*egv1a1.BackendTrafficPolicy `json:"backendTrafficPolicies,omitempty" yaml:"backendTrafficPolicies,omitempty"`
SecurityPolicies []*egv1a1.SecurityPolicy `json:"securityPolicies,omitempty" yaml:"securityPolicies,omitempty"`
BackendTLSPolicies []*gwapiv1a3.BackendTLSPolicy `json:"backendTLSPolicies,omitempty" yaml:"backendTLSPolicies,omitempty"`
EnvoyExtensionPolicies []*egv1a1.EnvoyExtensionPolicy `json:"envoyExtensionPolicies,omitempty" yaml:"envoyExtensionPolicies,omitempty"`
ExtensionServerPolicies []unstructured.Unstructured `json:"extensionServerPolicies,omitempty" yaml:"extensionServerPolicies,omitempty"`
Backends []*egv1a1.Backend `json:"backends,omitempty" yaml:"backends,omitempty"`
HTTPRouteFilters []*egv1a1.HTTPRouteFilter `json:"httpFilters,omitempty" yaml:"httpFilters,omitempty"`
// contains filtered or unexported fields
}
Resources holds the Gateway API and related resources that the translators needs as inputs. +k8s:deepcopy-gen=true
func LoadResourcesFromYAMLBytes ¶
LoadResourcesFromYAMLBytes will load Resources from given Kubernetes YAML string. TODO: This function should be able to process arbitrary number of resources, tracked by https://github.com/envoyproxy/gateway/issues/3207.
func NewResources ¶
func NewResources() *Resources
func (*Resources) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resources.
func (*Resources) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Resources) GetBackend ¶
func (*Resources) GetConfigMap ¶
func (*Resources) GetEndpointSlicesForBackend ¶
func (r *Resources) GetEndpointSlicesForBackend(svcNamespace, svcName, backendKind string) []*discoveryv1.EndpointSlice
func (*Resources) GetEnvoyProxy ¶
func (r *Resources) GetEnvoyProxy(namespace, name string) *egv1a1.EnvoyProxy
func (*Resources) GetService ¶
GetService returns the Service with the given namespace and name. This function creates a HashMap of Services for faster lookup when it's called for the first time. Subsequent calls will use the HashMap for lookup. Note: - This function is not thread-safe. - This function should be called after all the Services are added to the Resources.
func (*Resources) GetServiceImport ¶
func (r *Resources) GetServiceImport(namespace, name string) *mcsapiv1a1.ServiceImport