Commit f88f1bf
committed
[TEP-0135] Revert PVC creation
Part of [tektoncd#6740] and unblocks [tektoncd#6635]. `PVCs` are created if a user specifies `VolumeClaimTemplate` as the source of a `pipelinerun workspace`.
Prior to this change, such `pvcs` are created via `affinity assistant statefulset` when `affinity assistant` is enabled (in both `workspaces` or `pipelineruns`
coschedule mode).
To delete such pvcs when the owning `pipelinerun` is completed, we must explicitly delete those pvcs in the reconciler since the owner of such pvcs is the `affinity assistant statefulset`
instead of the `pipelinerun`. The problem of such deletion mechanism is that such `pvcs` are left in `terminating` state when the owning `pipelinerun` is `completed` but not `deleted`.
This is because the pvcs are protected by `kubernetes.io/pvc-protection` `finalizer`, which does not allow the `pvcs` to be deleted until the `pipelinerun` consuming the `pvc` is deleted.
Leaving pvcs in `terminating` state is confusing to cluster operators. Instead of changing the pvc deletion behavior in such backward incompatible way,
it is better to make it configurable so that it is backward compatible, as prototyped in [tektoncd#6635].
This commit reverts the pvc creation behavior `per-workspace` coschedule mode, which changes the owner of the `pvcs` back to the `pipelinerun` instead of the
`affinity assistant statefulset`. After the commit, the pvcs created by specifying `VolumeClaimTemplate` are left in `bounded` state instead of `terminating`.
This commit is the prerequisite of [tektoncd#6635].
This commit does NOT reverts the pvc creation behavior `per-pipelinerun` coschedule mode as we will enforce the deletion of pvcs when the owning `pipelinerun` is completed.
This is a better practice and there is no backward compatability concern since `per-pipelinerun` coschedule mode is a new feature.
[tektoncd#6740]: tektoncd#6740
[tektoncd#6635]: tektoncd#66351 parent d2cb90d commit f88f1bf
File tree
4 files changed
+76
-66
lines changed- pkg/reconciler/pipelinerun
4 files changed
+76
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
| 101 | + | |
| 102 | + | |
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
| |||
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | 188 | | |
191 | 189 | | |
192 | 190 | | |
| |||
195 | 193 | | |
196 | 194 | | |
197 | 195 | | |
| 196 | + | |
198 | 197 | | |
199 | 198 | | |
200 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
212 | | - | |
213 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
214 | 221 | | |
215 | 222 | | |
216 | 223 | | |
217 | 224 | | |
218 | 225 | | |
219 | | - | |
220 | | - | |
221 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
222 | 236 | | |
223 | 237 | | |
224 | 238 | | |
| |||
642 | 656 | | |
643 | 657 | | |
644 | 658 | | |
645 | | - | |
646 | 659 | | |
647 | 660 | | |
648 | 661 | | |
649 | 662 | | |
650 | 663 | | |
651 | 664 | | |
652 | | - | |
653 | 665 | | |
654 | 666 | | |
655 | 667 | | |
| |||
667 | 679 | | |
668 | 680 | | |
669 | 681 | | |
| 682 | + | |
| 683 | + | |
670 | 684 | | |
671 | | - | |
672 | | - | |
| 685 | + | |
| 686 | + | |
673 | 687 | | |
674 | 688 | | |
675 | 689 | | |
| |||
692 | 706 | | |
693 | 707 | | |
694 | 708 | | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | 709 | | |
700 | 710 | | |
701 | 711 | | |
702 | | - | |
703 | 712 | | |
704 | 713 | | |
705 | 714 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
619 | 624 | | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
628 | 633 | | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
629 | 637 | | |
630 | 638 | | |
631 | 639 | | |
| |||
1049 | 1057 | | |
1050 | 1058 | | |
1051 | 1059 | | |
1052 | | - | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
1053 | 1066 | | |
1054 | 1067 | | |
1055 | 1068 | | |
| |||
1084 | 1097 | | |
1085 | 1098 | | |
1086 | 1099 | | |
1087 | | - | |
| 1100 | + | |
1088 | 1101 | | |
1089 | 1102 | | |
1090 | 1103 | | |
| |||
1098 | 1111 | | |
1099 | 1112 | | |
1100 | 1113 | | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
| 1114 | + | |
| 1115 | + | |
1104 | 1116 | | |
1105 | 1117 | | |
1106 | 1118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
7673 | 7674 | | |
7674 | 7675 | | |
7675 | 7676 | | |
7676 | | - | |
| 7677 | + | |
7677 | 7678 | | |
7678 | 7679 | | |
7679 | 7680 | | |
| |||
7687 | 7688 | | |
7688 | 7689 | | |
7689 | 7690 | | |
7690 | | - | |
| 7691 | + | |
7691 | 7692 | | |
7692 | 7693 | | |
| 7694 | + | |
7693 | 7695 | | |
7694 | 7696 | | |
7695 | 7697 | | |
| |||
7705 | 7707 | | |
7706 | 7708 | | |
7707 | 7709 | | |
7708 | | - | |
| 7710 | + | |
7709 | 7711 | | |
7710 | 7712 | | |
7711 | 7713 | | |
| |||
7718 | 7720 | | |
7719 | 7721 | | |
7720 | 7722 | | |
| 7723 | + | |
7721 | 7724 | | |
7722 | 7725 | | |
7723 | 7726 | | |
7724 | 7727 | | |
7725 | 7728 | | |
7726 | 7729 | | |
7727 | 7730 | | |
7728 | | - | |
7729 | | - | |
7730 | | - | |
7731 | | - | |
7732 | | - | |
7733 | | - | |
7734 | | - | |
7735 | | - | |
7736 | | - | |
7737 | | - | |
7738 | | - | |
7739 | | - | |
7740 | | - | |
7741 | | - | |
| 7731 | + | |
7742 | 7732 | | |
7743 | 7733 | | |
7744 | 7734 | | |
| |||
0 commit comments