Skip to content

Commit

Permalink
Add example and integration test to show sharded kube-state-metrics (#…
Browse files Browse the repository at this point in the history
…1076)

* Add example and integration test to show sharded kube-state-metrics with multiple replicas

Signed-off-by: Pete Wall <[email protected]>

* Update alloy modules

Signed-off-by: Pete Wall <[email protected]>

* Update examples and test outputs

Signed-off-by: Pete Wall <[email protected]>

* Silence srderr and increase to five minutes

Signed-off-by: Pete Wall <[email protected]>

---------

Signed-off-by: Pete Wall <[email protected]>
  • Loading branch information
petewall authored Jan 9, 2025
1 parent 3ec6451 commit 19723cb
Show file tree
Hide file tree
Showing 41 changed files with 6,506 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ declare "kubernetes" {
optional = true
}

// kube state metrics service discovery for all of the pods
// kube state metrics service discovery for all of the endpoints
discovery.kubernetes "ksm" {
role = "service"
role = "endpoints"

selectors {
role = "service"
role = "endpoints"
field = string.join(coalesce(argument.field_selectors.value, []), ",")
label = string.join(coalesce(argument.label_selectors.value, ["app.kubernetes.io/name=kube-state-metrics"]), ",")
}
Expand All @@ -54,7 +54,7 @@ declare "kubernetes" {

// only keep targets with a matching port name
rule {
source_labels = ["__meta_kubernetes_service_port_name"]
source_labels = ["__meta_kubernetes_endpoint_port_name"]
regex = coalesce(argument.port_name.value, "http")
action = "keep"
}
Expand Down
8 changes: 4 additions & 4 deletions charts/k8s-monitoring/docs/examples/auth/oauth2/output.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions charts/k8s-monitoring/docs/examples/auth/sigv4/output.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions charts/k8s-monitoring/docs/examples/extra-rules/output.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions charts/k8s-monitoring/docs/examples/proxies/output.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 19723cb

Please sign in to comment.