Skip to content

Commit feb0722

Browse files
committed
updates for c2c policies across spaces[#165267472]
1 parent ca63d86 commit feb0722

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

deploy-apps/cf-networking.html.md.erb

+11-7
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ This topic describes how to configure the Container-to-Container Networking feat
5858
## <a name="create-policies"></a> Create and Manage Networking Policies
5959

6060
This section describes how to create and modify Container-to-Container Networking policies using the Cloud Foundry Command Line Interface (cf CLI).
61-
The cf CLI only supports configuring policies for apps within the same space.
62-
To configure policies for apps in different orgs and spaces, use the [Policy Server External API](https://github.com/cloudfoundry/cf-networking-release/blob/develop/docs/API_v0.md).
61+
62+
<p class="note"><strong>Strong</strong>: To configure policies for apps in different orgs and spaces, ensure you have cf CLI v6.42.0 or later.</p>
6363

6464
<%= vars.app_man_network %>
6565

6666
<p class='note'><strong>Note:</strong> With the NSX-T integration, container networking policies and ASGs continue to work as normal. Advanced ASG logging is not supported with NSX-T.</p>
6767

6868
### <a name="prereq"></a> Prerequisites
6969

70-
* Ensure that you are using cf CLI v6.30 or higher:
70+
* Ensure that you are using cf CLI v6.42 or later:
7171
<pre class="terminal">
7272
$ cf version
7373
</pre>
@@ -112,13 +112,15 @@ To grant all Space Developers permissions to configure network policies, <%= va
112112

113113
To add a policy that allows direct network traffic from one app to another, run the following command:
114114

115-
```cf add-network-policy SOURCE_APP --destination-app DESTINATION_APP --protocol (tcp | udp) --port RANGE
115+
```cf add-network-policy SOURCE_APP --destination-app DESTINATION_APP -s DESTINATION_SPACE_NAME -o DESTINATION_ORG_NAME --protocol (tcp | udp) --port RANGE
116116
```
117117

118118
Replace the placeholders in the above command as follows:
119119

120120
* `SOURCE_APP` is the name of the app that sends traffic.
121121
* `DESTINATION_APP` is the name of the app that will receive traffic.
122+
* `DESTINATION_SPACE_NAME` is the space of the destination app. The default is the targeted space.
123+
* `DESTINATION_ORG_NAME` is the org of the destination app. The default is the targeted org.
122124
* `PROTOCOL` is one of the following: `tcp` or `udp`.
123125
* `RANGE` are the ports at which to connect to the destination app. The allowed range is from `1` to `65535`. You can specify a single port, such as `8080`, or a range of ports, such as `8080-8090`.
124126

@@ -152,21 +154,23 @@ You can list all the policies in your space, or just the policies for which a si
152154
$ cf network-policies --source frontend
153155
Listing network policies in org my-org / space dev as admin...
154156

155-
source destination protocol ports
156-
frontend backend tcp 8080
157+
source destination protocol ports destination space destination org
158+
frontend backend tcp 8080 example-space example-org
157159
</pre>
158160

159161
### <a name="rm-policy"></a> Remove a Network Policy
160162

161163
To remove a policy that allows direct network traffic from an app, run the following command:
162164

163-
```cf remove-network-policy SOURCE_APP --destination-app DESTINATION_APP --protocol PROTOCOL --port RANGE
165+
```cf remove-network-policy SOURCE_APP --destination-app DESTINATION_APP -s DESTINATION_SPACE_NAME -o DESTINATION_ORG_NAME --protocol PROTOCOL --port RANGE
164166
```
165167

166168
Replace the placeholders in the above command to match an existing policy, as follows:
167169

168170
* `SOURCE_APP` is the name of the app that sends traffic.
169171
* `DESTINATION_APP` is the name of the app that receives traffic.
172+
* `DESTINATION_SPACE_NAME` is the space of the destination app. The default is the targeted space.
173+
* `DESTINATION_ORG_NAME` is the org of the destination app. The default is the targeted org.
170174
* `PROTOCOL` is either `tcp` or `udp`.
171175
* `PORTS` are the ports connecting the apps. The allowed range is from `1` to `65535`. You can specify a single port, such as `8080`, or a range of ports, such as `8080-8090`.
172176

0 commit comments

Comments
 (0)