Comments (11)
Sorry, I didn't get to this on Wednesday, and have been on vacation since then. Will get that documentation up soon.
from gateway.
xref config api: #29
xref internal api: #32
from gateway.
+1 for defining APIs using protos
- acts as source of truth for doc strings
- schema can be used to validate fields https://github.com/envoyproxy/protoc-gen-validate
- keeps this project consistent with envoy https://github.com/envoyproxy/envoy/tree/main/api
from gateway.
@skriss @youngnick I'm interested in your feedback here since Contour does not use protos. It would be great to achieve consensus so we can start building out the APIs.
from gateway.
xref Bootstrap API: #51
from gateway.
xref @arkodg PR for bootstrapping proto-based API tooling: #53
from gateway.
the decision was made in the maintainers meeting to use Kubebuilder based APIs over Protobufs
- @LukeShu @youngnick I couldn't find any links for tooling inside kubebuilder that tracks API compatibility & breaking API changes, can you please share any links in this area. For e.g. buf has a subcommand to track breaking API changes.
from gateway.
@LukeShu per the 5/24/22 meeting notes, please document the rationale for using kube-builder/controller-gen over protobuf.
from gateway.
Background
For those outside of the know: The kubebuilder
CLI is essentially a scaffolding-generator; a key part of what it does is generate you a Makefile
that calls the controller-gen
program when you run make generate
. When people say "using kubebuilder", they mostly mean "using controller-gen
".
Rationale
So why use the kubebuilder
ecosystem instead of the Protobuf ecosystem, which Envoy has invested heavily in?
-
We're defining extensions to the Gateway API. The Gateway API is canonically specified using controller-gen; using the same tooling means we don't have to learn two sets of tooling (assuming that those involved with Envoy Gateway will also have some level of involvement with Gateway API).
-
Protobuf does have an official JSON representation, however this representation is sloppy about whether capitalization matters in key names. This is at odds with Kubernetes, where the capitalization does matter. Protobuf is opinionated about the capitalization of enum values, but also permits numeric representation of those values; the int/string-duality isn't compatible for Kubernetes structural schemas . In the past, parts of Emissary's API were specified via Protobuf, and this was a continual source of headaches. Perhaps this is solvable with newer/better tools.
-
The validation language (magic
// +kubebuilder:
comments in Go source) of controller-gen exactly matches the validation capabilities of the Kubernetes apiserver andkubectl
client. For UX reasons, it is desirable to shift validation "left" as much as possible. There are tools that translateprotoc-gen-validate
annotations in to validations that the apiserver and kubectl can consume, but ultimately they are being consumed by a different validation machine thanprotoc-gen-validate
is designed around. -
Within the Kubernetes ecosystem, for new projects, Kubebuilder is absolutely the "default" choice. At one point some of the built-in Kubernetes APIs were canonically specified using Protobuf, but have since migrated to be canonically defined as Go types (using an internal predecessor to
conversion-gen
). For various reasons, for better or for worse, the Kubernetes ecosystem is moving away from protobuf for specifying resources.
Perhaps the pain points with Protobuf in this use-case are solvable with newer/better tools (there's one @arkodg mentioned that I hadn't heard of before, and whose name is escaping me at the moment). But ultimately, we're specifying a Kubernetes API, and it makes more sense to use a tooling ecosystem that is aligned with that. Let's go with the mainstream choice; and Kubebuilder absolutely is the "default" choice for new Kubernetes projects.
from gateway.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
from gateway.
#51 defines the initial config APIs for control and data planes.
from gateway.
Related Issues (20)
- flaky: TestE2E/CircuitBreaker/Deny_All_Requests
- docs: Add docs for BackendTLSPolicy
- e2e: BackendTLSPolicy
- Support Upstream TLS to multiple Backends HOT 3
- Support Well Known System Certs in BackendTLSPolicy
- BackendTLSPolicy: Support CACerts in Secrets HOT 2
- Who's using Envoy Gateway HOT 2
- Failed when trying to create Security Policy with basic auth HOT 5
- Promote guydc as a maintainer HOT 5
- docs: use https in basic auth example HOT 1
- use set[T] instead of map[T]bool HOT 3
- Enhance "egctl translate" to support translating Gateway-API resources to IR
- bootstrap merge not working
- Enable HPA for Envoy Proxy introduce unexpected behavior HOT 7
- Figure out shutdownmanager's image repo and tag for dev and release HOT 7
- Question: Chrome Behavior With Traffic Splitting HOT 5
- Improve EG Gateway xDS & startup Reliability (custom k8s health prob) HOT 2
- Envoy's port is not listening in HostNetwork HOT 6
- make e2e failed HOT 4
- envoy-oidc-hmac not created when envoy-gateway exists HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gateway.