cdsreaper/cdsreaper.py [28:34]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def get_current_namespace():
    try:
        with open("/var/run/secrets/kubernetes.io/serviceaccount/namespace") as f:
            return f.read()
    except IOError as e:
        logger.debug("Could not open namespace secret file: {0}".format(e))
        return None
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



cdsresponder/k8s/k8utils.py [7:13]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def get_current_namespace():
    try:
        with open("/var/run/secrets/kubernetes.io/serviceaccount/namespace") as f:
            return f.read()
    except IOError as e:
        logger.debug("Could not open namespace secret file: {0}".format(e))
        return None
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



