-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New component: cfgardenobserver #33618
Comments
I'll sponsor this. Feel free to start submitting PRs, @jriguera 👍 |
In order to simplify the review process, we will split the functionality in 2 PRs:
Regarding point 1, example of properties available in Garden API:
|
**Description:** We would like to implement a new observer for [Cloudfoundry](https://www.cloudfoundry.org/) containers/applications. The idea is not make use of the main API but the local one, which is available as unix socket on each node and manages the containers lifecycle. The main API would remain as optional and only to get Application info (which only involves one GET http request once the app id is known). **Link to tracking Issue:** [33618](#33618) **Testing:** First component PR **Documentation:** Added Readme --------- Co-authored-by: Tomás Mota <[email protected]> Co-authored-by: Jose Riguera <[email protected]> Co-authored-by: Tomás Mota <[email protected]> Co-authored-by: Curtis Robert <[email protected]> Co-authored-by: José Riguera Lopez <[email protected]>
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
…4513) **Description:** First Component PR: #33727 This is the second PR for adding the cfgardenobserver, with the first suggested implementation. There are definitely some decisions made that require feedback, such as adding the CloudFoundry application labels to the Endpoint labels, and the decision to use the `Container` EndpointType at all. **Link to tracking Issue:** #33618 **Testing:** Unit testing of config and extension **Documentation:** Updated readme with new configuration and endpoints --------- Co-authored-by: sam clulow <[email protected]> Co-authored-by: sam clulow <[email protected]> Co-authored-by: José Riguera Lopez <[email protected]>
…en-telemetry#34513) **Description:** First Component PR: open-telemetry#33727 This is the second PR for adding the cfgardenobserver, with the first suggested implementation. There are definitely some decisions made that require feedback, such as adding the CloudFoundry application labels to the Endpoint labels, and the decision to use the `Container` EndpointType at all. **Link to tracking Issue:** open-telemetry#33618 **Testing:** Unit testing of config and extension **Documentation:** Updated readme with new configuration and endpoints --------- Co-authored-by: sam clulow <[email protected]> Co-authored-by: sam clulow <[email protected]> Co-authored-by: José Riguera Lopez <[email protected]>
The purpose and use-cases of the new component
We would like to implement a new observer for Cloudfoundry containers/applications. The idea is not make use of the main API but the local one, which is available as unix socket on each node and manages the containers lifecycle. The main API would remain as optional and only to get Application info (which only involves one GET http request once the app id is known).
We want to have the applications exposing metrics (prometheus openmetrics format:
/metrics
endpoint) automatically scraped with an OpenTelemetry collector running on each node. The idea is building a "cfgardenobserver" (similar to k8sobserver, or dockerobserver) which polls the garden api periodically and automatically discovers the (local) containers in the diego-cell and feeds a receivercreator to build (or remove -if the container is gone-) an instance of a prometheusclient (or most likely a simpleprometheusreceiver) with the proper settings (mTLS or extra metrics labels) to scrape the app instance. Eventually the metrics collected will be pushed to an OTLP endpoint. This would be a similar to K8S with the the K8S downward API (a sort of reduced API for simple/local queries) with thek8sobserver
, which avoids querying the entire cluster and only returns information about containers (pods) currently running on the node.Example configuration for the component
Telemetry data types supported
Metrics
Is this a vendor-specific component?
Code Owner(s)
@crobert-1
Sponsor (optional)
@crobert-1
Additional context
Cloudfoundry is a PaaS which has implemented their own container technology. The component in charge of providing a local API in each node (also known as "diego-cell") is named Garden. Garden can use different backends to manage the lifecycle of the containers (runc, containerd, etc) and abstrat the OS. The API supports unix socket or regular network port. There is a golang library to handle the functionality of interacting with containers. In this case, only GET/List operations would be performed to list running containers and get the [ContainerInfo] property (https://pkg.go.dev/code.cloudfoundry.org/garden#ContainerInfo) will be used. The
ContainerInfo
will be mapped toobserver.Endpoint
ascontainer
type.Applications running in a container can be a copy from a docker image or an application build from the code with a buildpack.
By convention, buildpack apps "always" run on a port 8080 inside the container, which is mapped to external ports, depending on the PaaS configuration can be secured with mTLS, non secured at all, or both. The operators can pass the mTLS configuration to
prometheus_simple
receiver to define it.Docker containers have always the first exposed port as main application port, but is not required to be 8080. The port can be extracted from the port-mappings provided by Garden.
In any case, the port 61001 (inside the container) uses mTLS and it is always proxying the traffic to the main application port.
The text was updated successfully, but these errors were encountered: