Skip to content

Commit

Permalink
[CHANGELOG] upcoming breaking change for k8s nat (hyperledger#7534)
Browse files Browse the repository at this point in the history
* upcoming breaking change for k8s nat
* log warning if deprecated NAT method used

Signed-off-by: Sally MacFarlane <[email protected]>

---------

Signed-off-by: Sally MacFarlane <[email protected]>
  • Loading branch information
macfarla authored Sep 16, 2024
1 parent 12caf7d commit 89dfa95
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [Unreleased]

### Upcoming Breaking Changes
- k8s (KUBERNETES) Nat method is now deprecated and will be removed in a future release

### Breaking Changes

Expand Down
7 changes: 7 additions & 0 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -1568,6 +1568,13 @@ private void validateGraphQlOptions() {

@SuppressWarnings("ConstantConditions")
private void validateNatParams() {
if (natMethod.equals(NatMethod.KUBERNETES)) {
logger.warn("Kubernetes NAT method is deprecated. Please use Docker or UPNP");
}
if (!unstableNatOptions.getNatManagerServiceName().equals(DEFAULT_BESU_SERVICE_NAME_FILTER)) {
logger.warn(
"`--Xnat-kube-service-name` and Kubernetes NAT method are deprecated. Please use Docker or UPNP");
}
if (!(natMethod.equals(NatMethod.AUTO) || natMethod.equals(NatMethod.KUBERNETES))
&& !unstableNatOptions
.getNatManagerServiceName()
Expand Down
2 changes: 1 addition & 1 deletion nat/src/main/java/org/hyperledger/besu/nat/NatMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
public enum NatMethod {
/** Upnp nat method. */
UPNP,
/** Upnpp 2 ponly nat method. */
/** Upnp p2p only nat method. */
UPNPP2PONLY,
/** Docker nat method. */
DOCKER,
Expand Down

0 comments on commit 89dfa95

Please sign in to comment.