|
1 |
| -<!-- |
2 |
| -**Note:** When your KEP is complete, all of these comment blocks should be removed. |
3 |
| -
|
4 |
| -To get started with this template: |
5 |
| -
|
6 |
| -- [ ] **Pick a hosting SIG.** |
7 |
| - Make sure that the problem space is something the SIG is interested in taking |
8 |
| - up. KEPs should not be checked in without a sponsoring SIG. |
9 |
| -- [ ] **Create an issue in kubernetes/enhancements** |
10 |
| - When filing an enhancement tracking issue, please ensure to complete all |
11 |
| - fields in that template. One of the fields asks for a link to the KEP. You |
12 |
| - can leave that blank until this KEP is filed, and then go back to the |
13 |
| - enhancement and add the link. |
14 |
| -- [ ] **Make a copy of this template directory.** |
15 |
| - Copy this template into the owning SIG's directory and name it |
16 |
| - `NNNN-short-descriptive-title`, where `NNNN` is the issue number (with no |
17 |
| - leading-zero padding) assigned to your enhancement above. |
18 |
| -- [ ] **Fill out as much of the kep.yaml file as you can.** |
19 |
| - At minimum, you should fill in the "title", "authors", "owning-sig", |
20 |
| - "status", and date-related fields. |
21 |
| -- [ ] **Fill out this file as best you can.** |
22 |
| - At minimum, you should fill in the "Summary", and "Motivation" sections. |
23 |
| - These should be easy if you've preflighted the idea of the KEP with the |
24 |
| - appropriate SIG(s). |
25 |
| -- [ ] **Create a PR for this KEP.** |
26 |
| - Assign it to people in the SIG that are sponsoring this process. |
27 |
| -- [ ] **Merge early and iterate.** |
28 |
| - Avoid getting hung up on specific details and instead aim to get the goals of |
29 |
| - the KEP clarified and merged quickly. The best way to do this is to just |
30 |
| - start with the high-level sections and fill out details incrementally in |
31 |
| - subsequent PRs. |
32 |
| -
|
33 |
| -Just because a KEP is merged does not mean it is complete or approved. Any KEP |
34 |
| -marked as a `provisional` is a working document and subject to change. You can |
35 |
| -denote sections that are under active debate as follows: |
36 |
| -
|
37 |
| -``` |
38 |
| -<<[UNRESOLVED optional short context or usernames ]>> |
39 |
| -Stuff that is being argued. |
40 |
| -<<[/UNRESOLVED]>> |
41 |
| -``` |
42 |
| -
|
43 |
| -When editing KEPS, aim for tightly-scoped, single-topic PRs to keep discussions |
44 |
| -focused. If you disagree with what is already in a document, open a new PR |
45 |
| -with suggested changes. |
46 |
| -
|
47 |
| -One KEP corresponds to one "feature" or "enhancement", for its whole lifecycle. |
48 |
| -You do not need a new KEP to move from beta to GA, for example. If there are |
49 |
| -new details that belong in the KEP, edit the KEP. Once a feature has become |
50 |
| -"implemented", major changes should get new KEPs. |
51 |
| -
|
52 |
| -The canonical place for the latest set of instructions (and the likely source |
53 |
| -of this file) is [here](/keps/NNNN-kep-template/README.md). |
54 |
| -
|
55 |
| -**Note:** Any PRs to move a KEP to `implementable` or significant changes once |
56 |
| -it is marked `implementable` must be approved by each of the KEP approvers. |
57 |
| -If any of those approvers is no longer appropriate than changes to that list |
58 |
| -should be approved by the remaining approvers and/or the owning SIG (or |
59 |
| -SIG Architecture for cross cutting KEPs). |
60 |
| ---> |
61 | 1 | # KEP-1698: generic ephemeral inline volumes
|
62 | 2 |
|
63 | 3 | <!-- toc -->
|
@@ -103,28 +43,14 @@ SIG Architecture for cross cutting KEPs).
|
103 | 43 |
|
104 | 44 | ## Release Signoff Checklist
|
105 | 45 |
|
106 |
| -<!-- |
107 |
| -**ACTION REQUIRED:** In order to merge code into a release, there must be an |
108 |
| -issue in [kubernetes/enhancements] referencing this KEP and targeting a release |
109 |
| -milestone **before the [Enhancement Freeze](https://git.k8s.io/sig-release/releases) |
110 |
| -of the targeted release**. |
111 |
| -
|
112 |
| -For enhancements that make changes to code or processes/procedures in core |
113 |
| -Kubernetes i.e., [kubernetes/kubernetes], we require the following Release |
114 |
| -Signoff checklist to be completed. |
115 |
| -
|
116 |
| -Check these off as they are completed for the Release Team to track. These |
117 |
| -checklist items _must_ be updated for the enhancement to be released. |
118 |
| ---> |
119 |
| - |
120 | 46 | Items marked with (R) are required *prior to targeting to a milestone / release*.
|
121 | 47 |
|
122 | 48 | - [X] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
|
123 |
| -- [ ] (R) KEP approvers have approved the KEP status as `implementable` |
124 |
| -- [ ] (R) Design details are appropriately documented |
125 |
| -- [ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input |
| 49 | +- [X] (R) KEP approvers have approved the KEP status as `implementable` |
| 50 | +- [X] (R) Design details are appropriately documented |
| 51 | +- [X] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input |
126 | 52 | - [X] (R) Graduation criteria is in place
|
127 |
| -- [ ] (R) Production readiness review completed |
| 53 | +- [X] (R) Production readiness review completed |
128 | 54 | - [ ] Production readiness review approved
|
129 | 55 | - [ ] "Implementation History" section is up-to-date for milestone
|
130 | 56 | - [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
|
@@ -445,10 +371,12 @@ automatically enable late binding for PVCs which are owned by a pod.
|
445 | 371 | - Gather feedback from developers and surveys
|
446 | 372 | - Errors emitted as pod events
|
447 | 373 | - Decide whether `CSIVolumeSource` (in beta at the moment) should be
|
448 |
| - merged with `EphemeralVolumeSource` |
| 374 | + merged with `EphemeralVolumeSource`: no, instead the goal is |
| 375 | + to [rename `CSIVolumeSource`](https://github.com/kubernetes/enhancements/issues/596#issuecomment-726185967) |
449 | 376 | - Decide whether in-tree ephemeral volume sources, like EmptyDir (GA
|
450 | 377 | already), should also be added EphemeralVolumeSource for sake of API
|
451 |
| - consistency |
| 378 | + consistency: [no](https://docs.google.com/document/d/1yAe3SPPosgC_QgmnY7oJTmZYWrqLrii1oA4de67DEcw/edit), |
| 379 | + this just causes API churn without tangible benefits |
452 | 380 | - Tests are in Testgrid and linked in KEP
|
453 | 381 |
|
454 | 382 | #### Beta -> GA Graduation
|
@@ -497,77 +425,173 @@ version will prevent pods from starting.
|
497 | 425 | Pods that got stuck will work again.
|
498 | 426 |
|
499 | 427 | * **Are there any tests for feature enablement/disablement?**
|
500 |
| - Yes, unit tests for the apiserver and kubelet. |
501 | 428 |
|
502 |
| -### Rollout, Upgrade and Rollback Planning |
| 429 | + Yes, unit tests for the apiserver, kube-controller-manager and kubelet cover scenarios |
| 430 | + where the feature is disabled or enabled. Tests for transitions |
| 431 | + between these states will be added before beta. |
503 | 432 |
|
504 |
| -Will be added before the transition to beta. |
| 433 | +### Rollout, Upgrade and Rollback Planning |
505 | 434 |
|
506 | 435 | * **How can a rollout fail? Can it impact already running workloads?**
|
507 | 436 |
|
| 437 | +A rollout could fail because the implementation turns out to be |
| 438 | +faulty. Such bugs may cause unexpected shutdowns of kube-scheduler, |
| 439 | +kube-apiserver, kube-controller-manager and kubelet. For the API |
| 440 | +server, broken support for the new volume type may also show up as 5xx |
| 441 | +error codes for any object that embeds a `VolumeSource` (Pod, |
| 442 | +StatefulSet, DaemonSet, etc.). |
| 443 | + |
| 444 | +Already running workloads should not be affected unless they depend on |
| 445 | +these components at runtime and bugs cause unexpected shutdowns. |
| 446 | + |
508 | 447 | * **What specific metrics should inform a rollback?**
|
509 | 448 |
|
| 449 | +One indicator are unexpected restarts of the cluster control plane |
| 450 | +components. Another are an increase in the number of pods that fail to |
| 451 | +start. In both cases further analysis of logs and pod events is needed |
| 452 | +to determine whether errors are related to this feature. |
| 453 | + |
510 | 454 | * **Were upgrade and rollback tested? Was upgrade->downgrade->upgrade path tested?**
|
511 | 455 |
|
| 456 | +Not yet, but will be done manually before transition to beta. |
| 457 | + |
512 | 458 | * **Is the rollout accompanied by any deprecations and/or removals of features,
|
513 | 459 | APIs, fields of API types, flags, etc.?**
|
514 | 460 |
|
515 |
| -### Monitoring requirements |
| 461 | +No. |
516 | 462 |
|
517 |
| -Will be added before the transition to beta. |
| 463 | +### Monitoring requirements |
518 | 464 |
|
519 | 465 | * **How can an operator determine if the feature is in use by workloads?**
|
520 | 466 |
|
| 467 | +There will be pods which have a non-nil |
| 468 | +`VolumeSource.Ephemeral.VolumeClaimTemplate`. |
| 469 | + |
| 470 | + |
521 | 471 | * **What are the SLIs (Service Level Indicators) an operator can use to
|
522 | 472 | determine the health of the service?**
|
523 | 473 |
|
| 474 | +The service here is the Kubernetes control plane. Overall health and |
| 475 | +performance can be observed by measuring the the pod creation rate for |
| 476 | +pods using generic ephemeral inline volumes. Such [a |
| 477 | +SLI](https://github.com/kubernetes/community/blob/master/sig-scalability/slos/pod_startup_latency.md) |
| 478 | +is defined for pods without volumes and work in progress for pods with |
| 479 | +volumes. |
| 480 | + |
| 481 | +For kube-controller-manager, a metric that exposes the usual work |
| 482 | +queue metrics data (like queue length) will be made available. |
| 483 | +Furthermore, a count of PVC creation attempts will be added, labeled |
| 484 | +with the result (successful vs. error code). A non-zero count of attempts |
| 485 | +with "already exists" will indicate that there were conflicts with |
| 486 | +manually created PVCs. |
| 487 | + |
| 488 | +TODO: list metrics names here and in kep.yaml |
| 489 | + |
524 | 490 | * **What are the reasonable SLOs (Service Level Objectives) for the above SLIs?**
|
525 | 491 |
|
| 492 | +The goal is to achieve the same pod creation rate for pods using |
| 493 | +generic ephemeral inline volumes as for pods that use PVCs which get |
| 494 | +created separately. To make this comparable, the storage class should |
| 495 | +use late binding. |
| 496 | + |
| 497 | +This will need further discussion before going to GA. |
| 498 | + |
526 | 499 | * **Are there any missing metrics that would be useful to have to improve
|
527 |
| - observability if this feature?** |
| 500 | + observability of this feature?** |
528 | 501 |
|
529 |
| -### Dependencies |
| 502 | +No. |
530 | 503 |
|
531 |
| -Will be added before the transition to beta. |
| 504 | +### Dependencies |
532 | 505 |
|
533 | 506 | * **Does this feature depend on any specific services running in the cluster?**
|
534 | 507 |
|
535 |
| -### Scalability |
| 508 | +A dynamic provisioner from some kind of storage system is needed: |
536 | 509 |
|
537 |
| -Will be added before the transition to beta. |
| 510 | + * Volume provisioner |
| 511 | + * Usage description: |
| 512 | + * Impact of its outage on the feature: pods that use generic inline volumes |
| 513 | + provided by the storage system will not be able to start |
| 514 | + * Impact of its degraded performance or high-error rates on the |
| 515 | + feature: slower pod startup |
| 516 | + |
| 517 | +### Scalability |
538 | 518 |
|
539 | 519 | * **Will enabling / using this feature result in any new API calls?**
|
540 | 520 |
|
| 521 | +Enabling will not change anything. |
| 522 | + |
| 523 | +Using the feature in a pod will lead to one PVC creation per inline |
| 524 | +volume, followed by garbage collection of those PVCs when the pod |
| 525 | +terminates. |
| 526 | + |
541 | 527 | * **Will enabling / using this feature result in introducing new API types?**
|
542 | 528 |
|
| 529 | +No. |
| 530 | + |
543 | 531 | * **Will enabling / using this feature result in any new calls to cloud
|
544 | 532 | provider?**
|
545 | 533 |
|
| 534 | +Enabling the feature doesn't. Using it will cause new calls to cloud |
| 535 | +providers, but the amount is exactly the same as without this feature: |
| 536 | +for each per-pod volume, a PVC has to be created (either manually or |
| 537 | +using this feature) and a volume needs to be provisioned in a storage |
| 538 | +backend. When a pod terminates, that volume needs to be deleted again. |
| 539 | + |
546 | 540 | * **Will enabling / using this feature result in increasing size or count
|
547 | 541 | of the existing API objects?**
|
548 | 542 |
|
| 543 | +Enabling it will not change existing objects. Using it in a pod spec |
| 544 | +will increase the size by one `PersistentVolumeClaimTemplate` per |
| 545 | +inline volume and cause one PVC to be created for each inline volume. |
| 546 | + |
549 | 547 | * **Will enabling / using this feature result in increasing time taken by any
|
550 | 548 | operations covered by [existing SLIs/SLOs][]?**
|
551 | 549 |
|
| 550 | +There is a SLI for [scheduling of pods without |
| 551 | +volumes](https://github.com/kubernetes/community/blob/master/sig-scalability/slos/pod_startup_latency.md) |
| 552 | +with a corresponding SLO. Those are not expected to be affected. |
| 553 | + |
| 554 | +A SLI for scheduling of pods with volumes is work in progress. The SLO |
| 555 | +for it will depend on the specific storage driver. |
| 556 | + |
552 | 557 | * **Will enabling / using this feature result in non-negligible increase of
|
553 | 558 | resource usage (CPU, RAM, disk, IO, ...) in any components?**
|
554 | 559 |
|
555 |
| -### Troubleshooting |
| 560 | +Potentially in kube-scheduler and kube-controller-manager, but mostly only if |
| 561 | +the feature is actually used. Merely enabling it will cause the new controller |
| 562 | +in kube-controller-manager to check new pods for the new volume type, which |
| 563 | +should be fast. In kube-scheduler the feature adds an additional case to |
| 564 | +switch statements that check for persistent volume sources. |
556 | 565 |
|
557 |
| -Will be added before the transition to beta. |
| 566 | +### Troubleshooting |
558 | 567 |
|
559 | 568 | * **How does this feature react if the API server and/or etcd is unavailable?**
|
560 | 569 |
|
| 570 | +Pods will not start and volumes for them will not get provisioned. |
| 571 | + |
561 | 572 | * **What are other known failure modes?**
|
562 | 573 |
|
| 574 | +As [explained |
| 575 | +above](#preventing-accidental-collision-with-existing-pvcs), the PVC |
| 576 | +that needs to be created for a pod may conflict with an already |
| 577 | +existing PVC that was created independently of the pod. In such a |
| 578 | +case, the pod will not be able to start until that independent PVC is |
| 579 | +deleted. This scenario will be exposed as events for the pod by |
| 580 | +kube-controller-manager. |
| 581 | + |
| 582 | +If the storage system fails to provision volumes, then this will be |
| 583 | +exposed as events for the PVC and (depending on the storage system) |
| 584 | +may also show up in metrics data. |
| 585 | + |
563 | 586 | * **What steps should be taken if SLOs are not being met to determine the problem?**
|
564 | 587 |
|
565 |
| -[supported limits]: https://git.k8s.io/community//sig-scalability/configs-and-limits/thresholds.md |
566 |
| -[existing SLIs/SLOs]: https://git.k8s.io/community/sig-scalability/slos/slos.md#kubernetes-slisslos |
| 588 | +SLOs only exist for pods which don't use the new feature. If those are |
| 589 | +somehow affected, then error messages in the kube-scheduler and kube-controller-manager |
| 590 | +output may provide additional information. |
567 | 591 |
|
568 | 592 | ## Implementation History
|
569 | 593 |
|
570 |
| -- Kubernetes 1.19: alpha (tentative) |
| 594 | +- Kubernetes 1.19: alpha |
571 | 595 |
|
572 | 596 | ## Drawbacks
|
573 | 597 |
|
|
0 commit comments