Replace secrets data by a new one

def _update_secret(namespace, name, data, apiserver_url):
    '''Replace secrets data by a new one'''
    # Prepare URL
    url = "{0}/api/v1/namespaces/{1}/secrets/{2}".format(apiserver_url,
                                                         namespace, name)
    # Prepare data
    data = [{"op": "replace", "path": "/data", "value": data}]
    # Make request
    ret = _kpatch(url, data)
    if ret.get("status") == 404:
        return "Node {0} doesn't exist".format(url)
    return ret