Comments (13)
@markmandel How about pkg/health
? In the past, I've found health checking often deserves its own package and eventually grows to justify it.
from agones.
So I don't see this being a Controller - in the Kubernetes sense (i.e. it doesn't manage resources in the cluster).
So I'd be more inclined to call it something else.
from agones.
OK. I'll leave the SDK sidecar alone.
Also, I agree: let's try https://github.com/heptiolabs/healthcheck for health-checking as you suggest.
from agones.
SGTM.
from agones.
Does health.NewHealthController
or health.HealthController
sound like a stutter? Wondering if this work includes renaming health.HealthController
to just health.Controller
to avoid the stuttering.
from agones.
Work for this issue is happening here. One thing I'm concerned about is the use of mocks
in both the gameservers
package tests and now the health
package tests.
I see two options:
- Duplicate
test_helpers.go
in both packages and remove what is unneeded from both, or - Promote
test_helpers.go
into its own shareable package.
I'll open a PR and we can discuss the best approach over there.
from agones.
To go back to design - the original idea was to implement something (or maybe use directly) something more akin to https://github.com/heptiolabs/healthcheck
My thought was:
cmd/controller
would pass this through to each controller (currently there is only one)- Each controller's responsibility would be to add any checks it has (I'm actually not sure what to check - but that's an interesting discussion)
cmd/controller
would be the one that starts the http endpoint.
Something similar to what I'm doing with the webhook manager is what I was thinking.
WDYT?
from agones.
That sounds good. So HealthController
stays put, but the server which answers requests at /healthz
gets moved out, while maybe gaining an AddCheck
function that other controllers can use to register their own specialized check. Does that sound like what you're thinking?
from agones.
Yeah - sounds like we're on the same page.
And since I'm thinking about it - the pattern could potentially(?) be repeated for the sdk sidecar binary - since that also has a http handler in it (although it actually has 2 health points, one for itself and one as a proxy for the backing game server).
Since that also fires up a http server in it's Run()
command, and it also feels a bit icky to me as well.
It may be worth talking over a hangout to discuss the architecture, if you think that would be valuable. Some of the design of the game server health checking is captured in this ticket
from agones.
This is the branch where I'm making the discussed changes.
from agones.
Seems like this should be extracted, too. Yes?
from agones.
Re: the SDK sidecar, I'm going to say let's leave that alone for now - it's bit more complex, and won't have multiple controllers running through it. But we can definitely review in the future if we see a nice reuse case there.
from agones.
Resolved by #98
from agones.
Related Issues (20)
- CORS enabled on ping service
- Upgrade to Golang 1.22.6 HOT 2
- Extend Webhook autoscaler to send fleet metadata with the request HOT 4
- Add chain ID status to fleetautoscaler event logger
- FleetAutoscaler with Counter policy trying to scale Fleet to negative replicas count HOT 2
- Add logging to webhook failure and schedule parsing errors for Schedule/Chain policies
- Game servers are having some delays until getting external IPs from agones SDK HOT 1
- Update AWS Provider Version for Terraform module to fix Timeout Rather than Manual Workarounds
- Incorrect error logging caused by ResourceVersion conflict on SDK Patch call HOT 2
- Release 1.43.0 HOT 1
- Support GameServer.Spec.SdkServer.LogLevel "Trace" HOT 1
- Rolling updates do not progress if all game servers in the fleet are in the `Allocated` state
- Doc: "Available metrics" mark up was broken down HOT 1
- Cannot Use Agones SDK Image on Windows 2022 Node Due to Missing os.version in Docker Manifest
- Add Helm Chart Variable for Configuring SIDECAR_IMAGE Independently
- Clarrification on the metric `gameserver_creation_duration`
- Poor packing with agones-allocator and Counter for high-capacity game servers HOT 2
- Error in Dockerfile: 'python' package not available, and 'curl' not found HOT 3
- Metrics agones_gameserver_state_duration listed as agones_gameservers_state_duration in docs
- Enhance AllocationSpec List modification to include delete operation
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 agones.