statefulset: use pvc lister, replace legacylisters

Use a PVC lister instead of a client when retrieving PVCs.

Replace unit test's use of legacylisters with the generated listers.
This commit is contained in:
Andy Goldstein
2017-02-24 09:31:40 -05:00
parent 70a268528e
commit bd912f50ba
8 changed files with 82 additions and 58 deletions

View File

@@ -32,6 +32,7 @@ func startStatefulSetController(ctx ControllerContext) (bool, error) {
go statefulset.NewStatefulSetController(
ctx.NewInformerFactory.Core().V1().Pods(),
ctx.NewInformerFactory.Apps().V1beta1().StatefulSets(),
ctx.NewInformerFactory.Core().V1().PersistentVolumeClaims(),
ctx.ClientBuilder.ClientOrDie("statefulset-controller"),
).Run(1, ctx.Stop)
return true, nil