Skip to content

Commit 00dcf12

Browse files
committed
graduate RetroactiveDefaultStorageClass feature to GA in 1.28
1 parent d002048 commit 00dcf12

File tree

3 files changed

+166
-6
lines changed

3 files changed

+166
-6
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ alpha:
33
approver: "@wojtek-t"
44
beta:
55
approver: "@wojtek-t"
6+
stable:
7+
approver: "@wojtek-t"

keps/sig-storage/3333-retroactive-default-storage-class/README.md

Lines changed: 160 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,161 @@ will indicate a problem with the feature.
393393

394394
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
395395

396-
Upgrade and rollback will be tested when the feature gate will change to beta.
396+
Rollout-rollback-rollout testing was performed, feature behaves as expected and no issues were observed.
397+
398+
**Perform pre-upgrade tests**
399+
400+
Set default storage class:
401+
```bash
402+
$ kc patch sc/csi-hostpath-sc -p '{"metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
403+
storageclass.storage.k8s.io/csi-hostpath-sc patched
404+
```
405+
406+
PVC does not get updated and remains pending:
407+
```bash
408+
$ kc get pvc
409+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
410+
csi-pvc Pending
411+
```
412+
413+
**Upgrade cluster**
414+
415+
Check available 1.25 versions:
416+
```bash
417+
$ yum search kubeadm --showduplicates --quiet | grep 1.25
418+
kubeadm-1.25.0-0.x86_64 : Command-line utility for administering a Kubernetes cluster.
419+
kubeadm-1.25.1-0.x86_64 : Command-line utility for administering a Kubernetes cluster.
420+
kubeadm-1.25.2-0.x86_64 : Command-line utility for administering a Kubernetes cluster.
421+
```
422+
423+
Install/update kubeadm:
424+
```bash
425+
$ sudo yum install -y kubeadm-1.25.2-0
426+
```
427+
428+
Prepare kubeadm config file that enables FeatureGate:
429+
430+
```bash
431+
$ cat /mnt/clusterconf-examples/featuregate.yaml
432+
## Example kubeadm configuration for enabling a feature gate.
433+
---
434+
apiVersion: kubeadm.k8s.io/v1beta3
435+
kind: ClusterConfiguration
436+
apiServer:
437+
extraArgs:
438+
feature-gates: RetroactiveDefaultStorageClass=true
439+
controllerManager:
440+
extraArgs:
441+
cluster-cidr: 10.244.0.0/16
442+
feature-gates: RetroactiveDefaultStorageClass=true
443+
```
444+
445+
Perform kubeadm upgrade:
446+
```bash
447+
$ sudo kubeadm upgrade plan --config /mnt/clusterconf-examples/featuregate.yaml
448+
$ sudo kubeadm upgrade apply --config /mnt/clusterconf-examples/featuregate.yaml v1.25.2
449+
```
450+
451+
Perform kubelet upgrade:
452+
```bash
453+
$ sudo yum install -y kubelet-1.25.2-0
454+
$ sudo systemctl daemon-reload
455+
$ sudo systemctl restart kubelet
456+
```
457+
458+
**Perform post-upgrade tests**
459+
460+
Verify that PVC got SC assigned right after upgrade and PV was provisioned and bound:
461+
```bash
462+
$ kc get pvc
463+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
464+
csi-pvc Bound pvc-06a964ca-f997-4780-8627-b5c3bf5a87d8 1Gi RWO csi-hostpath-sc 87m
465+
466+
```
467+
468+
**Downgrade cluster**
469+
470+
```bash
471+
$ yum history | grep -E "kubeadm|kubelet"
472+
10 | install -y kubelet-1.25.2-0 | 2022-10-12 11:06 | Upgrade | 1
473+
8 | install -y kubeadm-1.25.2-0 | 2022-10-12 09:45 | Upgrade | 1
474+
7 | install -y kubelet-1.24.5-0 kubeadm-1.24.5-0 kubectl
475+
476+
$ sudo yum -y history undo 8 && sudo yum -y history undo 10
477+
```
478+
479+
**Perform post-rollback tests**
480+
481+
Remove default SC:
482+
```bash
483+
$ kc patch sc/csi-hostpath-sc -p '{"metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
484+
storageclass.storage.k8s.io/csi-hostpath-sc patched
485+
```
486+
487+
Create new PVC without SC:
488+
```yaml
489+
apiVersion: v1
490+
kind: PersistentVolumeClaim
491+
metadata:
492+
name: csi-pvc-2
493+
spec:
494+
accessModes:
495+
- ReadWriteOnce
496+
resources:
497+
requests:
498+
storage: 1Gi
499+
```
500+
501+
```bash
502+
$ kc get pvc
503+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
504+
csi-pvc Bound pvc-06a964ca-f997-4780-8627-b5c3bf5a87d8 1Gi RWO csi-hostpath-sc 96m
505+
csi-pvc-2 Pending
506+
```
507+
508+
Add default SC again:
509+
```bash
510+
$ kc patch sc/csi-hostpath-sc -p '{"metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
511+
storageclass.storage.k8s.io/csi-hostpath-sc patched
512+
```
513+
514+
Verify that the new PVC did not get updated with SC this time:
515+
```bash
516+
$ kc get pvc/csi-pvc-2
517+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
518+
csi-pvc-2 Pending
519+
```
520+
521+
**Upgrade cluster again**
522+
523+
Install/update kubeadm:
524+
```bash
525+
$ sudo yum install -y kubeadm-1.25.2-0
526+
```
527+
528+
Perform kubeadm upgrade:
529+
```bash
530+
$ sudo kubeadm upgrade plan --config /mnt/clusterconf-examples/featuregate.yaml
531+
$ sudo kubeadm upgrade apply --config /mnt/clusterconf-examples/featuregate.yaml v1.25.2
532+
```
533+
534+
Perform kubelet upgrade:
535+
```bash
536+
$ sudo yum install -y kubelet-1.25.2-0
537+
$ sudo systemctl daemon-reload
538+
$ sudo systemctl restart kubelet
539+
```
540+
541+
**Perform post-upgrade tests again**
542+
543+
Verify that PVC got SC assigned right after upgrade and PV was provisioned and bound:
544+
```bash
545+
$ kc get pvc
546+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
547+
csi-pvc Bound pvc-06a964ca-f997-4780-8627-b5c3bf5a87d8 1Gi RWO csi-hostpath-sc 117m
548+
csi-pvc-2 Bound pvc-2e765394-f32c-42fb-b3db-ffe203612bac 1Gi RWO csi-hostpath-sc 24m
549+
```
550+
397551

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

@@ -403,8 +557,10 @@ No.
403557

404558
###### How can an operator determine if the feature is in use by workloads?
405559

406-
A counter metric will be present in KCM metric endpoint, it will show total
407-
count of successful and failed retroactive StorageClass assignments.
560+
A counter metric called `retroactive_storageclass_total` will be present in KCM metric endpoint, it will show total
561+
count of retroactive StorageClass assignment attempts. Second metric called `retroactive_storageclass_errors_total`
562+
will show total count of failed attempts. This means that a total number of successful assignments can be calculated as
563+
a difference of the two metrics.
408564

409565
###### How can someone using this feature know that it is working for their instance?
410566

@@ -581,6 +737,7 @@ Major milestones might include:
581737
-->
582738
- 1.25: initial version
583739
- 1.26: beta
740+
- 1.28: GA
584741

585742
## Drawbacks
586743

keps/sig-storage/3333-retroactive-default-storage-class/kep.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ reviewers:
1010
- "@jsafrane"
1111
- "@xing-yang"
1212
approvers:
13-
- TBD
13+
- "@jsafrane"
14+
- "@xing-yang"
1415

1516
see-also:
1617
replaces:
1718

1819
# The target maturity stage in the current dev cycle for this KEP.
19-
stage: beta
20+
stage: stable
2021

2122
# The most recent milestone for which work toward delivery of this KEP has been
2223
# done. This can be the current (upcoming) milestone, if it is being actively
2324
# worked on.
24-
latest-milestone: "v1.26"
25+
latest-milestone: "v1.28"
2526

2627
# The milestone at which this feature was, or is targeted to be, at each stage.
2728
milestone:

0 commit comments

Comments
 (0)