Forward Rundeck main page through Proxy configurations

Change-Id: I5f3a60b1eb1eb5fa8515ced29de88aca9a2814a4
diff --git a/.releasenotes/notes/rundeck-iframe-7b50b9185b0b27a5.yaml b/.releasenotes/notes/rundeck-iframe-7b50b9185b0b27a5.yaml
new file mode 100644
index 0000000..6cac0a7
--- /dev/null
+++ b/.releasenotes/notes/rundeck-iframe-7b50b9185b0b27a5.yaml
@@ -0,0 +1,18 @@
+---
+summary:
+  - |
+    Forward Rundeck main page through Proxy configurations. Default Rundeck service configuration does not allow to get access through external-proxy-address and exposed rundeck port (by default: 14440).
+    In case of using Devops Portal through external proxy networks, need to define additional configuration, otherwise Rundeck tab will be unavailable.
+
+features:
+  - |
+    * Need to define following configuration on cluster level, then follow instructions in OPS guide:
+
+      .. code-block:: yaml
+         rundeck_forward_iframe: True
+         rundeck_iframe_host: "external-proxy-endpoint"
+         rundeck_iframe_port: "external-proxy-port" 
+         rundeck_iframe_ssl: False
+
+fixes:
+  - https://mirantis.jira.com/browse/PROD-16157 
diff --git a/rundeck/client/init.yml b/rundeck/client/init.yml
index 31b7ee9..f97b8da 100644
--- a/rundeck/client/init.yml
+++ b/rundeck/client/init.yml
@@ -17,3 +17,4 @@
         credentials:
           username: ${_param:rundeck_client_username}
           password: ${_param:rundeck_client_password}
+          api_token: ${_param:rundeck_client_password}
diff --git a/rundeck/server/docker.yml b/rundeck/server/docker.yml
index 492d135..6e3f1f6 100644
--- a/rundeck/server/docker.yml
+++ b/rundeck/server/docker.yml
@@ -9,6 +9,10 @@
     rundeck_postgresql_host: ${_param:control_vip_address}
     rundeck_postgresql_port: 5432
     rundeck_server_ssh_timeout: 300000
+    rundeck_forward_iframe: False
+    rundeck_iframe_host: "external-proxy-endpoint"
+    rundeck_iframe_port: ${_param:haproxy_rundeck_exposed_port}
+    rundeck_iframe_ssl: False
   rundeck:
     server:
       user:
@@ -27,6 +31,11 @@
         host: ${_param:haproxy_rundeck_bind_host}
         port: ${_param:haproxy_rundeck_bind_port}
         https: ${_param:haproxy_rundeck_ssl:enabled}
+      iframe:
+        external_forward: ${_param:rundeck_forward_iframe}
+        host: ${_param:rundeck_iframe_host}
+        port: ${_param:rundeck_iframe_port}
+        https: ${_param:rundeck_iframe_ssl}
       ssh:
         user: ${_param:rundeck_runbook_user}
         private_key: ${_param:rundeck_runbook_private_key}