this.serviceSelectors = serviceSelectors;
}
public void init() {
String kubernetesMaster = Systems.getEnvVarOrSystemProperty("KUBERNETES_MASTER", "KUBERNETES_MASTER", null);
KubernetesFactory factory;
if (kubernetesMaster==null) {
factory = new KubernetesFactory("http://localhost:8585/");
} else {
factory = new KubernetesFactory(kubernetesMaster);
}
contextPathsCache = new ArrayList<String>();
client = new KubernetesClient(factory);
//for now simply check in with kubernetes every 5 seconds
//it'd be nice if kubernetes can callback into our cache.