From bd722baba552b62616a0576680e879705ee94c5e Mon Sep 17 00:00:00 2001 From: Alex Soto Date: Mon, 17 Dec 2018 18:50:52 +0100 Subject: [PATCH] fix(#690): Removes deprecated legacyPortMapping configuration property --- CHANGELOG.md | 4 ++++ doc/src/main/asciidoc/inc/enricher/_fmp_service.adoc | 4 ---- .../maven/enricher/standard/DefaultServiceEnricher.java | 7 ------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9be94b6819..5cbbb57206 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ We use semantic versioning in some slight variation until our feature set has st After this we will switch probably to real [Semantic Versioning 2.0.0](http://semver.org/) +### 4.0.0-M3 + +* Fix 690: Removes deprecated _legacyPortMapping_ property. + ### 4.0.0-M2 (2018-12-14) * Fix 10: Make VolumeConfiguration more flexible * Fix 1326: Fixes overridding of Selector Label by the project enrichers entries. diff --git a/doc/src/main/asciidoc/inc/enricher/_fmp_service.adoc b/doc/src/main/asciidoc/inc/enricher/_fmp_service.adoc index ad03e15bc5..589a269398 100644 --- a/doc/src/main/asciidoc/inc/enricher/_fmp_service.adoc +++ b/doc/src/main/asciidoc/inc/enricher/_fmp_service.adoc @@ -42,10 +42,6 @@ The following configuration parameters can be used to influence the behaviour of | *protocol* | Default protocol to use for the services. Must be `tcp` or `udp` | `tcp` - -| *legacyPortMapping* -| If this mapping options is set to `true` then a pod exports ports 8080 or 9090 is mapped to a service port 80. This is deprecated and switched off by default. You can switch it on to get back the old behaviour or, even better, use `port` for setting the service port directly. -| `false` |=== You specify the properties like for any enricher within the enrichers configuration like in diff --git a/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/DefaultServiceEnricher.java b/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/DefaultServiceEnricher.java index e98f6ebfba..2bdeb590a5 100644 --- a/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/DefaultServiceEnricher.java +++ b/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/DefaultServiceEnricher.java @@ -82,9 +82,6 @@ private enum Config implements Configs.Key { // Service port to use (only for the first exposed pod port) port, - // Legacy mapping from port 8080 / 9090 to 80 - legacyPortMapping {{ d = "false"; }}, - // Whether to expose multiple ports or only the first one multiPort {{ d = "false"; }}, @@ -360,10 +357,6 @@ private ServicePort updateMissingTargetPort(ServicePort port, Integer targetPort } private int checkForLegacyMapping(int port) { - // The legacy mapping maps 8080 -> 80 and 9090 -> 90 which needs to be enabled explicitly - if (Configs.asBoolean(getConfig(Config.legacyPortMapping)) && (port == 8080 || port == 9090)) { - return 80; - } return port; }