kube: standardize on a `local ns` convention

A convention is introduced to specify the kube.Namespace object in a deployment as a `local ns` instead of an `ns:` or a `namespace:` for these reasons:

- non-cluster admins cannot create new namespaces, and we've been moving in the direction of specifying objects that require cluster admin permissions to apply (policies, role bindings) in //cluster/kube/k0 instead of in the app jsonnet
- namespace admins CAN delete the namespace, making `kubecfg delete` unexpectedly dangerous (especially if a namespace contains more than just the contents of the file being applied - common with personal namespaces)
- `.Contain()` is a common operation, and it shows up in lines that are pretty long, so `ns.Contain()` is preferable to `app.ns.Contain()` or `service.namespace.Contain()`

Change-Id: Ie4ea825376dbf6faa175179054f3ee3de2253ae0
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1804
Reviewed-by: q3k <q3k@hackerspace.pl>
diff --git a/devtools/issues/redmine.libsonnet b/devtools/issues/redmine.libsonnet
index 6af03bd..7ad0750 100644
--- a/devtools/issues/redmine.libsonnet
+++ b/devtools/issues/redmine.libsonnet
@@ -53,7 +53,7 @@
     # (ie. removes surrounding quotes)
     rubyYaml(obj, symbols):: std.foldr(function (symbol, str) std.strReplace(str, '"%s"' % symbol, symbol), symbols, std.manifestYamlDoc(obj)),
 
-    ns: kube.Namespace(app.cfg.namespace),
+    local ns = kube.Namespace(app.cfg.namespace),
 
     postgres: postgres {
         cfg+: {
@@ -66,7 +66,7 @@
         },
     },
 
-    deployment: app.ns.Contain(kube.Deployment("redmine")) {
+    deployment: ns.Contain(kube.Deployment("redmine")) {
         spec+: {
             replicas: 1,
             template+: {
@@ -126,17 +126,17 @@
         },
     },
 
-    svc: app.ns.Contain(kube.Service("redmine")) {
+    svc: ns.Contain(kube.Service("redmine")) {
         target:: app.deployment,
     },
 
-    ingress: app.ns.Contain(kube.SimpleIngress("redmine")) {
+    ingress: ns.Contain(kube.SimpleIngress("redmine")) {
         hosts:: [cfg.domain],
         target_service:: app.svc,
     },
 
     b: (if std.length(cfg.b.domains) > 0 then {
-        deployment: app.ns.Contain(kube.Deployment("b")) {
+        deployment: ns.Contain(kube.Deployment("b")) {
             spec+: {
                 replicas: 3,
                 template+: {
@@ -156,10 +156,10 @@
                 },
             },
         },
-        svc: app.ns.Contain(kube.Service("b")) {
+        svc: ns.Contain(kube.Service("b")) {
             target:: app.b.deployment,
         },
-        ingress: app.ns.Contain(kube.SimpleIngress("b")) {
+        ingress: ns.Contain(kube.SimpleIngress("b")) {
             hosts:: cfg.b.domains,
             target_service:: app.b.svc,
         },