Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
fix(#690): Removes deprecated legacyPortMapping configuration property
Browse files Browse the repository at this point in the history
  • Loading branch information
lordofthejars authored and rohanKanojia committed Dec 26, 2018
1 parent 4b36e25 commit 96fa63b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ After this we will switch probably to real [Semantic Versioning 2.0.0](http://se
* Feature 729: Select custom resources depending on environment.
* Feature 601: Adds healthcheck for webapp
* Fix 1460: Upgraded kubernetes client to 4.1.1
* Fix 690: Removes deprecated _legacyPortMapping_ property.

### 4.0.0-M2 (2018-12-14)
* Fix 10: Make VolumeConfiguration more flexible
Expand Down
4 changes: 0 additions & 4 deletions doc/src/main/asciidoc/inc/enricher/_fmp_service.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"; }},

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 96fa63b

Please sign in to comment.