Comments (4)
I think there is an opportunity here to make the setup even cleaner. Today, a full setup for a single port would look something like this:
apiVersion: v1
kind: Service
metadata:
name: fabric-test
namespace: fabric
annotations:
cloud.google.com/neg: '{"exposed_ports":{"5990":{}}}'
controller.autoneg.dev/neg: '{"backend_services":{"5990":[{"max_rate_per_endpoint":800}]}}'
labels:
app: fabric-test
spec:
selector:
app: fabric-test
type: ClusterIP
clusterIP: None
ports:
- name: http
port: 8080
protocol: TCP
- name: grpc
port: 5990
protocol: TCP
And it's for example not great that we need to specify the port number 5990
in three different places to make it work.
For our use-case, we usually also have multiple ports listed while we only care about one being exposed (for now at least).
One possible simplification might be if autoneg also could help with setting the cloud.google.com/neg
annotation on the service.
So the flow would look something like:
- autoneg sees some
controller.autoneg.dev
annotation(s) - autoneg sets the
cloud.google.com/neg
annotation accordingly - ingress-gce sees the
cloud.google.com/neg
annotation and creates the NEGs and setscloud.google.com/neg-status
- autoneg sees the
cloud.google.com/neg-status
and finally can add the NEGs to the backend service accordingly
This flow together with utilization of named ports can probably simplify things all the way down to something like this:
apiVersion: v1
kind: Service
metadata:
name: fabric-test
namespace: fabric
annotations:
controller.autoneg.dev/port-name: grpc
controller.autoneg.dev/max-rate-per-endpoint: 800
labels:
app: fabric-test
spec:
selector:
app: fabric-test
type: ClusterIP
clusterIP: None
ports:
- name: http
port: 8080
protocol: TCP
- name: grpc
port: 5990
protocol: TCP
And for other cases we could have options like for example:
controller.autoneg.dev/port-names: grpc,http
, controller.autoneg.dev/port-names: '["grpc","http"']
controller.autoneg.dev/port: 5990
, controller.autoneg.dev/ports: '["5990","8080"']
from gke-autoneg-controller.
@fdfzcq Do you and/or Fabric have thoughts here? With the new service name defaulting, I think you would need only a single annotation (controller.autoneg.dev/max-rate-per-endpoint:<number>
).
from gke-autoneg-controller.
@soellman Sorry I totally missed this question 😅 We will discuss in the team and get back to you!
from gke-autoneg-controller.
Erik I think that's a great idea! Users can still manually set the cloud.google.com/neg
and controller.autoneg.dev/neg
annotations as they like.
from gke-autoneg-controller.
Related Issues (20)
- Autoneg does not provide default configuration for max-rate-per-endpoint and max-connections-per-endpoint HOT 1
- capacityScaler can't be set to zero for global load balancer HOT 23
- Do you have plans for create Helm Chart for Autoneg installation? HOT 4
- #109 overrides external managed capacity scaling HOT 9
- Add "lifecycle" key in terraform module HOT 3
- Controller manager service account forbidden listing api resources
- Workload identity 401 invalid credentials error
- deploy/autoneg.yaml referring incorrect kubernetes service account HOT 3
- Configurable default capacityScaler HOT 1
- Custom role error when recreating project
- Unauthorized metrics endpoint HOT 2
- error CONNECTION balancing mode is not supported for protocol HTTP, invalid HOT 8
- Observing ACCESS_TOKEN_SCOPE_INSUFFICIENT when creating service HOT 11
- NEGs are not deleted during service deletion HOT 7
- Update Ginkgo due to deprecation warning HOT 1
- Controller user agent hardcoded to 0.9.7-dev HOT 1
- Update guide or description of compatibility guarantees HOT 3
- Additional pod and container hardening HOT 1
- Mixed logging when configuring structured logging
- Unused ConfigMap in deploy manifest HOT 1
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 gke-autoneg-controller.