kube: add target:: convenience field to Service

Change-Id: If69116d93b6074136a36d98973e1aa997e2ebbef
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1802
Reviewed-by: q3k <q3k@hackerspace.pl>
diff --git a/app/matrix/lib/media-repo.libsonnet b/app/matrix/lib/media-repo.libsonnet
index 7b7500f..4b079d8 100644
--- a/app/matrix/lib/media-repo.libsonnet
+++ b/app/matrix/lib/media-repo.libsonnet
@@ -115,7 +115,7 @@
     // Run //app/matrix/media-repo-proxy, if needed. This rewrites Host headers
     // from the homeserver's serving Host to the MXID hostname (which
     // matrix-media-repo expects).
-    // 
+    //
     // Currently we only are able to run one proxy for one homeserver config -
     // but we don't expect to have multiple homeservers per matrix-media-repo
     // any time soon.
@@ -158,10 +158,10 @@
     } else {},
 
     internalSvc: app.ns.Contain(kube.Service("media-repo-internal")) {
-        target_pod:: app.deployment.spec.template,
+        target:: app.deployment,
     },
 
     svc: if std.length(needProxying) > 0 then app.ns.Contain(kube.Service("media-repo")) {
-        target_pod:: app.proxies.deployment.spec.template,
+        target:: app.proxies.deployment,
     } else app.internalSvc,
 }