Lookup pod by owner instead of label 52/3552/1
authorchengli3 <cheng1.li@intel.com>
Mon, 8 Jun 2020 03:10:21 +0000 (03:10 +0000)
committerchengli3 <cheng1.li@intel.com>
Mon, 8 Jun 2020 03:10:21 +0000 (03:10 +0000)
commit5a47d5cf362d734025c65b910faa117e6fb658c5
treea9158f42150b35f59d069d900ced5267f9618aac
parenta07e36bfe85541575e60697a9b9eb970dcaaef57
Lookup pod by owner instead of label

Currently, CNF is represented by deployment. It means that one CNF is
one deployment with special label name `SdewanPurpose`. We use
"Deployment" + "label" to identify a CNF.
To apply rules for CNF, we first need to find out the pods and then
extract the its IP address. It makes more sense to find pod by its owner
deployment/replicaset, than using the label match. Because the pod label
may not be the same with the deployment.

Signed-off-by: chengli3 <cheng1.li@intel.com>
Change-Id: I4174e502c7d50d48f47d61622380e57922b5cf32
platform/crd-ctrlr/src/cnfprovider/openprovider.go
platform/crd-ctrlr/src/main.go