'Get the list of services from the kubelet API and store the label selector dicts.
The cache is to be invalidated by the user class by calling process_events'

def _fill_services_cache(self):

    if self._403_disable:
        return
    try:
        reply = self.kube.retrieve_json_auth((self.kube.kubernetes_api_url + '/services'))
        self._service_cache_selectors = defaultdict(dict)
        self._service_cache_names = {}
        for service in reply.get('items', []):
            uid = service.get('metadata', {}).get('uid', '')
            name = service.get('metadata', {}).get('name', '')
            selector = service.get('spec', {}).get('selector', {})
            if ((uid == '') or (len(selector) == 0)):
                continue
            self._service_cache_names[uid] = name
            self._service_cache_selectors[uid] = selector
        self._service_cache_invalidated = False
    except Exception as e:
        if (isinstance(e, requests.exceptions.HTTPError) and (e.response.status_code == 403)):
            log.warning('Unable    to    read    service    list    from    apiserver:    %s', e)
            self._403_errors += 1
            if (self._403_errors == MAX_403_RETRIES):
                log.error(('Disabling    kube_service    tagging    because    of    %d    failed    attempts.    All    other    kubernetes    features    will    continue    working.' % MAX_403_RETRIES))
                log.error('Please    allow    access    to    /v1/api/services    or    disable    the    collect_service_tags    option.')
                self._403_disable = True
        else:
            log.warning('Unable    to    read    service    list    from    apiserver:    %s', e)
        self._service_cache_selectors = defaultdict(dict)
        self._service_cache_names = {}
        self._service_cache_invalidated = False
