-
Notifications
You must be signed in to change notification settings - Fork 80
HealthScope #61
Comments
That's a great start! Just one nit:
In k8s , we usually use the following format instead:
Label key is an indicator of the type, not the instance. |
But it can belong to many health scopes. It is a many to many relationship. So, the key cannot repeat.
— Artur Souza
…________________________________
From: Hongchao Deng <notifications@github.com>
Sent: Saturday, June 13, 2020 1:01:36 PM
To: crossplane/crossplane <crossplane@noreply.github.com>
Cc: Artur Souza <artursouza.ms@outlook.com>; Assign <assign@noreply.github.com>
Subject: Re: [crossplane/crossplane] HealthScope (#1597)
That's a great start!
Just one nit:
healthscope.core.oam.dev/example-health-scope: true
In k8s , we usually use the following format instead:
healthscope.core.oam.dev/name: example-health-scope
Label key is an indicator of the type, not the instance.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcrossplane%2Fcrossplane%2Fissues%2F1597%23issuecomment-643671011&data=02%7C01%7C%7C050ca0bd43694719d8f508d80fd494ae%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637276752979724634&sdata=lkfD%2BAdwv5QvdpTckbJvrW0YOz%2BCeDlR49DxxkkFaOE%3D&reserved=0>, or unsubscribe<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAA77CQ2NWBEWDMRRGCWOZTRWPLKBANCNFSM4N43JGTQ&data=02%7C01%7C%7C050ca0bd43694719d8f508d80fd494ae%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637276752979734630&sdata=Y8x8nNQ7RIp3tZcOjqDF3ptGC8G08sNDvmOkISVkGNI%3D&reserved=0>.
|
I see. In this case, why not add a status to indicate all the scopes in a component: kind: Component
status:
scopes: ... list of scopes ... They are all oam concepts and we should have a standardized status like this. |
The healthscope is not at the Component declaration, only at ApplicationConfiguration. In the PR, I am adding Scopes to WorkloadStatus: https://github.com/crossplane/oam-kubernetes-runtime/pull/44/files#diff-3a6b6a3a711288e20dd54b6bbf14e369R303 |
I think it is ambiguous on the "services" and diverging our discussions. |
Instead of using labels, what about aggregate all information into Scope instance.
We can assume every OAM AppScope will have a fixed field such as This mechanism is a little like workload and trait interaction mechanism. |
I agree with @wonderflow . |
BTW, I also propose we report the health status directly on the scope status, this way, there is no need for a HTTP API. Users can just use:
|
@artursouza Yeah, agree. Restful API could be an advanced feature, we can add it later. |
Per #55 we're centralising all things OAM into one repo, and oam-kubernetes-runtime seems like the most likely place. I'm going to move this issue there. |
I think this issue is almost finished, we can close it, right? \cc @artursouza |
Closing it. |
Context
Parent Issue: crossplane/crossplane#1480
HealthScope aggregates the health status of multiple components via a web API.
In Rudr, it was implemented as described here: https://github.com/oam-dev/rudr/tree/master/healthscope
Proposal
Re-implement Rudr's approach but for the new v1alpha2 spec.
The health scope controller (like in Rudr) does 2 things:
1. Periodically check health status of components and update the HealthScope resource status.
2. serve as a http server, to output aggregated health information.
Optionally, it can be extended to offer
/metrics
API so health status can be exported to Prometheus.HealthScope controller keeps track of the healthscopes created.
Services generated as part of the ApplicationConfig have the following additional label:
Example:
HealthScope controller can now query for all services in a health scope by selecting them based on label.
Finally, the health of the scope is reported in:
http://localhost:8080/scopes/example-health-scope
The spec for HealthScope might need to change to incorporate other components, like a database. That work is out of scope (ta dan) for this issue.
The text was updated successfully, but these errors were encountered: