Skip to content

Commit b493f27

Browse files
authored
Merge pull request #4698 from AndrewSirenko/kep-3751
KEP-3751: Update for milestone 1.31
2 parents 59b51f8 + e62baf2 commit b493f27

File tree

3 files changed

+71
-18
lines changed

3 files changed

+71
-18
lines changed

keps/prod-readiness/sig-storage/3751.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
# of http://git.k8s.io/enhancements/OWNERS_ALIASES
44
kep-number: 3751
55
alpha:
6-
approver: "@johnbelamaric"
6+
approver: "@johnbelamaric"
7+
beta:
8+
approver: "@johnbelamaric"

keps/sig-storage/3751-volume-attributes-class/README.md

Lines changed: 64 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
9292
- [ ] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
9393
- [ ] (R) Production readiness review completed
9494
- [ ] (R) Production readiness review approved
95-
- [ ] "Implementation History" section is up-to-date for milestone
96-
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
95+
- [X] "Implementation History" section is up-to-date for milestone
96+
- [X] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
9797
- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
9898

9999
[kubernetes.io]: https://kubernetes.io/
@@ -417,9 +417,9 @@ Please see session "Kubernetes API" above.
417417

418418
### 5. Add new operation metrics for ModifyVolume operations
419419

420-
Usage metrics:
420+
A. Count of bound/unbound PVCs per VolumeAttributesClass similar to [StorageClass](https://github.com/kubernetes/kubernetes/blob/666fc23fe4d6c84b1dde2b8d4ebf75fce466d338/pkg/controller/volume/persistentvolume/metrics/metrics.go#L98).
421421

422-
Count of pvcs per VolumeAttributesClass similar to [StorageClass](https://github.com/kubernetes/kubernetes/blob/666fc23fe4d6c84b1dde2b8d4ebf75fce466d338/pkg/controller/volume/persistentvolume/metrics/metrics.go#L98).
422+
Prior to this enhancement, we loop through all PersistentVolume objects, check if `pv.Status.Phase == v1.VolumeBound` and increment the appropriate `pv.Spec.StorageClassName` bucket. For these new metrics, when the feature flag is enabled, we also increment the appropriate `pv.Spec.VolumeAttributeClassName` if it is not empty.
423423

424424
```
425425
boundPVCCountDesc = metrics.NewDesc(
@@ -434,7 +434,13 @@ unboundPVCCountDesc = metrics.NewDesc(
434434
metrics.ALPHA, "")
435435
```
436436

437-
Operation metrics from [csiOperationsLatencyMetric](https://github.com/kubernetes-csi/csi-lib-utils/blob/597d128ce3a24d9e3fd5ff5b8d1ff4fd862e543a/metrics/metrics.go#LL250C6-L250C32) for the ModifyVolume operation.
437+
B. Operation metrics for ControllerModifyVolume
438+
439+
The metrics `controller_modify_volume_total` `controller_modify_volume_errors_total` can be used to issues in volume modification.
440+
441+
There are operation metrics from [csiOperationsLatencyMetric](https://github.com/kubernetes-csi/csi-lib-utils/blob/597d128ce3a24d9e3fd5ff5b8d1ff4fd862e543a/metrics/metrics.go#LL250C6-L250C32) for the ModifyVolume operation to report latencies.
442+
443+
Finally, CSI Driver Plugin maintainers can expose their own metrics.
438444

439445
## Design Details
440446

@@ -703,6 +709,9 @@ https://storage.googleapis.com/k8s-triage/index.html
703709

704710
- The behavior with feature gate and API turned on/off and mix match
705711
- The happy path with creating and modifying volume successfully with VolumeAttributesClass
712+
- [E2E CSI Test PR](https://github.com/kubernetes/kubernetes/pull/124151/)
713+
- [k8s-triage](https://storage.googleapis.com/k8s-triage/index.html?sig=storage&test=%5C%5BFeature%3AVolumeAttributesClass%5C%5D)
714+
- [Testgrid[(https://testgrid.k8s.io/sig-storage-kubernetes#kind-alpha-features&include-filter-by-regex=%5BFeature%3AVolumeAttributesClass%5D&include-filter-by-regex=%5BFeature%3AVolumeAttributesClass%5D&include-filter-by-regex=%5C%5BFeature%3AVolumeAttributesClass%5C%5D)
706715

707716
##### e2e tests
708717

@@ -724,10 +733,12 @@ We expect no non-infra related flakes in the last month as a GA graduation crite
724733
- Give a driver that does not ControllerModifyVolume, CSI volume should not be modified.
725734
- If ControllerModifyVolume fails, PVC should have appropriate events.
726735

736+
[API Conformance Test PR](https://github.com/kubernetes/kubernetes/pull/121849)
737+
727738
##### Stress tests
728739

729-
- VAC protection controller with large(define large later) lists of PVCs
730-
- Creating a large(define large later) amount of PVCs using the same VolumeAttributesClass
740+
- VAC protection controller with large lists of PVCs (2000)
741+
- Creating a large amount of PVCs (2000) using the same VolumeAttributesClass
731742

732743
### Graduation Criteria
733744

@@ -742,13 +753,13 @@ We expect no non-infra related flakes in the last month as a GA graduation crite
742753

743754
#### Beta
744755

745-
- Beta in 1.30: Since this feature is an extension of the external-resizer/external-provisioner usage flow, we are going to move this to beta with enhanced e2e and test coverage. Test cases are covered in sessions above: ``e2e tests``, ``Integration tests`` etc.
756+
- Beta in 1.31: Since this feature is an extension of the external-resizer/external-provisioner usage flow, we are going to move this to beta with enhanced e2e and test coverage. Test cases are covered in sessions above: ``e2e tests``, ``Integration tests`` etc. Controllers will handle VolumeAttributeClass feature gates being on by default, but beta API itself being disabled on cluster by default.
746757
- Involve 3 different CSI drivers to participate in testing
747758
- Stress test before GA
748759

749760
#### GA
750761

751-
- GA in 1.31, all major issues in the issue board should be fixed before GA.
762+
- GA in 1.3x, all major issues in the issue board should be fixed before GA.
752763
- No users complaining about the new behavior
753764

754765
### Upgrade / Downgrade Strategy
@@ -821,7 +832,7 @@ A metric `controller_modify_volume_errors_total` will indicate a problem with th
821832

822833
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
823834

824-
Upgrade and rollback will be tested when the feature gate will change to beta.
835+
TODO Upgrade and rollback will be tested when the feature gate will change to beta.
825836

826837
###### Is the rollout accompanied by any deprecations and/or removals of features, APIs, fields of API types, flags, etc.?
827838

@@ -838,7 +849,7 @@ count of successful and failed ControllerModifyVolume.
838849

839850
By inspecting a `controller_modify_volume_total` metric value. If the counter
840851
is increasing while letting PVCs being updated retroactively the feature is enabled. And at the same time if
841-
`controller_modify_volume_total` counter does not increase the feature
852+
`controller_modify_volume_errors_total` counter does not increase the feature
842853
works as expected.
843854

844855
###### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
@@ -858,9 +869,12 @@ These goals will help you determine what you need to measure (SLIs) in the next
858869
question.
859870
-->
860871

872+
- Ratio of `controller_modify_volume_errors_total`/`controller_modify_volume_total` <= 1%. (Exclude errors with `UNAVAILABLE` code which indicate some quota has been exhausted.)
873+
- CreateVolume `csi_sidecar_operations_seconds_sum` does not increase by more than 5% when feature flags are enabled.
874+
861875
###### What are the SLIs (Service Level Indicators) an operator can use to determine the health of the service?
862876

863-
- [ ] Metrics
877+
- [X] Metrics
864878
- Metric name: `controller_modify_volume_total` and `controller_modify_volume_errors_total`
865879
- [Optional] Aggregation method:
866880
- Components exposing the metric: external-resizer
@@ -871,6 +885,7 @@ question.
871885
Describe the metrics themselves and the reasons why they weren't added (e.g., cost,
872886
implementation difficulties, etc.).
873887
-->
888+
No.
874889

875890
### Dependencies
876891

@@ -880,7 +895,7 @@ This section must be completed when targeting beta to a release.
880895

881896
###### Does this feature depend on any specific services running in the cluster?
882897

883-
external-provisioner, external-resizer.
898+
external-provisioner, external-resizer.
884899

885900
### Scalability
886901

@@ -923,6 +938,11 @@ Yes, the feature may impact CreateVolume. We will measure this impact during bet
923938

924939
###### Will enabling / using this feature result in non-negligible increase of resource usage (CPU, RAM, disk, IO, ...) in any components?
925940

941+
Using this feature may result in non-negligible increase of resource usage IF customers batch modify many volumes at once and CSI Controller Pod has high API Priority.
942+
- external-resizer CPU and memory will see a non-negligible increase if users increased the number of concurrent operations via the `--workers` flag. We follow the strategy of sharing that limit between `ControllerExpandVolume` and `ControllerModifyVolume` RPCs, similar to how external-provisioner functions.
943+
- The API-Server may see a spike of CPU when processing relevant changes.
944+
945+
Stress tests will determine increase in resource usage at varying amounts of concurrent volume modifications.
926946

927947
### Troubleshooting
928948

@@ -939,6 +959,15 @@ details). For now, we leave it here.
939959

940960
###### How does this feature react if the API server and/or etcd is unavailable?
941961

962+
No change from today's volume provisioning workflow if API Server / etcd are unavailable.
963+
964+
If API server and/or etcd is unavailable, there are two scenarios for volume modification workflow
965+
966+
1. External-resizer detects volume needing modification before API Server is made unavailable. Calls ControllerModifyVolume. Cloud provider will modify volume, report success to external resizer. External-resizer will be unable to update PVC object until API Server back online. Error will be logged.
967+
968+
2. External-resizer does NOT detect volume needing modification before API Server is made unavailable. Volume modification will not take place until API Server back online.
969+
970+
In both cases the PVC has not been updated to reflect new VolumeAttributeClass until API Server back online.
942971

943972
###### What are other known failure modes?
944973

@@ -955,9 +984,21 @@ For each of them, fill in the following information by copying the below templat
955984
Not required until feature graduated to beta.
956985
- Testing: Are there any tests for failure mode? If not, describe why.
957986
-->
987+
-->
988+
- ControllerModifyVolume cannot modify volume to reflect new VolumeAttributeClass due to user misconfiguration or cloudprovider backend error/limits. Volume would fall back to workable default configuration but external-resizer will requeue with longer `Infeasible` interval.
989+
- Detection: See event on PVC object. See increase in `controller_modify_volume_errors_total`
990+
- Mitigations: No serious mitigation needed because volume would fall back to previous configuration. Can edit PVC to previous VolumeAttributeClass to prevent retry ControllerModifyVolume calls.
991+
- Diagnostics:
992+
- Events on PVC which include the associated [ControllerModifyVolume error](https://github.com/container-storage-interface/spec/blob/master/spec.md#controllermodifyvolume-errors) and message
993+
- external-resizer container logs: Logs similar to "ModifyVolume failed..." (At Log Levels 2&3)
994+
- Testing: Are there any tests for failure mode? If not, describe why.
995+
- There are tests to that validate appropriate events/errors propagate. Otherwise
996+
- Note: See [Modify Design](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/3751-volume-attributes-class#modify-pvc) to see flow.
997+
958998

959999
###### What steps should be taken if SLOs are not being met to determine the problem?
9601000

1001+
When SLOs are not being met, PVC events should be observed. Debug level logging should be enabled on the appropriate containers (external-resizer for volume modifications, external-provisioner for volume creations, relevant CSI Driver plugin). If problem is not determined from PVC events, operator must look at debug logs to narrow problem to CSI Driver plugin or external sidecars. It may be helpful to see if volume was modified on storage backend. If problem is in CSI Driver plugin, must reach out to CSI Driver maintainers. Storage admin can requested for help finding root cause.
9611002

9621003
## Implementation History
9631004

@@ -971,6 +1012,16 @@ Major milestones might include:
9711012
- the version of Kubernetes where the KEP graduated to general availability
9721013
- when the KEP was retired or superseded
9731014
-->
1015+
- 2023-06-15 SIG Acceptance of KEP and Agreement on proposed Volume Attributes Class design ([link](https://github.com/kubernetes/enhancements/commit/8929cf618f056e447d0b2bed562af3fc134c8cbb))
1016+
- 2023-06-26 Original demo of VolumeAttributeClass proof-of-concept
1017+
- 2023-10-31 VolumeAttributesClass API changes merged in kubernetes/kubernetes
1018+
- 2023-10-26 Implementation merged in kubernetes-csi/external-provisioner
1019+
- 2023-11-09 Implementation merged in kubernetes-csi/external-resizer
1020+
- First available release: Alpha in Kubernetes 1.29
1021+
1022+
Implementations in CSI Drivers:
1023+
- [AWS EBS CSI Driver](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/a402256d03ab3008f642e70253acb4b41d674af0/pkg/driver/controller.go#L581)
1024+
9741025

9751026
## Drawbacks
9761027

keps/sig-storage/3751-volume-attributes-class/kep.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ see-also:
1818
replaces:
1919

2020
# The target maturity stage in the current dev cycle for this KEP.
21-
stage: alpha
21+
stage: beta
2222

2323
# The most recent milestone for which work toward delivery of this KEP has been
2424
# done. This can be the current (upcoming) milestone, if it is being actively
2525
# worked on.
26-
latest-milestone: "1.30"
26+
latest-milestone: "1.31"
2727

2828
# The milestone at which this feature was, or is targeted to be, at each stage.
2929
milestone:
3030
alpha: "v1.29"
31-
beta:
32-
stable:
31+
beta: "v1.31"
32+
stable:
3333

3434
# The following PRR answers are required at alpha release
3535
# List the feature gate name and the components for which it must be enabled

0 commit comments

Comments
 (0)