Skip to content

Commit ec9ad8f

Browse files
Add support for custom roles in NSG/Subnet
1 parent 5c4e299 commit ec9ad8f

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

docs/src/networking/custom-networking.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,45 @@ spec:
300300
loadBalancerType: "lb"
301301
```
302302
303+
## Example spec to use custom role
304+
305+
CAPOCI can be used to create Subnet/NSG in the VCN for custom workloads such as private load balancers,
306+
dedicated subnet for DB connection etc. The roles for such custom subnest must be defined as `custom`.
307+
The following spec shows an example for this scenario.
308+
309+
```yaml
310+
---
311+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
312+
kind: OCICluster
313+
metadata:
314+
name: "${CLUSTER_NAME}"
315+
spec:
316+
compartmentId: "${OCI_COMPARTMENT_ID}"
317+
networkSpec:
318+
vcn:
319+
name: ${CLUSTER_NAME}
320+
subnets:
321+
- name: db
322+
role: custom
323+
type: public
324+
cidr: "172.16.5.0/28"
325+
networkSecurityGroup:
326+
list:
327+
- name: db
328+
role: custom
329+
egressRules:
330+
- egressRule:
331+
isStateless: false
332+
destination: "172.16.5.0/28"
333+
protocol: "6"
334+
destinationType: "CIDR_BLOCK"
335+
description: "All traffic to control plane nodes"
336+
tcpOptions:
337+
destinationPortRange:
338+
max: 6443
339+
min: 6443
340+
```
341+
303342
[sl-vs-nsg]: https://docs.oracle.com/en-us/iaas/Content/Network/Concepts/securityrules.htm#comparison
304343
[externally-managed-cluster-infrastructure]: ../gs/externally-managed-cluster-infrastructure.md#example-spec-for-externally-managed-vcn-infrastructure
305344
[oci-nlb]: https://docs.oracle.com/en-us/iaas/Content/NetworkLoadBalancer/introducton.htm#Overview

0 commit comments

Comments
 (0)