{"action":"created","issue":{"url":"https://api.github.com/repos/confluentinc/cp-docker-images/issues/405","repository_url":"https://api.github.com/repos/confluentinc/cp-docker-images","labels_url":"https://api.github.com/repos/confluentinc/cp-docker-images/issues/405/labels{/name}","comments_url":"https://api.github.com/repos/confluentinc/cp-docker-images/issues/405/comments","events_url":"https://api.github.com/repos/confluentinc/cp-docker-images/issues/405/events","html_url":"https://github.com/confluentinc/cp-docker-images/issues/405","id":288271083,"number":405,"title":"Make URL's in Confluent Control-Center front-end UI relative iso absolute","user":{"login":"boeboe","id":415310,"avatar_url":"https://avatars2.githubusercontent.com/u/415310?v=4","gravatar_id":"","url":"https://api.github.com/users/boeboe","html_url":"https://github.com/boeboe","followers_url":"https://api.github.com/users/boeboe/followers","following_url":"https://api.github.com/users/boeboe/following{/other_user}","gists_url":"https://api.github.com/users/boeboe/gists{/gist_id}","starred_url":"https://api.github.com/users/boeboe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boeboe/subscriptions","organizations_url":"https://api.github.com/users/boeboe/orgs","repos_url":"https://api.github.com/users/boeboe/repos","events_url":"https://api.github.com/users/boeboe/events{/privacy}","received_events_url":"https://api.github.com/users/boeboe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-01-12T23:02:29Z","updated_at":"2018-03-19T18:08:35Z","closed_at":null,"author_association":"NONE","body":"Hi all,\r\n\r\nI am using the docker images of confluent to deploy the confluent stack (kafka, zookeeper, schema-registry, rest-proxy and control-center) on Kubernetes. I am using an **nginx ingress controller** to expose the control center's dashboard (using path routing):\r\n\r\n    apiVersion: extensions/v1beta1\r\n    kind: Ingress\r\n    metadata:\r\n      name: ingress-control-center\r\n      annotations:\r\n        ingress.kubernetes.io/rewrite-target: /\r\n        ingress.kubernetes.io/add-base-url: \"true\"\r\n    spec:\r\n      rules:\r\n      - http:\r\n          paths:\r\n          - path: /control-center\r\n            backend:\r\n              serviceName: control-center-svc\r\n              servicePort: 9021\r\n\r\n\r\nThe **ingress.kubernetes.io/add-base-url** ensures that in the HTML returned, a base-url header is injected in order for later scripts/urls to be correctly resolvable over the path based ingress controller. The result looks like this:\r\n\r\n\r\n    <!DOCTYPE html>\r\n    <html>\r\n      <head><base href=\"https://kubernetes-ingress.mydomain.com/control-center/\">\r\n        <meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\">\r\n        <title>Control Center</title>\r\n      <link rel=\"shortcut icon\" href=\"/dist/favicon.ico\"><link href=\"/dist/main-14ed7341cd326a596d21.css\" rel=\"stylesheet\"></head>\r\n      <body>\r\n        <div id=\"controlcenter\" style=\"height: 100%\"></div>\r\n      <script type=\"text/javascript\" src=\"/dist/manifest.js\"></script><script type=\"text/javascript\" src=\"/dist/vendor.js\"></script><script type=\"text/javascript\" src=\"/dist/main.js\"></script></body>\r\n    </html>\r\n\r\n\r\nAs one can see, the links however all are using **absolute URL's**, which is why the page is not properly loading behind this nginx reverse proxy.\r\n\r\nI was wondering if you would be willing to switch the URL's to be relative (I would try to change this myself using some linux _sed_ magic, but it seems that the code is embedded in a jar).\r\n\r\nREF: https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md\r\n\r\nPS: not sure this is the right repo, but I could not find a control-center specific one.\r\nPPS: the result of the port-confluent-to-kubernetes exercise (I had to extend the docker images of Kafka and Zookeeper to make it work FYI):\r\n\r\n    # kubectl version\r\n    Client Version: version.Info{Major:\"1\", Minor:\"9\", GitVersion:\"v1.9.1\", GitCommit:\"3a1c9449a956b6026f075fa3134ff92f7d55f812\", GitTreeState:\"clean\", BuildDate:\"2018-01-04T19:58:48Z\", GoVersion:\"go1.9.2\", Compiler:\"gc\", Platform:\"darwin/amd64\"}\r\n    Server Version: version.Info{Major:\"1\", Minor:\"8\", GitVersion:\"v1.8.6\", GitCommit:\"6260bb08c46c31eea6cb538b34a9ceb3e406689c\", GitTreeState:\"clean\", BuildDate:\"2017-12-21T06:23:29Z\", GoVersion:\"go1.8.3\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n\r\n    # kubectl get pods -o wide\r\n    NAME                              READY     STATUS              RESTARTS   AGE       IP              NODE\r\n    control-center-ff6995d6-l2pbd     1/1       Running             0          1h        172.24.38.205   node-172-16-24-36\r\n    kafka-0                           1/1       Running             0          1h        172.24.27.107   node-172-16-24-24\r\n    kafka-1                           1/1       Running             0          1h        172.24.28.23    node-172-16-24-28\r\n    kafka-2                           1/1       Running             0          1h        172.24.38.192   node-172-16-24-36\r\n    kafka-connect-6c7f78cf4f-lwjn5    1/1       Running             0          16m       172.24.39.107   node-172-16-24-36\r\n    rest-proxy-578494fd86-b4cmg       1/1       Running             0          11m       172.24.39.117   node-172-16-24-36\r\n    schema-registry-b8996c9b5-xj4qj   1/1       Running             0          1h        172.24.27.114   node-172-16-24-24\r\n    zookeeper-0                       1/1       Running             0          1h        172.24.38.180   node-172-16-24-36\r\n    zookeeper-1                       1/1       Running             0          1h        172.24.27.100   node-172-16-24-24\r\n    zookeeper-2                       1/1       Running             0          1h        172.24.21.14    node-172-16-24-20"},"comment":{"url":"https://api.github.com/repos/confluentinc/cp-docker-images/issues/comments/374311111","html_url":"https://github.com/confluentinc/cp-docker-images/issues/405#issuecomment-374311111","issue_url":"https://api.github.com/repos/confluentinc/cp-docker-images/issues/405","id":374311111,"user":{"login":"Patafix","id":5347574,"avatar_url":"https://avatars0.githubusercontent.com/u/5347574?v=4","gravatar_id":"","url":"https://api.github.com/users/Patafix","html_url":"https://github.com/Patafix","followers_url":"https://api.github.com/users/Patafix/followers","following_url":"https://api.github.com/users/Patafix/following{/other_user}","gists_url":"https://api.github.com/users/Patafix/gists{/gist_id}","starred_url":"https://api.github.com/users/Patafix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Patafix/subscriptions","organizations_url":"https://api.github.com/users/Patafix/orgs","repos_url":"https://api.github.com/users/Patafix/repos","events_url":"https://api.github.com/users/Patafix/events{/privacy}","received_events_url":"https://api.github.com/users/Patafix/received_events","type":"User","site_admin":false},"created_at":"2018-03-19T18:08:35Z","updated_at":"2018-03-19T18:08:35Z","author_association":"NONE","body":"Do you mind share you're experience with kubernetes ? Stability etc..."}}
{"actor":{"display_login":"Patafix"}}