def METHOD_NAME(self, config_container, reconfigure=False, namespace_to_reconfigure=None):
    """Apply a configuration."""
    master_config_directives = [
        (self.update_state_watcher_config, "state_persistence"),
        (self.set_context_base, "command_context"),
        (node.NodePoolRepository.update_from_config, "nodes", "node_pools", "ssh_options",),
        (MesosClusterRepository.configure, "mesos_options"),
        (KubernetesClusterRepository.configure, "k8s_options"),
        (self.configure_eventbus, "eventbus_enabled"),
    ]
    master_config = config_container.get_master()
    apply_master_configuration(master_config_directives, master_config)
    self.state_watcher.watch(MesosClusterRepository)
    self.state_watcher.watch(KubernetesClusterRepository)
    # If the master namespace was updated, we should update jobs in all namespaces
    if namespace_to_reconfigure == MASTER_NAMESPACE:
        namespace_to_reconfigure = None
    # TODO: unify NOTIFY_STATE_CHANGE and simplify this
    self.job_graph = JobGraph(config_container)
    factory = self.build_job_scheduler_factory(master_config, self.job_graph)
    updated_jobs = self.jobs.update_from_config(
        config_container.get_jobs(), factory, reconfigure, namespace_to_reconfigure,
    )
    self.state_watcher.watch_all(updated_jobs, [Job.NOTIFY_STATE_CHANGE, Job.NOTIFY_NEW_RUN])