Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions internal/cmd/egctl/testdata/translate/in/backend-endpoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,21 @@ spec:
validation:
wellKnownCACertificates: "System"
hostname: www.example.com
---
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyExtensionPolicy
metadata:
name: ext-proc-example
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: backend
extProc:
- backendRefs:
- name: grpc-ext-proc
port: 9002
processingMode:
request: {}
response:
body: Streamed
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,43 @@ backends:
reason: Accepted
status: "True"
type: Accepted
envoyExtensionPolicies:
- kind: EnvoyExtensionPolicy
metadata:
creationTimestamp: null
name: ext-proc-example
namespace: envoy-gateway-system
spec:
extProc:
- backendRefs:
- group: ""
kind: Service
name: grpc-ext-proc
port: 9002
processingMode:
request: {}
response:
body: Streamed
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: backend
status:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: Gateway
name: eg
namespace: envoy-gateway-system
conditions:
- lastTransitionTime: null
message: |-
Wasm: wasm cache is not initialized
ExtProc: service envoy-gateway-system/grpc-ext-proc not found.
reason: Invalid
status: "False"
type: Accepted
controllerName: gateway.envoyproxy.io/gatewayclass-controller
gatewayClass:
kind: GatewayClass
metadata:
Expand Down
15 changes: 13 additions & 2 deletions internal/gatewayapi/resource/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@

// loadKubernetesYAMLToResources converts a Kubernetes YAML string into GatewayAPI Resources.
// TODO: add support for kind:
// - EnvoyExtensionPolicy (gateway.envoyproxy.io/v1alpha1)
// - BackendLPPolicy (gateway.networking.k8s.io/v1alpha2)
// - BackendTLSPolicy (gateway.networking.k8s.io/v1alpha3)
// - ReferenceGrant (gateway.networking.k8s.io/v1alpha2)
func loadKubernetesYAMLToResources(input []byte, addMissingResources bool) (*Resources, error) {
resources := NewResources()
Expand Down Expand Up @@ -355,6 +353,19 @@
Spec: typedSpec.(gwapiv1a3.BackendTLSPolicySpec),
}
resources.BackendTLSPolicies = append(resources.BackendTLSPolicies, backendTLSPolicy)
case KindEnvoyExtensionPolicy:
typedSpec := spec.Interface()
envoyExtensionPolicy := &egv1a1.EnvoyExtensionPolicy{
TypeMeta: metav1.TypeMeta{
Kind: KindEnvoyExtensionPolicy,
},
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: namespace,
},
Spec: typedSpec.(egv1a1.EnvoyExtensionPolicySpec),
}
resources.EnvoyExtensionPolicies = append(resources.EnvoyExtensionPolicies, envoyExtensionPolicy)

Check warning on line 368 in internal/gatewayapi/resource/load.go

View check run for this annotation

Codecov / codecov/patch

internal/gatewayapi/resource/load.go#L356-L368

Added lines #L356 - L368 were not covered by tests
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion release-notes/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ bug fixes: |
Bypass overload manager for stats and ready listeners
Fix translating backendSettings for extAuth
Fix an issue that stats compressor was not working.
Added support for BackendTLSPolicy parsing in Standalone mode.
Added support for BackendTLSPolicy and EnvoyExtensionPolicy parsing in Standalone mode.

# Enhancements that improve performance.
performance improvements: |
Expand Down
Loading