Switch the report master to use the new configuration.

Change-Id: If7aa4acdb641f1b8dbc4eafe30c6a2840d31c257
diff --git a/cobaltb.py b/cobaltb.py
index 3268379..86a86a0 100755
--- a/cobaltb.py
+++ b/cobaltb.py
@@ -644,6 +644,7 @@
         args.bigtable_instance_id,
         args.report_master_static_ip,
         version,
+        args.report_master_update_repo_url,
         enable_report_scheduling=_parse_bool(
             args.report_master_enable_scheduling))
   else:
@@ -887,6 +888,13 @@
       help=('When starting the ReportMaster, should the ReportMaster run all '
             'reports automatically on a schedule? Default=%s.' %
             default_report_master_enable_scheduling))
+  parser.add_argument('--report_master_update_repo_url',
+      help='URL to a git repository containing a cobalt configuration in '
+           'its master branch. If this flag is set, the configuration of '
+           'report master will be updated by pulling from the specified '
+           'repository before scheduled reports are run. '
+           '(e.g. "https://cobalt-analytics.googlesource.com/config/")',
+      default=cluster_settings['report_master_update_repo_url'])
   default_shuffler_use_memstore = _default_shuffler_use_memstore(
       cluster_settings)
   parser.add_argument('--shuffler-use-memstore',
@@ -948,6 +956,7 @@
     'report_master_preferred_address': '',
     'report_master_root_certs': '',
     'report_master_static_ip' : '',
+    'report_master_update_repo_url': '',
     'shuffler_config_file': '',
     'shuffler_preferred_address': '',
     'shuffler_root_certs': '',
diff --git a/kubernetes/report_master/report_master_deployment.yaml b/kubernetes/report_master/report_master_deployment.yaml
index c0f5785..e1e0e46 100644
--- a/kubernetes/report_master/report_master_deployment.yaml
+++ b/kubernetes/report_master/report_master_deployment.yaml
@@ -64,10 +64,16 @@
           - $$BIGTABLE_PROJECT_NAME$$
           - '-bigtable_instance_id'
           - $$BIGTABLE_INSTANCE_ID$$
-          - '-cobalt_config_dir'
-          # This path must match the path to where the config files are copied
-          # in Dockerfile.
-          - '/etc/cobalt'
+          - '-cobalt_config_proto_path'
+          # This path must match the path to where the binproto config file is
+          # copied in Dockerfile.
+          - '/etc/cobalt/cobalt_config.binproto'
+          - '-config_parser_bin_path'
+          # This path must match the path to where the config parser binary is
+          # copied in Dockerfile.
+          - '/usr/local/bin/config_parser'
+          - '-config_update_repository_url'
+          - '"$$REPORT_MASTER_CONFIG_UPDATE_REPO_URL$$"'
           - $$REPORT_MASTER_ENABLE_REPORT_SCHEDULING_FLAG$$
           # This configures the AuthEnforcer.
           - '-googlers_only'
diff --git a/third_party/config b/third_party/config
index 6fd3efb..f6f4e0e 160000
--- a/third_party/config
+++ b/third_party/config
@@ -1 +1 @@
-Subproject commit 6fd3efb9bec09548cedc46e9251a74cd031dff6e
+Subproject commit f6f4e0e5d0d236f29a2a99099ff745c32ff08cc5
diff --git a/tools/container_util.py b/tools/container_util.py
index b9b5960..f05c777 100755
--- a/tools/container_util.py
+++ b/tools/container_util.py
@@ -485,6 +485,7 @@
                         bigtable_instance_id,
                         static_ip_address,
                         docker_tag,
+                        update_repo_url,
                         enable_report_scheduling=False):
   """ Starts the report-master deployment and service.
   cloud_project_prefix {string}: For example "google.com"
@@ -497,6 +498,11 @@
       reserved on the GKE cluster.
   docker_tag {string}: The docker_tag of the docker image to use. If none is
     provided, latest will be used.
+  update_repo_url {string}: URL to a git repository containing a cobalt
+    configuration in its master branch. If this arg is not empty, the
+    configuration of report master will be updated by pulling from the specified
+    repository before scheduled reports are run.
+    (e.g. "https://cobalt-analytics.googlesource.com/config/")
   enable_report_scheduling {bool}: Should report scheduling be enabled?
   """
   image_uri = _image_registry_uri(cloud_project_prefix, cloud_project_name,
@@ -537,6 +543,7 @@
       '$$ENDPOINT_CONFIG_ID$$': endpoint_config_id,
       '$$REPORT_MASTER_CERTIFICATE_SECRET_NAME$$':
       REPORT_MASTER_CERTIFICATE_SECRET_NAME,
+      '$$REPORT_MASTER_CONFIG_UPDATE_REPO_URL$$': update_repo_url,
       '$$REPORT_MASTER_GCS_SERVICE_ACCOUNT_SECRET_NAME$$':
       REPORT_MASTER_GCS_SERVICE_ACCOUNT_SECRET_NAME}
   _start_gke_service(REPORT_MASTER_DEPLOYMENT_TEMPLATE_FILE,