Skip to content

Commit

Permalink
Update statefulset autodelete beta to 1.25
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcary committed Jun 9, 2022
1 parent 17f615e commit be3526d
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 7 deletions.
64 changes: 60 additions & 4 deletions keps/sig-apps/1847-autoremove-statefulset-pvcs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
- [Mutating <code>PersistentVolumeClaimRetentionPolicy</code>](#mutating-)
- [Cluster role change for statefulset controller](#cluster-role-change-for-statefulset-controller)
- [Test Plan](#test-plan)
- [Integration tests](#integration-tests)
- [e2e tests](#e2e-tests)
- [Unit tests](#unit-tests)
- [e2e/integration tests](#e2eintegration-tests)
- [Upgrade/downgrade &amp; feature enabled/disable tests](#upgradedowngrade--feature-enableddisable-tests)
- [Graduation Criteria](#graduation-criteria)
- [Alpha release](#alpha-release)
- [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
Expand Down Expand Up @@ -305,9 +310,56 @@ In order to update the PVC ownerReference, the `buildControllerRoles` will be up

### Test Plan

1. Unit tests
[X] I/we understand the owners of the involved components may require updates to
existing tests to make this code solid enough prior to committing the changes necessary
to implement this enhancement.

##### Integration tests

<!--
This question should be filled when targeting a release.
For Alpha, describe what tests will be added to ensure proper quality of the enhancement.
For Beta and GA, add links to added tests together with links to k8s-triage for those tests:
https://storage.googleapis.com/k8s-triage/index.html
-->

- <test>: <link to test coverage>

##### e2e tests

<!--
This question should be filled when targeting a release.
For Alpha, describe what tests will be added to ensure proper quality of the enhancement.
For Beta and GA, add links to added tests together with links to k8s-triage for those tests:
https://storage.googleapis.com/k8s-triage/index.html
We expect no non-infra related flakes in the last month as a GA graduation criteria.
-->

- <test>: <link to test coverage>


#### Unit tests

In `pkg/controller/statefulset/`,

- `TestStatefulPodControlUpdatePodClaimForRetentionPolicy`
- `TestStatefulPodControlRetainDeletionPolicyUpdate`
- `TestStatefulPodControlRetentionPolicyUpdate`
- `TestStatefulPodControlRetentionPolicyUpdateMissingClaims`
- `TestOrphanedPodsWithPVCDeletePolicy`
- `TestStaleOwnerRefOnScaleup`
- `stateful_set_control_test`
- Added `runTestOverPVCRetentionPolicies` to augment existing tests with
coverage for retention policies.
- `checkClaimInvarients` extended to test new feature.

##### e2e/integration tests

Tests added to `test/e2e/apps/statefulset.go`.

1. e2e/integration tests
- With `Delete` policies for `whenScaled` and `whenDeleted`
1. Create 2 pod statefulset, scale to 1 pod, confirm PVC deleted
1. Create 2 pod statefulset, add data to PVs, scale to 1 pod, scale back to 2, confirm PV empty.
Expand All @@ -330,13 +382,17 @@ In order to update the PVC ownerReference, the `buildControllerRoles` will be up
- Pod restart tests:
1. Create statefulset, perform rolling update, confirm PVC data still exists.
- `--casecade=false` tests.
1. Upgrade/Downgrade tests

##### Upgrade/downgrade & feature enabled/disable tests

Should be added as an e2e tests, but we have not figured out if there is a
mechanism to run upgrade/downgrade tests.

1. Create statefulset in previous version and upgrade to the version
supporting this feature. The PVCs should remain intact.
2. Downgrade to earlier version and check the PVCs with Retain
remain intact and the others with set policies before upgrade
gets deleted based on if the references were already set.
1. Feature disablement/enable test for alpha feature flag `statefulset-autodelete-pvcs`.


### Graduation Criteria
Expand Down
6 changes: 3 additions & 3 deletions keps/sig-apps/1847-autoremove-statefulset-pvcs/kep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ approvers:

stage: alpha

latest-milestone: "v1.23"
latest-milestone: "v1.25"

milestone:
alpha: "v1.23"
beta: "v1.24"
stable: "v1.25"
beta: "v1.25"
stable: "v1.27"

feature-gates:
- name: StatefulSetAutoDeletePVC
Expand Down

0 comments on commit be3526d

Please sign in to comment.