Skip to content

Commit bbd2c09

Browse files
authored
Merge pull request kubernetes#2513 from pohly/generic-inline-volumes
generic ephemeral volumes: document metrics and tests
2 parents 0bcba80 + 808915b commit bbd2c09

File tree

2 files changed

+56
-17
lines changed

2 files changed

+56
-17
lines changed

keps/sig-storage/1698-generic-ephemeral-volumes/README.md

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -362,17 +362,20 @@ automatically enable late binding for PVCs which are owned by a pod.
362362

363363
### Test Plan
364364

365-
- Unit tests will be added for the API change.
366-
- Unit tests will cover the functionality of the controller, similar
365+
- Unit tests were added for the API change.
366+
- Unit tests cover the functionality of the controller, similar
367367
to
368368
https://github.com/kubernetes/kubernetes/blob/v1.18.2/pkg/controller/volume/persistentvolume/pv_controller_test.go.
369-
- Unit tests need to cover the positive case (feature enabled) as
369+
- Unit tests cover the positive case (feature enabled) as
370370
well as negative case (feature disabled or feature used incorrectly).
371-
- A new [storage test
372-
suite](https://github.com/kubernetes/kubernetes/blob/2b2cf8df303affd916bbeda8c2184b023f6ee53c/test/e2e/storage/testsuites/base.go#L84-L94)
373-
will be added which tests ephemeral volume creation, usage and deletion
374-
in combination with all drivers that support dynamic volume
375-
provisioning.
371+
- The ephemeral volume test [was
372+
extended](https://github.com/kubernetes/kubernetes/commit/2468a24b7a732fa492027a159ee15b6d31bf0577#diff-20517805986874f69e3254bed93d59996d5a6fd571a70ab8120736ded5aafa24)
373+
to also test generic ephemeral volumes in combination with all
374+
drivers that support dynamic volume provisioning. It currently runs
375+
as part of the
376+
[alpha-canary-on-master](https://k8s-testgrid.appspot.com/sig-storage-csi-ci#alpha-canary-on-master)
377+
Prow job. After the promotion to beta it will also be part of all
378+
`-on-1.21` jobs.
376379

377380
### Graduation Criteria
378381

@@ -489,13 +492,42 @@ is defined for pods without volumes and work in progress for pods with
489492
volumes.
490493

491494
For kube-controller-manager, a metric that exposes the usual work
492-
queue metrics data (like queue length) will be made available.
493-
Furthermore, a count of PVC creation attempts will be added, labeled
494-
with the result (successful vs. error code). A non-zero count of attempts
495-
with "already exists" will indicate that there were conflicts with
496-
manually created PVCs.
495+
queue metrics data (like queue length) will be made available with
496+
"ephemeral_volume" as name. Here is one example after processing a
497+
single pod with a generic ephemeral volume:
497498

498-
TODO: list metrics names here and in kep.yaml
499+
```
500+
workqueue_adds_total{name="ephemeral_volume"} 1
501+
workqueue_depth{name="ephemeral_volume"} 0
502+
workqueue_longest_running_processor_seconds{name="ephemeral_volume"} 0
503+
workqueue_queue_duration_seconds_bucket{name="ephemeral_volume",le="1e-08"} 0
504+
...
505+
workqueue_queue_duration_seconds_bucket{name="ephemeral_volume",le="9.999999999999999e-05"} 1
506+
workqueue_queue_duration_seconds_bucket{name="ephemeral_volume",le="0.001"} 1
507+
...
508+
workqueue_queue_duration_seconds_bucket{name="ephemeral_volume",le="+Inf"} 1
509+
workqueue_queue_duration_seconds_sum{name="ephemeral_volume"} 4.8201e-05
510+
workqueue_queue_duration_seconds_count{name="ephemeral_volume"} 1
511+
workqueue_retries_total{name="ephemeral_volume"} 0
512+
workqueue_unfinished_work_seconds{name="ephemeral_volume"} 0
513+
workqueue_work_duration_seconds_bucket{name="ephemeral_volume",le="1e-08"} 0
514+
...
515+
workqueue_work_duration_seconds_bucket{name="ephemeral_volume",le="0.1"} 1
516+
...
517+
workqueue_work_duration_seconds_bucket{name="ephemeral_volume",le="+Inf"} 1
518+
workqueue_work_duration_seconds_sum{name="ephemeral_volume"} 0.035308659
519+
workqueue_work_duration_seconds_count{name="ephemeral_volume"} 1
520+
```
521+
522+
Furthermore, counters of PVC creation attempts and failed attempts
523+
will be added. There should be no failures. If there are any, analyzing
524+
the logs of kube-controller manager will provide further insights into
525+
the reason why they occurred.
526+
527+
```
528+
ephemeral_volume_controller_create_total 1
529+
ephemeral_volume_controller_create_failures_total 0
530+
```
499531

500532
* **What are the reasonable SLOs (Service Level Objectives) for the above SLIs?**
501533

keps/sig-storage/1698-generic-ephemeral-volumes/kep.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ feature-gates:
2727
- kubelet
2828
disable-supported: true
2929

30-
# The following PRR answers are required at beta release
31-
#metrics:
32-
# - my_feature_metric
30+
metrics:
31+
- ephemeral_volume_controller_create_total
32+
- ephemeral_volume_controller_create_failures_total
33+
- workqueue_adds_total (name="ephemeral_volume")
34+
- workqueue_depth (name="ephemeral_volume")
35+
- workqueue_longest_running_processor_seconds (name="ephemeral_volume")
36+
- workqueue_queue_duration_seconds (name="ephemeral_volume")
37+
- workqueue_retries_total (name="ephemeral_volume")
38+
- workqueue_unfinished_work_seconds (name="ephemeral_volume")
39+
- workqueue_work_duration_seconds (name="ephemeral_volume")

0 commit comments

Comments
 (0)