Skip to content

Commit ef83bf6

Browse files
authored
BREAKING CHANGE: switch all security list of worker nodes and load balancers to NSGs for greater flexibility and control on ports and cidr blocks (#399)
* BREAKING CHANGE: switch all security list of worker nodes and load balancers to NSGs for greater flexibility Closes #398 Signed-off-by: Ali Mukadam <[email protected]> * fix: fixed incorrect NSG rules, added separate NSG for WAF, made NSGs conditional, renamed variables Signed-off-by: Ali Mukadam <[email protected]> * fix: nsg rules attached in the wrong nsgs corrected nsg rules to their nsgs, added rules for load balancer healtchecks, outputs for default load balancer ngs, updated docs. Signed-off-by: Ali Mukadam <[email protected]> * fix: documented the use of waf NSG, tightened security rules. Signed-off-by: Ali Mukadam <[email protected]> * fix: Updated changelog, health check security rules Signed-off-by: Ali Mukadam <[email protected]> * fix: added port range for internal load balancer ports ingress and egress Signed-off-by: Ali Mukadam <[email protected]> * fix: readded 1 rule for control plane which was mistakenly deleted. Signed-off-by: Ali Mukadam <[email protected]> * fix: added worker_nsgs in terraform.tfvars.example file Signed-off-by: Ali Mukadam <[email protected]>
1 parent 6b9d550 commit ef83bf6

19 files changed

+891
-513
lines changed

CHANGELOG.adoc

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ All notable changes to this project are documented in this file.
77

88
The format is based on {uri-changelog}[Keep a Changelog].
99

10-
=== Unreleased
11-
# Breaking changes
10+
= Unreleased
11+
=== Breaking changes
1212
* Set minimum version to Terraform 1.0.0
1313
* Removed base module and use vcn, bastion and operator modules directly
1414
* Renamed and standardized all control variables
@@ -20,29 +20,48 @@ The format is based on {uri-changelog}[Keep a Changelog].
2020
* Moved dynamic group and policy for kms into oke module
2121
* Added a 30s delay between policy creation for kms and cluster creation to allow for global propagation
2222
* Added a home provider in oke module for dynamic group and policy creation
23+
* Changed from security list to NSGs for better flexibility
2324

24-
# Changes
25+
=== Changes
2526
* Changed default Kubernetes version to v1.20.8 and removed v1.16.8, v1.17.9 from docs.
26-
* Bug fix: Use correct calico file to install calico for networking policy only (#307)
2727
* Added support for GPU and ARM shapes (#302)
2828
* VCN module upgraded to VCN 3.0.0. This allows supporting multiple cidr blocks (#360)
29+
* Bastion and operator sub-modules upgraded to 3.0.0 (#183)
2930
* kubeconfig on operator always uses PRIVATE_ENDPOINT (#358)
3031
* Documented providers in quickstart (#355)
3132
* Renamed tags to freeform_tags in line with other modules (#364)
3233
* Added validation on some variables (#370)
3334

34-
# New Features
35+
=== New Features
3536
* Added OCI Bastion Service as option to access operator or control plane
3637
* Added support for reserved public IP address for NAT gateway (#311)
3738
* Added LPGs for hub and spoke deployment model (#295)
3839
* Allow access to operator via OCI Bastion service (#352)
39-
* Added support for using NSGs for cluster endpoint (#343 )
40+
* Added support for using NSGs for cluster endpoint (#343)
4041
* Added option to disable worker node access to Internet. Users can only pull images from OCIR (#331)
4142
* Added ability to specify api and private ssh keys using heredoc format with a variable (#375)
4243

43-
# Bug fixes
44+
=== Bug fixes
4445
* Added home region to update dynamic group script for cases when actual region is different from tenancy home region (#347)
45-
* Added 1 missing rule for operator to access control plane (#349 )
46+
* Added 1 missing rule for operator to access control plane (#349)
47+
48+
=== Known issues
49+
* Enabling WAF has to be done in 2 stages:
50+
** Create the cluster along with the VCN and other resources without WAF enabled by setting `enable_waf=false`
51+
** Subsequently enable WAF by setting `enable_waf=true`
52+
53+
= 3.3.0
54+
55+
=== Additions
56+
* Support for using reserved public IP address for NAT Gateway (#311) with new parameter nat_gateway_public_ip_id
57+
* Support for GPU and ARM Shapes (#302 )
58+
* Conditional checks for WAF CIDR block data source
59+
60+
=== Changes
61+
* Default Kubernetes version changed to v1.20.8
62+
63+
=== Bug fixes
64+
* Use correct manifest to install Calico as policy (#306)
4665

4766
= 3.2.0 (May 12, 2021)
4867

docs/instructions.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,11 @@ service_account_cluster_role_binding = ""
299299

300300
You can monitor and protect the load balancers created by OKE using {uri-oci-waf}[OCI Web Application Firewall].
301301

302-
If you would like to monitor and protect your application with OCI Web Application firewall, set *_enable_waf = true_*.
302+
If you would like to monitor and protect your application with OCI Web Application firewall, set `enable_waf = true` *_after_* the cluster has been created. In other words, you need to run `terraform apply` twice. In the first `terraform apply`, `enable_waf` should be set to `false` while the VCN and other resources are created. You can then set `enable_waf=true` and run `terraform apply` again.
303303

304-
You'll then need to:
304+
You will then need to:
305305

306+
. add the WAF NSG to the load balancer. Refer to the example in {uri-topology}#using-public-load-balancers[Topology - Using Public Load Balancers] for an example
306307
. {uri-oci-waf-policy}[create a WAF Policy]
307308
. {uri-oci-waf-dns}[Update your DNS records to enable WAF]
308309

docs/terraformoptions.adoc

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -543,19 +543,19 @@ EOT
543543
|
544544
|oke
545545

546-
|control_plane_access
546+
|control_plane_type
547547
|Whether to allow public or private access to the control plane endpoint.
548548
|public/private
549549
|public
550550

551-
|control_plane_access_source
551+
|control_plane_allowed_cidrs
552552
|The list of CIDR blocks from which the control plane can be accessed.
553553
|`[0.0.0.0/0]`
554554
|`[]`
555555

556556
|control_plane_nsgs
557-
|A list of the network security groups (NSGs) ids to apply to the cluster endpoint.
558-
|[]
557+
|An additional list of network security groups (NSG) ids for the cluster endpoint that can be created subsequently.
558+
|["ocid1.networksecuritygroup.oc1....","ocid1.networksecuritygroup.oc1...."]
559559
|[]
560560

561561
|`dashboard_enabled`
@@ -657,7 +657,12 @@ node_pools = {
657657
|
658658
|7.9
659659

660-
|`worker_mode`
660+
|`worker_nsgs`
661+
|An additional list of network security groups (NSG) ids for the worker nodes that can be created subsequently.
662+
|["ocid1.networksecuritygroup.oc1....","ocid1.networksecuritygroup.oc1...."]
663+
|[]
664+
665+
|`worker_type`
661666
|Whether the worker nodes should be public or private. Private requires NAT gateway.
662667
|private/public
663668
|private
@@ -704,17 +709,17 @@ node_pools = {
704709
|Values
705710
|Default
706711

707-
|lb_subnet_type
712+
|load_balancers
708713
|The type of load balancer subnets to create.
709714

710-
Even if you set the load balancer subnets to be internal, you still need to set the correct {uri-oci-loadbalancer-annotations}[annotations] when creating internal load balancers. Just setting the subnet to be private is *_not_* sufficient.
715+
Even if you set the load balancer subnets to be internal, you still need to set the correct {uri-oci-loadbalancer-annotations}[annotations] when creating internal load balancers. Just setting this value to internal is *_not_* sufficient.
711716

712717
Refer to {uri-topology}[topology] for more thorough examples.
713718
|both, internal, public
714719
|public
715720

716-
|preferred_lb_subnet_type
717-
|The preferred load balancer subnets that OKE will automatically choose when creating load balancers. If 'public' is chosen, the value for lb_subnet_type must be either 'public' or 'both'. If 'private' is chosen, the value for lb_subnet_type must be either 'internal' or 'both'.
721+
|preferred_load_balancer
722+
|The preferred load balancer subnets that OKE will automatically choose when creating load balancers. If 'public' is chosen, the value for load_balancers must be either 'public' or 'both'. If 'private' is chosen, the value for load_balancers must be either 'internal' or 'both'.
718723

719724
Even if you set the load balancer subnets to be internal, you still need to set the correct {uri-oci-loadbalancer-annotations}[annotations] when creating internal load balancers. Just setting the subnet to be private is *_not_* sufficient.
720725

@@ -723,11 +728,26 @@ Refer to {uri-topology}[topology] for more thorough examples.
723728
|internal/public
724729
|public
725730

726-
|public_lb_ports
727-
|The List of allowed ports for public load balancers. Use a string if specifying a range.
728-
|`e.g.: [80,443,8080]` or [80,443, "7001-7010"]
731+
|internal_lb_allowed_cidrs
732+
|The list of CIDR blocks from which the internal load balancer can be accessed.
733+
|`e.g.: ["0.0.0.0/0"]
734+
|`["0.0.0.0/0"]`
735+
736+
|internal_lb_allowed_ports
737+
|List of allowed ports for internal load balancers.
738+
|e.g.: `[80, 443]`
729739
|`[80, 443]`
730740

741+
|public_lb_allowed_cidrs
742+
|The list of CIDR blocks from which the public load balancer can be accessed.
743+
|e.g.: `["0.0.0.0/0"]`
744+
|`["0.0.0.0/0"]`
745+
746+
|public_lb_allowed_ports
747+
|List of allowed ports for public load balancers.
748+
|e.g.: `[443]`
749+
|`[443]`
750+
731751
|===
732752

733753
== OCIR

0 commit comments

Comments
 (0)