                    :repo repo-name
                    :ref branch-name
                    :path (-> conf :k8s :service)})
-        app (str repo-name "-" branch-name)]
+        app (->app job)]
     (-> service
         (assoc-in [:metadata :name] app)
         (assoc-in [:spec :selector :app] app))))

                      :repo repo-name
                      :ref branch-name
                      :path (-> conf :k8s :deployment)})
        app (str repo-name "-" branch-name)]
    (-> deployment
        (assoc-in [:metadata :name] app)
        (assoc-in [:spec :template :metadata :labels :app] app)

(defn- prepare-ingress
  [{:keys [deploy-repository domain]}
   {:keys [conf build user-name repo-name branch-name] :as job}]
  (let [host (->host {:domain domain
                      :repo-name repo-name
                      :branch-name branch-name})
        service-name (->service-name job)
        ingress (deployrepo/get-ingress deploy-repository)
        spec (.getSpec ingress)
        tls (.getTls spec)
