-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: promote StatefulSet metrics to STABLE and enhance docs #2783
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
base: main
Are you sure you want to change the base?
Changes from 7 commits
deb8273
fd61b08
b42f1c0
f37ce2a
2b0139d
bf43a47
6e306c4
d843208
61e72fb
0db5451
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ | |
"kube_statefulset_status_replicas_available", | ||
"The number of available replicas per StatefulSet.", | ||
metric.Gauge, | ||
basemetrics.ALPHA, | ||
basemetrics.STABLE, | ||
|
||
"", | ||
wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { | ||
return &metric.Family{ | ||
|
@@ -218,7 +218,7 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ | |
"kube_statefulset_persistentvolumeclaim_retention_policy", | ||
"Count of retention policy for StatefulSet template PVCs", | ||
metric.Gauge, | ||
basemetrics.ALPHA, | ||
basemetrics.STABLE, | ||
|
||
"", | ||
wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { | ||
|
@@ -245,7 +245,7 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ | |
descStatefulSetAnnotationsName, | ||
descStatefulSetAnnotationsHelp, | ||
metric.Gauge, | ||
basemetrics.ALPHA, | ||
basemetrics.STABLE, | ||
"", | ||
wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { | ||
if len(allowAnnotationsList) == 0 { | ||
|
@@ -325,7 +325,7 @@ func statefulSetMetricFamilies(allowAnnotationsList, allowLabelsList []string) [ | |
"kube_statefulset_deletion_timestamp", | ||
"Unix deletion timestamp", | ||
metric.Gauge, | ||
basemetrics.ALPHA, | ||
basemetrics.STABLE, | ||
"", | ||
wrapStatefulSetFunc(func(s *v1.StatefulSet) *metric.Family { | ||
ms := []*metric.Metric{} | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that you added some PromQL troubleshooting query examples under the metric definition. From my understanding, this file (docs/metrics/workload/statefulset-metrics.md) is meant to document the metrics themselves (type, labels, stability), not usage or example queries.
I think you should remove them.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thank you for the feedback.
I added the PromQL examples because I noticed the Pod metrics documentation (docs/metrics/workload/pod-metrics.md) includes similar usage examples and queries, and the main README mentions welcoming "sample usages" contributions.
I was trying to follow that same pattern for consistency. Please add your thoughts.
I'm happy to adjust based on what works best for the project!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nmn3m
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yasicar, You are right, thanks for mentioning that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nmn3m Thanks
This is my first contribution to kube-state-metrics, and I'd really appreciate your help completing this review.