Closed 2uasimojo closed 4 years ago
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: 2uasimojo
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Merging #20 into master will decrease coverage by
0.24%
. The diff coverage is84.14%
.
@@ Coverage Diff @@
## master #20 +/- ##
==========================================
- Coverage 74.19% 73.94% -0.25%
==========================================
Files 18 21 +3
Lines 620 664 +44
==========================================
+ Hits 460 491 +31
- Misses 153 166 +13
Partials 7 7
Impacted Files | Coverage Δ | |
---|---|---|
cmd/manager/main.go | 0.00% <0.00%> (ø) |
|
pkg/controller/statics/statics.go | 84.46% <ø> (ø) |
|
pkg/test/client.go | 47.36% <47.36%> (ø) |
|
pkg/apis/awsefs/v1alpha1/owner.go | 100.00% <100.00%> (ø) |
|
pkg/controller/sharedvolume/pv_ensurable.go | 100.00% <100.00%> (ø) |
|
pkg/controller/sharedvolume/pvc_ensurable.go | 100.00% <100.00%> (ø) |
|
...controller/sharedvolume/sharedvolume_controller.go | 83.33% <100.00%> (-2.96%) |
:arrow_down: |
pkg/controller/statics/statics_controller.go | 74.00% <100.00%> (+30.52%) |
:arrow_up: |
pkg/util/ensurable.go | 100.00% <100.00%> (ø) |
|
pkg/util/owner.go | 100.00% <100.00%> (ø) |
|
... and 3 more |
/hold the phone. I swear this worked when I tested it, but I shouldn't be able to make a SharedVolume (namespace-scoped) owner of a PV (cluster-scoped). Test again.
/hold cancel
Yeah, this works, even though it shouldn't. If I remove the OwnerReferences
from the PV, then delete the SV, the PV goes to Released
state, but doesn't get deleted. So it's clearly the OwnerReferences
that's doing it.
:man_shrugging:
I want these to merge in a particular order, so closing this one in favor of https://github.com/2uasimojo/aws-efs-operator/pull/4, which I'll repoint here once its predecessors merge.
By adding an OwnerReference to the SharedVolume to the PV and PVC it creates, kubernetes handles their deletion for us. This allows us to rip out a big chain of code, including:
Jira: OSD-4083 (sort of)