Remove control and re-use setup into kubernetes

Change-Id: I93b6addae974e796e5604852214fb7d28884e54b
diff --git a/devops_portal/files/kubernetes/devops_portal-deploy.yaml b/devops_portal/files/kubernetes/devops_portal-deploy.yaml
index d6fced2..f49c92d 100644
--- a/devops_portal/files/kubernetes/devops_portal-deploy.yaml
+++ b/devops_portal/files/kubernetes/devops_portal-deploy.yaml
@@ -1,5 +1,5 @@
 {%- from "devops_portal/map.jinja" import config with context %}
-{%- set container = config.container %}
+{%- from "devops_portal/map.jinja" import setup with context %}
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
@@ -13,7 +13,7 @@
     spec:
       containers:
         - name: nginx
-          image: {{ container.image }}
+          image: {{ setup.kubernetes.image }}
           env:
             - name: CONFIGMAP_HASH
               value: {{ salt['hashutil.digest_file'](config.base_dir + '/kubernetes/devops_portal-cm.yaml') }}
@@ -25,11 +25,11 @@
               mountPath: /opt/devops-portal/config
               readOnly: true
           ports:
-            - containerPort: {{ container.container_port }}
+            - containerPort: 8000
           livenessProbe:
             httpGet:
               path: /
-              port: {{ container.container_port }}
+              port: 8000
             initialDelaySeconds: 10
             timeoutSeconds: 1
       volumes:
diff --git a/devops_portal/files/kubernetes/devops_portal-svc.yaml b/devops_portal/files/kubernetes/devops_portal-svc.yaml
index ea102f8..24fabc4 100644
--- a/devops_portal/files/kubernetes/devops_portal-svc.yaml
+++ b/devops_portal/files/kubernetes/devops_portal-svc.yaml
@@ -1,5 +1,4 @@
-{%- from "devops_portal/map.jinja" import config with context %}
-{%- set container = config.container %}
+{%- from "devops_portal/map.jinja" import setup with context %}
 apiVersion: v1
 kind: Service
 metadata:
@@ -10,7 +9,7 @@
   ports:
     - name: http
       protocol: TCP
-      port: {{ container.external_port }}
-      targetPort: {{ container.container_port }}
+      port: {{ setup.kubernetes.external_port }}
+      targetPort: 8000
   externalIPs:
-    - {{ container.external_ip }}
+    - {{ setup.kubernetes.external_ip }}
diff --git a/devops_portal/setup/kubernetes.sls b/devops_portal/setup/kubernetes.sls
index ecafbe1..16e886e 100644
--- a/devops_portal/setup/kubernetes.sls
+++ b/devops_portal/setup/kubernetes.sls
@@ -1,6 +1,7 @@
 {%- from "devops_portal/map.jinja" import config with context %}
-{%- if config.setup.engine == "kubernetes" %}
-{%- set namespace = config.setup.kubernetes.namespace|default("oss") %}
+{%- from "devops_portal/map.jinja" import setup with context %}
+{%- if setup.engine == "kubernetes" %}
+{%- set namespace = setup.kubernetes.namespace|default("oss") %}
 
 devops_portal_kubernetes_dir:
   file.directory: