def METHOD_NAME(self, key: str, value: _t.Any) -> bool:
    """Set key with given value.
    Args:
        key: Key name.
        value: Value of the key.
    Returns:
        A boolean to mark whether config is set or not.
    """
    self._prepare_configmap()
    body = {
        "kind": "ConfigMap",
        "apiVersion": "v1",
        "metadata": {"name": self.settings["CN_CONFIG_KUBERNETES_CONFIGMAP"]},
        "data": {key: safe_value(value)},
    }
    ret = self.client.patch_namespaced_config_map(
        self.settings["CN_CONFIG_KUBERNETES_CONFIGMAP"],
        self.settings["CN_CONFIG_KUBERNETES_NAMESPACE"],
        body=body,
    )
    return bool(ret)