-
Notifications
You must be signed in to change notification settings - Fork 711
Introduce a CRD for backend details #492
Description
Description:
The HTTPRoute specification states that you can specify a backend service under backendRef and give the service name and port. It also permits creating custom resource definitions in addition to these two fields.
The implementations of the backend services can be secured using basic authentication, OAuth2, MTLS, etc. Along with these configs, backends can set their own timeout limits, retry configurations, etc. In order to cater these requirements I would like to a propose a custom resources definition as follows to hold the backend related information.
Backend CRD
apiVersion: gateway.envoy.io/v1alpha1
kind: Backend
metadata:
name: order-svc
spec:
certificateName: order-cert
http2Enabled: false
timeout: 2000
credentials:
type: Basic
cred-secret: order-secret
retryConfig:
count: 3
statusCode: 503
circuitBreakers:
maxConnections: 4
maxRequests: 10
maxPendingRequests: 5
maxRetries: 4
maxConnectionPools: 4
HTTPRoute with the Backend CRD
kind: HTTPRoute
apiVersion: gateway.networking.k8s.io/v1alpha2
metadata:
name: bookinfo
spec:
parentRefs:
- name: eg-gw
hostnames:
- "bookinfo.com"
rules:
- matches:
- path:
type: PathPrefix
value: /orders
method: GET
backendRefs:
- group: gateway.envoy.io
kind: Backend
name: order-svc
port: 8080
I did follow proposed changes in here as well - https://gist.github.com/danehans/30d45d80de58bf63d95fc3542d0ebec7
We would like to contribute to the project and would love to know your thoughts on this.