Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Argument reordering
Browse files Browse the repository at this point in the history
Nberezhnoy committed Jan 17, 2025
1 parent 44d6069 commit 2c839be
Showing 2 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions modules/kubernetes/core/README.md
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ Handles scraping and collecting kubelet [cAdvisor](https://github.com/google/cad

| Name | Required | Default | Description |
| :----------------------- | :------- | :----------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
| `kubernetes_api_address` | _no_ | `kubernetes.default.svc.cluster.local:443` | Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster |
| `forward_to` | _yes_ | `list(MetricsReceiver)` | Must be a where scraped should be forwarded to |
| `field_selectors` | _no_ | `["metadata.name=kubernetes"]` | The [field selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/) to use to find matching targets |
| `label_selectors` | _no_ | `[]` | The [label selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to use to find matching targets |
@@ -30,6 +29,7 @@ Handles scraping and collecting kubelet [cAdvisor](https://github.com/google/cad
| `scrape_timeout` | _no_ | `10s` | How long before a scrape times out |
| `max_cache_size` | _no_ | `100000` | The maximum number of elements to hold in the relabeling cache. This should be at least 2x-5x your largest scrape target or samples appended rate. |
| `clustering` | _no_ | `false` | Whether or not [clustering](https://grafana.com/docs/agent/latest/flow/concepts/clustering/) should be enabled |
| `kubernetes_api_address` | _no_ | `kubernetes.default.svc.cluster.local:443` | Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster |

#### Exports

@@ -92,7 +92,6 @@ Handles scraping and collecting [kubelet](https://kubernetes.io/docs/reference/i

| Name | Required | Default | Description |
| :----------------------- | :------- | :----------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
| `kubernetes_api_address` | _no_ | `kubernetes.default.svc.cluster.local:443` | Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster |
| `forward_to` | _yes_ | `list(MetricsReceiver)` | Must be a where scraped should be forwarded to |
| `field_selectors` | _no_ | `[]` | The [field selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/) to use to find matching targets |
| `label_selectors` | _no_ | `[]` | The [label selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to use to find matching targets |
@@ -103,6 +102,7 @@ Handles scraping and collecting [kubelet](https://kubernetes.io/docs/reference/i
| `scrape_timeout` | _no_ | `10s` | How long before a scrape times out |
| `max_cache_size` | _no_ | `100000` | The maximum number of elements to hold in the relabeling cache. This should be at least 2x-5x your largest scrape target or samples appended rate. |
| `clustering` | _no_ | `false` | Whether or not [clustering](https://grafana.com/docs/agent/latest/flow/concepts/clustering/) should be enabled |
| `kubernetes_api_address` | _no_ | `kubernetes.default.svc.cluster.local:443` | Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster |

#### Exports

@@ -169,7 +169,6 @@ Handles scraping and collecting Kubernetes Probe metrics from each worker in the

| Name | Required | Default | Description |
| :----------------------- | :------- | :----------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
| `kubernetes_api_address` | _no_ | `kubernetes.default.svc.cluster.local:443` | Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster |
| `forward_to` | _yes_ | `list(MetricsReceiver)` | Must be a where scraped should be forwarded to |
| `namespaces` | _no_ | `[]` | The namespaces to look for targets in, the default (`[]`) is all namespaces |
| `port_name` | _no_ | `https` | The of the port to scrape metrics from |
@@ -182,6 +181,7 @@ Handles scraping and collecting Kubernetes Probe metrics from each worker in the
| `scrape_timeout` | _no_ | `10s` | How long before a scrape times out |
| `max_cache_size` | _no_ | `100000` | The maximum number of elements to hold in the relabeling cache. This should be at least 2x-5x your largest scrape target or samples appended rate. |
| `clustering` | _no_ | `false` | Whether or not [clustering](https://grafana.com/docs/agent/latest/flow/concepts/clustering/) should be enabled |
| `kubernetes_api_address` | _no_ | `kubernetes.default.svc.cluster.local:443` | Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster |

#### Exports

32 changes: 16 additions & 16 deletions modules/kubernetes/core/metrics.alloy
Original file line number Diff line number Diff line change
@@ -8,10 +8,6 @@ Note: Every argument except for "forward_to" is optional, and does have a define
does not override the value passed in, where coalesce() will return the first non-null value.
*/
declare "cadvisor" {
argument "kubernetes_api_address" {
comment = "Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster (default: kubernetes.default.svc.cluster.local:443)"
optional = true
}
argument "forward_to" {
comment = "Must be a list(MetricsReceiver) where collected metrics should be forwarded to"
}
@@ -54,6 +50,10 @@ declare "cadvisor" {
comment = "Whether or not clustering should be enabled (default: false)"
optional = true
}
argument "kubernetes_api_address" {
comment = "Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster (default: kubernetes.default.svc.cluster.local:443)"
optional = true
}

export "output" {
value = discovery.relabel.cadvisor.output
@@ -231,10 +231,6 @@ declare "cadvisor" {
}

declare "resources" {
argument "kubernetes_api_address" {
comment = "Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster (default: kubernetes.default.svc.cluster.local:443)"
optional = true
}
argument "forward_to" {
comment = "Must be a list(MetricsReceiver) where collected metrics should be forwarded to"
}
@@ -277,6 +273,10 @@ declare "resources" {
comment = "Whether or not clustering should be enabled (default: false)"
optional = true
}
argument "kubernetes_api_address" {
comment = "Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster (default: kubernetes.default.svc.cluster.local:443)"
optional = true
}

export "output" {
value = discovery.relabel.resources.output
@@ -382,10 +382,6 @@ declare "resources" {
}

declare "kubelet" {
argument "kubernetes_api_address" {
comment = "Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster (default: kubernetes.default.svc.cluster.local:443)"
optional = true
}
argument "forward_to" {
comment = "Must be a list(MetricsReceiver) where collected metrics should be forwarded to"
}
@@ -428,6 +424,10 @@ declare "kubelet" {
comment = "Whether or not clustering should be enabled (default: false)"
optional = true
}
argument "kubernetes_api_address" {
comment = "Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster (default: kubernetes.default.svc.cluster.local:443)"
optional = true
}

export "output" {
value = discovery.relabel.kubelet.output
@@ -709,10 +709,6 @@ declare "apiserver" {
}

declare "probes" {
argument "kubernetes_api_address" {
comment = "Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster (default: kubernetes.default.svc.cluster.local:443)"
optional = true
}
argument "field_selectors" {
// Docs: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
comment = "The label selectors to use to find matching targets (default: [\"metadata.name=kubernetes\"])"
@@ -755,6 +751,10 @@ declare "probes" {
comment = "Whether or not clustering should be enabled (default: false)"
optional = true
}
argument "kubernetes_api_address" {
comment = "Fully Qualified Domain Name (FQDN) and port for the Kubernetes API service in Kubernetes cluster (default: kubernetes.default.svc.cluster.local:443)"
optional = true
}

export "output" {
value = discovery.relabel.probes.output

0 comments on commit 2c839be

Please sign in to comment.