Skip to content

Commit e0d93b7

Browse files
authored
Cleanup (#227)
* Feature Cleanup * Updated feature documentation.
1 parent d7ed7c8 commit e0d93b7

File tree

4 files changed

+23
-27
lines changed

4 files changed

+23
-27
lines changed

bicep/main.bicep

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@ param ingressType string = 'External'
3232
@description('Feature Flag: Enable Storage accounts public access.')
3333
param enableBlobPublicAccess bool = false
3434

35-
@description('Feature Flag: Enable AKS Enhanced Subnet Support (Azure CNI)')
36-
param enablePodSubnet bool = false
37-
38-
@description('Optional: Cluster Configuration Overrides')
39-
param clusterConfiguration object = {
40-
enablePrivateCluster: ''
41-
enableNodeAutoProvisioning: ''
42-
}
43-
4435
@description('(Optional) Software Load Override - {enable/osduCore/osduReference} --> true/false, {repository} --> https://github.com/azure/osdu-devloper {branch} --> branch:main')
4536
param clusterSoftware object = {
4637
enable: true
@@ -58,6 +49,12 @@ param experimentalSoftware object = {
5849
adminUI: false
5950
}
6051

52+
@description('Optional: Cluster Configuration Overrides')
53+
param clusterConfiguration object = {
54+
enableNodeAutoProvisioning: true
55+
enablePrivateCluster: false
56+
}
57+
6158
@description('Optional. Bring your own Virtual Network.')
6259
param vnetConfiguration object = {
6360
group: ''
@@ -82,14 +79,6 @@ param vnetConfiguration object = {
8279
}
8380
}
8481

85-
// This would be a type but bugs exist for ARM Templates so is object instead.
86-
@description('Cluster Network Overrides - {ingress} (Both/Internal/External), {serviceCidr}, {dnsServiceIP}')
87-
param clusterNetwork object = {
88-
ingress: ''
89-
serviceCidr: ''
90-
dnsServiceIP: ''
91-
}
92-
9382
/////////////////////////////////
9483
// Configuration
9584
/////////////////////////////////
@@ -211,7 +200,7 @@ module networkBlade 'modules/blade_network.bicep' = if (enableVnetInjection) {
211200
workspaceResourceId: logAnalytics.outputs.resourceId
212201
identityId: stampIdentity.outputs.principalId
213202

214-
enablePodSubnet: enablePodSubnet
203+
enablePodSubnet: vnetConfiguration.podSubnet.name != '' && vnetConfiguration.podSubnet.prefix != '' ? true: false
215204
enableVnetInjection: enableVnetInjection
216205

217206
vnetConfiguration: {
@@ -340,14 +329,13 @@ module serviceBlade 'modules/blade_service.bicep' = {
340329
location: location
341330
enableTelemetry: enableTelemetry
342331

332+
enableNodeAutoProvisioning: clusterConfiguration.enableNodeAutoProvisioning == 'false' ? false : true
333+
enablePrivateCluster: clusterConfiguration.enablePrivateCluster == 'false' ? false : true
334+
343335
osduVersion: clusterSoftware.osduVersion == '' ? 'master' : clusterSoftware.osduVersion
344336
enableSoftwareLoad: clusterSoftware.enable == 'false' ? false : true
345337
enableOsduCore: clusterSoftware.osduCore == 'false' ? false : true
346338
enableOsdureference: clusterSoftware.osduReference == 'false' ? false : true
347-
348-
enableNodeAutoProvisioning: clusterConfiguration.enableNodeAutoProvisioning == 'false' ? false : true
349-
enablePrivateCluster: clusterConfiguration.enablePrivateCluster == 'true' ? true : false
350-
351339
enableExperimental: experimentalSoftware.enable == 'true' ? true : false
352340
enableAdminUI: experimentalSoftware.adminUI == 'true' ? true : false
353341

@@ -364,12 +352,10 @@ module serviceBlade 'modules/blade_service.bicep' = {
364352
partitionServiceBusNames: partitionBlade.outputs.partitionServiceBusNames
365353

366354
aksSubnetId: enableVnetInjection ? networkBlade.outputs.aksSubnetId : ''
367-
podSubnetId: enableVnetInjection && enablePodSubnet ? networkBlade.outputs.podSubnetId : ''
355+
podSubnetId: enableVnetInjection ? networkBlade.outputs.podSubnetId : ''
368356
vmSize: customVMSize
369357

370358
clusterIngress: ingressType == '' ? 'External' : ingressType
371-
serviceCidr: clusterNetwork.serviceCidr == '' ? '172.16.0.0/16' : clusterNetwork.serviceCidr
372-
dnsServiceIP: clusterNetwork.dnsServiceIP == '' ? '172.16.0.10' : clusterNetwork.vnet
373359

374360
softwareBranch: clusterSoftware.branch
375361
softwareRepository: clusterSoftware.repository

bicep/modules/blade_service.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ param osduVersion string = 'master'
8484
@minLength(9)
8585
@maxLength(18)
8686
@description('The address range to use for services')
87-
param serviceCidr string
87+
param serviceCidr string = '172.16.0.0/16'
8888

8989

9090
@minLength(7)
9191
@maxLength(15)
9292
@description('The IP address to reserve for DNS')
93-
param dnsServiceIP string
93+
param dnsServiceIP string = '172.16.0.10'
9494

9595
@description('The id of the subnet to deploy the AKS nodes')
9696
param aksSubnetId string

docs/src/design_platform.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ This solution implements comprehensive best practices across security controls a
6363

6464
---
6565

66+
- [x] [API VNet Integration](https://learn.microsoft.com/en-us/azure/aks/api-server-vnet-integration)
67+
68+
Kubernetes API server projection into the VNET where AKS is deployed.
69+
70+
- [x] [Private Cluster](https://learn.microsoft.com/en-us/azure/aks/private-clusters?tabs=default-basic-networking%2Cazure-portal)
71+
72+
Enable private cluster mode providing public network access without exposure of the AKS API server to the internet.
73+
6674
- [x] [CNI Overlay](https://learn.microsoft.com/en-us/azure/aks/azure-cni-overlay)
6775

6876
Enhanced network security with overlay networking, providing logical separation between pod and node networks.

docs/src/feature_flags.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Infrastructure customizations can be modified using the following feature flags.
5151
| CLUSTER_INGRESS | Specifies the Ingress type for the cluster (External, Internal, or Both) |
5252
| CLUSTER_VM_SIZE | Overrides the default server type with a custom VM size |
5353
| ENABLE_BLOB_PUBLIC_ACCESS | Enables public access for storage account blob (False by default) |
54+
| ENABLE_NODE_AUTO_PROVISIONING | Enables node auto provisioning (True by default) |
55+
| ENABLE_PRIVATE_CLUSTER | Enables private cluster (False by default) |
5456

5557

5658
## Custom Software

0 commit comments

Comments
 (0)