{"action":"created","comment":{"url":"https://api.github.com/repos/Skatteetaten/boober/pulls/comments/329883516","pull_request_review_id":295373948,"id":329883516,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyOTg4MzUxNg==","diff_hunk":"@@ -54,33 +56,44 @@ class AuroraRouteMapperV1(\n                     Route(\n                         objectName = name,\n                         host = auroraDeploymentSpec[\"routeDefaults/host\"],\n-                        tls = secure\n+                        tls = secure,\n+                        annotations = if (defaultAnnotations.isEmpty()) null else defaultAnnotations\n                     )\n                 )\n             }\n             return listOf()\n         }\n         val routes = applicationFiles.findSubKeys(route)\n \n-        return routes.map {\n-\n-            val secure =\n-                if (applicationFiles.findSubKeys(\"$route/$it/tls\").isNotEmpty() ||\n-                    auroraDeploymentSpec[\"routeDefaults/tls/enabled\"]\n-                ) {\n-                    SecureRoute(\n-                        auroraDeploymentSpec.getOrDefault(route, it, \"tls/insecurePolicy\"),\n-                        auroraDeploymentSpec.getOrDefault(route, it, \"tls/termination\")\n+        return routes.mapNotNull {\n+            if (!auroraDeploymentSpec.get<Boolean>(\"$route/$it/enabled\")) {\n+                null\n+            } else {\n+                val secure =\n+                    if (applicationFiles.findSubKeys(\"$route/$it/tls\").isNotEmpty() ||\n+                        auroraDeploymentSpec[\"routeDefaults/tls/enabled\"]\n+                    ) {\n+                        SecureRoute(\n+                            auroraDeploymentSpec.getOrDefault(route, it, \"tls/insecurePolicy\"),\n+                            auroraDeploymentSpec.getOrDefault(route, it, \"tls/termination\")\n+                        )\n+                    } else null\n+\n+                val annotations = defaultAnnotations.addIfNotNull(\n+                    auroraDeploymentSpec.getRouteAnnotations(\n+                        \"$route/$it/annotations\",\n+                        handlers\n                     )\n-                } else null\n-\n-            Route(\n-                objectName = replacer.replace(it).ensureStartWith(name, \"-\"),\n-                host = auroraDeploymentSpec.getOrDefault(route, it, \"host\"),\n-                path = auroraDeploymentSpec.getOrNull(\"$route/$it/path\"),\n-                annotations = auroraDeploymentSpec.getRouteAnnotations(\"$route/$it/annotations\", handlers),\n-                tls = secure\n-            )\n+                )\n+                val r = Route(","path":"src/main/kotlin/no/skatteetaten/aurora/boober/mapper/v1/AuroraRouteMapperV1.kt","position":68,"original_position":68,"commit_id":"509bebc58d3a19170db10eabfa9a150f05daa86a","original_commit_id":"509bebc58d3a19170db10eabfa9a150f05daa86a","user":{"login":"stromland","id":12430772,"node_id":"MDQ6VXNlcjEyNDMwNzcy","avatar_url":"https://avatars3.githubusercontent.com/u/12430772?v=4","gravatar_id":"","url":"https://api.github.com/users/stromland","html_url":"https://github.com/stromland","followers_url":"https://api.github.com/users/stromland/followers","following_url":"https://api.github.com/users/stromland/following{/other_user}","gists_url":"https://api.github.com/users/stromland/gists{/gist_id}","starred_url":"https://api.github.com/users/stromland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stromland/subscriptions","organizations_url":"https://api.github.com/users/stromland/orgs","repos_url":"https://api.github.com/users/stromland/repos","events_url":"https://api.github.com/users/stromland/events{/privacy}","received_events_url":"https://api.github.com/users/stromland/received_events","type":"User","site_admin":false},"body":"Fjerne **r** variabelen?","created_at":"2019-10-01T05:28:49Z","updated_at":"2019-10-01T05:29:03Z","html_url":"https://github.com/Skatteetaten/boober/pull/326#discussion_r329883516","pull_request_url":"https://api.github.com/repos/Skatteetaten/boober/pulls/326","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Skatteetaten/boober/pulls/comments/329883516"},"html":{"href":"https://github.com/Skatteetaten/boober/pull/326#discussion_r329883516"},"pull_request":{"href":"https://api.github.com/repos/Skatteetaten/boober/pulls/326"}}},"pull_request":{"url":"https://api.github.com/repos/Skatteetaten/boober/pulls/326","id":322766095,"node_id":"MDExOlB1bGxSZXF1ZXN0MzIyNzY2MDk1","html_url":"https://github.com/Skatteetaten/boober/pull/326","diff_url":"https://github.com/Skatteetaten/boober/pull/326.diff","patch_url":"https://github.com/Skatteetaten/boober/pull/326.patch","issue_url":"https://api.github.com/repos/Skatteetaten/boober/issues/326","number":326,"state":"open","locked":false,"title":"AOS-3700 AOS-3693 ","user":{"login":"bjartek","id":10621,"node_id":"MDQ6VXNlcjEwNjIx","avatar_url":"https://avatars0.githubusercontent.com/u/10621?v=4","gravatar_id":"","url":"https://api.github.com/users/bjartek","html_url":"https://github.com/bjartek","followers_url":"https://api.github.com/users/bjartek/followers","following_url":"https://api.github.com/users/bjartek/following{/other_user}","gists_url":"https://api.github.com/users/bjartek/gists{/gist_id}","starred_url":"https://api.github.com/users/bjartek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjartek/subscriptions","organizations_url":"https://api.github.com/users/bjartek/orgs","repos_url":"https://api.github.com/users/bjartek/repos","events_url":"https://api.github.com/users/bjartek/events{/privacy}","received_events_url":"https://api.github.com/users/bjartek/received_events","type":"User","site_admin":false},"body":"added enable flag to disable a route\r\nhide annotations that are blank\r\nmake sure annotations from routeDefaults are added","created_at":"2019-09-30T12:53:39Z","updated_at":"2019-10-01T05:29:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"088e826ac5cdc7ff74e88f530ea4af63589f0804","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Skatteetaten/boober/pulls/326/commits","review_comments_url":"https://api.github.com/repos/Skatteetaten/boober/pulls/326/comments","review_comment_url":"https://api.github.com/repos/Skatteetaten/boober/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Skatteetaten/boober/issues/326/comments","statuses_url":"https://api.github.com/repos/Skatteetaten/boober/statuses/509bebc58d3a19170db10eabfa9a150f05daa86a","head":{"label":"Skatteetaten:feature/AOS-3700-route-override","ref":"feature/AOS-3700-route-override","sha":"509bebc58d3a19170db10eabfa9a150f05daa86a","user":{"login":"Skatteetaten","id":1536293,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MzYyOTM=","avatar_url":"https://avatars0.githubusercontent.com/u/1536293?v=4","gravatar_id":"","url":"https://api.github.com/users/Skatteetaten","html_url":"https://github.com/Skatteetaten","followers_url":"https://api.github.com/users/Skatteetaten/followers","following_url":"https://api.github.com/users/Skatteetaten/following{/other_user}","gists_url":"https://api.github.com/users/Skatteetaten/gists{/gist_id}","starred_url":"https://api.github.com/users/Skatteetaten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skatteetaten/subscriptions","organizations_url":"https://api.github.com/users/Skatteetaten/orgs","repos_url":"https://api.github.com/users/Skatteetaten/repos","events_url":"https://api.github.com/users/Skatteetaten/events{/privacy}","received_events_url":"https://api.github.com/users/Skatteetaten/received_events","type":"Organization","site_admin":false},"repo":{"id":84482382,"node_id":"MDEwOlJlcG9zaXRvcnk4NDQ4MjM4Mg==","name":"boober","full_name":"Skatteetaten/boober","private":false,"owner":{"login":"Skatteetaten","id":1536293,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MzYyOTM=","avatar_url":"https://avatars0.githubusercontent.com/u/1536293?v=4","gravatar_id":"","url":"https://api.github.com/users/Skatteetaten","html_url":"https://github.com/Skatteetaten","followers_url":"https://api.github.com/users/Skatteetaten/followers","following_url":"https://api.github.com/users/Skatteetaten/following{/other_user}","gists_url":"https://api.github.com/users/Skatteetaten/gists{/gist_id}","starred_url":"https://api.github.com/users/Skatteetaten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skatteetaten/subscriptions","organizations_url":"https://api.github.com/users/Skatteetaten/orgs","repos_url":"https://api.github.com/users/Skatteetaten/repos","events_url":"https://api.github.com/users/Skatteetaten/events{/privacy}","received_events_url":"https://api.github.com/users/Skatteetaten/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Skatteetaten/boober","description":"Controller to create and update OpenShift objects for an application","fork":false,"url":"https://api.github.com/repos/Skatteetaten/boober","forks_url":"https://api.github.com/repos/Skatteetaten/boober/forks","keys_url":"https://api.github.com/repos/Skatteetaten/boober/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Skatteetaten/boober/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Skatteetaten/boober/teams","hooks_url":"https://api.github.com/repos/Skatteetaten/boober/hooks","issue_events_url":"https://api.github.com/repos/Skatteetaten/boober/issues/events{/number}","events_url":"https://api.github.com/repos/Skatteetaten/boober/events","assignees_url":"https://api.github.com/repos/Skatteetaten/boober/assignees{/user}","branches_url":"https://api.github.com/repos/Skatteetaten/boober/branches{/branch}","tags_url":"https://api.github.com/repos/Skatteetaten/boober/tags","blobs_url":"https://api.github.com/repos/Skatteetaten/boober/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Skatteetaten/boober/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Skatteetaten/boober/git/refs{/sha}","trees_url":"https://api.github.com/repos/Skatteetaten/boober/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Skatteetaten/boober/statuses/{sha}","languages_url":"https://api.github.com/repos/Skatteetaten/boober/languages","stargazers_url":"https://api.github.com/repos/Skatteetaten/boober/stargazers","contributors_url":"https://api.github.com/repos/Skatteetaten/boober/contributors","subscribers_url":"https://api.github.com/repos/Skatteetaten/boober/subscribers","subscription_url":"https://api.github.com/repos/Skatteetaten/boober/subscription","commits_url":"https://api.github.com/repos/Skatteetaten/boober/commits{/sha}","git_commits_url":"https://api.github.com/repos/Skatteetaten/boober/git/commits{/sha}","comments_url":"https://api.github.com/repos/Skatteetaten/boober/comments{/number}","issue_comment_url":"https://api.github.com/repos/Skatteetaten/boober/issues/comments{/number}","contents_url":"https://api.github.com/repos/Skatteetaten/boober/contents/{+path}","compare_url":"https://api.github.com/repos/Skatteetaten/boober/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Skatteetaten/boober/merges","archive_url":"https://api.github.com/repos/Skatteetaten/boober/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Skatteetaten/boober/downloads","issues_url":"https://api.github.com/repos/Skatteetaten/boober/issues{/number}","pulls_url":"https://api.github.com/repos/Skatteetaten/boober/pulls{/number}","milestones_url":"https://api.github.com/repos/Skatteetaten/boober/milestones{/number}","notifications_url":"https://api.github.com/repos/Skatteetaten/boober/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Skatteetaten/boober/labels{/name}","releases_url":"https://api.github.com/repos/Skatteetaten/boober/releases{/id}","deployments_url":"https://api.github.com/repos/Skatteetaten/boober/deployments","created_at":"2017-03-09T19:50:28Z","updated_at":"2019-09-20T11:17:21Z","pushed_at":"2019-09-30T20:28:56Z","git_url":"git://github.com/Skatteetaten/boober.git","ssh_url":"git@github.com:Skatteetaten/boober.git","clone_url":"https://github.com/Skatteetaten/boober.git","svn_url":"https://github.com/Skatteetaten/boober","homepage":null,"size":3465,"stargazers_count":16,"watchers_count":16,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3,"open_issues":3,"watchers":16,"default_branch":"master"}},"base":{"label":"Skatteetaten:master","ref":"master","sha":"cb0f73e1ed00ade5814e84bef8f9596b0789106a","user":{"login":"Skatteetaten","id":1536293,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MzYyOTM=","avatar_url":"https://avatars0.githubusercontent.com/u/1536293?v=4","gravatar_id":"","url":"https://api.github.com/users/Skatteetaten","html_url":"https://github.com/Skatteetaten","followers_url":"https://api.github.com/users/Skatteetaten/followers","following_url":"https://api.github.com/users/Skatteetaten/following{/other_user}","gists_url":"https://api.github.com/users/Skatteetaten/gists{/gist_id}","starred_url":"https://api.github.com/users/Skatteetaten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skatteetaten/subscriptions","organizations_url":"https://api.github.com/users/Skatteetaten/orgs","repos_url":"https://api.github.com/users/Skatteetaten/repos","events_url":"https://api.github.com/users/Skatteetaten/events{/privacy}","received_events_url":"https://api.github.com/users/Skatteetaten/received_events","type":"Organization","site_admin":false},"repo":{"id":84482382,"node_id":"MDEwOlJlcG9zaXRvcnk4NDQ4MjM4Mg==","name":"boober","full_name":"Skatteetaten/boober","private":false,"owner":{"login":"Skatteetaten","id":1536293,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MzYyOTM=","avatar_url":"https://avatars0.githubusercontent.com/u/1536293?v=4","gravatar_id":"","url":"https://api.github.com/users/Skatteetaten","html_url":"https://github.com/Skatteetaten","followers_url":"https://api.github.com/users/Skatteetaten/followers","following_url":"https://api.github.com/users/Skatteetaten/following{/other_user}","gists_url":"https://api.github.com/users/Skatteetaten/gists{/gist_id}","starred_url":"https://api.github.com/users/Skatteetaten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skatteetaten/subscriptions","organizations_url":"https://api.github.com/users/Skatteetaten/orgs","repos_url":"https://api.github.com/users/Skatteetaten/repos","events_url":"https://api.github.com/users/Skatteetaten/events{/privacy}","received_events_url":"https://api.github.com/users/Skatteetaten/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Skatteetaten/boober","description":"Controller to create and update OpenShift objects for an application","fork":false,"url":"https://api.github.com/repos/Skatteetaten/boober","forks_url":"https://api.github.com/repos/Skatteetaten/boober/forks","keys_url":"https://api.github.com/repos/Skatteetaten/boober/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Skatteetaten/boober/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Skatteetaten/boober/teams","hooks_url":"https://api.github.com/repos/Skatteetaten/boober/hooks","issue_events_url":"https://api.github.com/repos/Skatteetaten/boober/issues/events{/number}","events_url":"https://api.github.com/repos/Skatteetaten/boober/events","assignees_url":"https://api.github.com/repos/Skatteetaten/boober/assignees{/user}","branches_url":"https://api.github.com/repos/Skatteetaten/boober/branches{/branch}","tags_url":"https://api.github.com/repos/Skatteetaten/boober/tags","blobs_url":"https://api.github.com/repos/Skatteetaten/boober/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Skatteetaten/boober/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Skatteetaten/boober/git/refs{/sha}","trees_url":"https://api.github.com/repos/Skatteetaten/boober/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Skatteetaten/boober/statuses/{sha}","languages_url":"https://api.github.com/repos/Skatteetaten/boober/languages","stargazers_url":"https://api.github.com/repos/Skatteetaten/boober/stargazers","contributors_url":"https://api.github.com/repos/Skatteetaten/boober/contributors","subscribers_url":"https://api.github.com/repos/Skatteetaten/boober/subscribers","subscription_url":"https://api.github.com/repos/Skatteetaten/boober/subscription","commits_url":"https://api.github.com/repos/Skatteetaten/boober/commits{/sha}","git_commits_url":"https://api.github.com/repos/Skatteetaten/boober/git/commits{/sha}","comments_url":"https://api.github.com/repos/Skatteetaten/boober/comments{/number}","issue_comment_url":"https://api.github.com/repos/Skatteetaten/boober/issues/comments{/number}","contents_url":"https://api.github.com/repos/Skatteetaten/boober/contents/{+path}","compare_url":"https://api.github.com/repos/Skatteetaten/boober/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Skatteetaten/boober/merges","archive_url":"https://api.github.com/repos/Skatteetaten/boober/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Skatteetaten/boober/downloads","issues_url":"https://api.github.com/repos/Skatteetaten/boober/issues{/number}","pulls_url":"https://api.github.com/repos/Skatteetaten/boober/pulls{/number}","milestones_url":"https://api.github.com/repos/Skatteetaten/boober/milestones{/number}","notifications_url":"https://api.github.com/repos/Skatteetaten/boober/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Skatteetaten/boober/labels{/name}","releases_url":"https://api.github.com/repos/Skatteetaten/boober/releases{/id}","deployments_url":"https://api.github.com/repos/Skatteetaten/boober/deployments","created_at":"2017-03-09T19:50:28Z","updated_at":"2019-09-20T11:17:21Z","pushed_at":"2019-09-30T20:28:56Z","git_url":"git://github.com/Skatteetaten/boober.git","ssh_url":"git@github.com:Skatteetaten/boober.git","clone_url":"https://github.com/Skatteetaten/boober.git","svn_url":"https://github.com/Skatteetaten/boober","homepage":null,"size":3465,"stargazers_count":16,"watchers_count":16,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3,"open_issues":3,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Skatteetaten/boober/pulls/326"},"html":{"href":"https://github.com/Skatteetaten/boober/pull/326"},"issue":{"href":"https://api.github.com/repos/Skatteetaten/boober/issues/326"},"comments":{"href":"https://api.github.com/repos/Skatteetaten/boober/issues/326/comments"},"review_comments":{"href":"https://api.github.com/repos/Skatteetaten/boober/pulls/326/comments"},"review_comment":{"href":"https://api.github.com/repos/Skatteetaten/boober/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Skatteetaten/boober/pulls/326/commits"},"statuses":{"href":"https://api.github.com/repos/Skatteetaten/boober/statuses/509bebc58d3a19170db10eabfa9a150f05daa86a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"stromland"}}