Commit 436669e
fix(store/k8s): ListByDefinition matches Spec, not labels
Resources created directly via kubectl apply / manifest YAML don't
carry the blockstor.io/resource-definition label that the REST
handler stamps on its own creates. The label-only filter therefore
returned an empty list for those Resources, breaking:
- tests/e2e/* scripts that apply Resources via raw YAML
- any operator-managed Resource CRD landing through GitOps
Switch to listing all Resources and filtering on
Spec.ResourceDefinitionName in-process. Cluster Resource counts are
small enough that the in-process filter is the right tradeoff for
correctness.
Stand regression: ResourceDefinitionReconciler logged
`diskful: 0, diskless: 0` for an RD with 2 Resource CRDs because
ListByDefinition returned empty — fixed.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>1 parent aac380a commit 436669e
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
| 86 | + | |
81 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
82 | 92 | | |
83 | 93 | | |
84 | 94 | | |
| |||
0 commit comments