         s = replace_all(s, "{#{k}}", "#{v}")
     #log('s = ', s)
     return s
+
+# split on whitespace
+split = (s) -> s.match(/\S+/g)
 
 run = (s, cb) ->
     log("running '#{s}'")

                z = projects[project_id] ?= {}
                changed = {}
                for field in FIELDS
                    if z[field] != x.new_val[field]
                        z[field] = x.new_val[field]
                        changed[field] = true
                if state == 'ready' and z['run'] and not changed.run and (changed.resources or changed.preemptible or changed.disk_size or changed.storage_ready)
                    # Currently running with no change to run state.
                    # Something changed which can be done via editing the deployment using kubectl
                    kubectl_update_project(project_id)

            headers = v
        else
            # New info
            project_id = project_id_from_labels(v[v.length-1])
            x = projects[project_id] ?= {}
            k = x.kubernetes_deployment_watch ?= {}
            for i in [0...v.length]
                k[headers[i]] = v[i]
            write_kubernetes_data_to_rethinkdb(project_id)
            reconcile(project_id)

