const PodPVCIndex … // PodPVCIndexFunc creates an index function that returns PVC keys (= // namespace/name) for given pod. This includes the PVCs // that might be created for generic ephemeral volumes. func PodPVCIndexFunc() func(obj interface{ … } // AddPodPVCIndexerIfNotPresent adds the PodPVCIndexFunc. func AddPodPVCIndexerIfNotPresent(indexer cache.Indexer) error { … } // AddIndexerIfNotPresent adds the index function with the name into the cache indexer if not present func AddIndexerIfNotPresent(indexer cache.Indexer, indexName string, indexFunc cache.IndexFunc) error { … }