Skip to content

Commit 0e86839

Browse files
authored
Merge pull request #367 from sassoftware/staging
9.0.0 - February 15, 2024
2 parents 9e907cd + 4518516 commit 0e86839

File tree

6 files changed

+65
-29
lines changed

6 files changed

+65
-29
lines changed

docs/CONFIG-VARS.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ az vm image terms accept --urn Canonical:0001-com-ubuntu-pro-focal-fips:pro-fips
101101
| vnet_address_space | Address space for created vnet | string | "192.168.0.0/16" | This variable is ignored when vnet_name is set (AKA bring your own vnet). |
102102
| subnets | Subnets to be created and their settings | map(object) | *check below* | This variable is ignored when subnet_names is set (AKA bring your own subnets). All defined subnets must exist within the vnet address space. |
103103
| cluster_egress_type | The outbound (egress) routing method to be used for this Kubernetes Cluster | string | "loadBalancer" | Possible values: <ul><li>`loadBalancer`<li>`userDefinedRouting`</ul> By default, AKS will create and use a [loadbalancer](https://docs.microsoft.com/en-us/azure/aks/load-balancer-standard) for outgoing connections.<p>Set to `userDefinedRouting` when using your own network [egress](https://docs.microsoft.com/en-us/azure/aks/egress-outboundtype).|
104-
| aks_network_plugin | Network plugin to use for networking. Currently supported values are `azure` and `kubenet`| string | `kubenet`| For details see Azure's documentation on: [configure kubenet](https://docs.microsoft.com/en-us/azure/aks/configure-kubenet), [Configure Azure CNI](https://learn.microsoft.com/en-us/azure/aks/configure-azure-cni).<br>**Note**: To support Azure CNI your Subnet must be large enough to accommodate the nodes, pods, and all Kubernetes and Azure resources that might be provisioned in your cluster.<br>To calculate the minimum subnet size including an additional node for upgrade operations use formula: `(number of nodes + 1) + ((number of nodes + 1) * maximum pods per node that you configure)` <br>Example for a 5 node cluster: `(5) + (5 * 110) = 555 (/22 or larger)`|
105-
| aks_network_policy | Sets up network policy to be used with Azure CNI. Network policy allows to control the traffic flow between pods. Currently supported values are `calico` and `azure`.| string | `azure`| Network policy `azure` is only supported for `aks_network_plugin = azure` and network policy `calico` is supported for both `aks_network_plugin` values `azure` and `kubenet`. |
106-
104+
| aks_network_plugin | Network plugin to use for networking. | string | "kubenet"| Possible values are `kubenet` and `azure`. For details see Azure's documentation on: [Configure kubenet](https://docs.microsoft.com/en-us/azure/aks/configure-kubenet), [Configure Azure CNI](https://learn.microsoft.com/en-us/azure/aks/configure-azure-cni).<br>**Note**: To support Azure CNI your Subnet must be large enough to accommodate the nodes, pods, and all Kubernetes and Azure resources that might be provisioned in your cluster.<br>To calculate the minimum subnet size including an additional node for upgrade operations use formula: `(number of nodes + 1) + ((number of nodes + 1) * maximum pods per node that you configure)` <br>Example for a 5 node cluster: `(5) + (5 * 110) = 555 (/22 or larger)`|
105+
| aks_network_policy | Sets up network policy to be used with Azure CNI. Network policy allows to control the traffic flow between pods. | string | null | Possible values are `calico` and `azure`. Network policy `azure` (Azure Network Policy Manager) is only supported for `aks_network_plugin = azure` and network policy `calico` is supported for both `aks_network_plugin` values `azure` and `kubenet`. For more details see [network policies in Azure Kubernetes Service](https://learn.microsoft.com/en-us/azure/aks/use-network-policies).|
106+
| aks_network_plugin_mode | Specifies the network plugin mode used for building the Kubernetes network. | string | null | Possible value is `overlay`. When `aks_network_plugin_mode` is set to `overlay` , the `aks_network_plugin` field can only be set to `azure`. For details see Azure's documentation on: [Configure Azure CNI Overlay networking](https://learn.microsoft.com/en-us/azure/aks/azure-cni-overlay).|
107107

108108
The default values for the `subnets` variable are as follows:
109109

@@ -194,7 +194,8 @@ Ubuntu 20.04 LTS is the operating system used on the Jump/NFS servers. Ubuntu cr
194194
| ssh_public_key | File name of public ssh key for jump and nfs VM | string | "~/.ssh/id_rsa.pub" | Required with `create_jump_vm=true` or `storage_type=standard` |
195195
| cluster_api_mode | Public or private IP for the cluster api | string | "public" | Valid Values: "public", "private" |
196196
| aks_cluster_private_dns_zone_id | Specifies private DNS zone resource ID for AKS private cluster to use | string | "" | For `cluster_api_mode=private` if `aks_cluster_private_dns_zone_id` is not specified then the value `System` is used else it is set to null. For details see [Configure a private DNS zone](https://learn.microsoft.com/en-us/azure/aks/private-clusters?tabs=azure-portal#configure-a-private-dns-zone) |
197-
| aks_cluster_sku_tier | Optimizes api server for cost vs availability | string | "Free" | Valid Values: "Free", "Standard" |
197+
| aks_cluster_sku_tier | The SKU Tier that should be used for this Kubernetes Cluster. Optimizes api server for cost vs availability | string | "Free" | Valid Values: "Free", "Standard" and "Premium" |
198+
| cluster_support_tier | Specifies the support plan which should be used for this Kubernetes Cluster. | string | "KubernetesOfficial" | Possible values are `KubernetesOfficial` and `AKSLongTermSupport`. To enable long term K8s support is a combination of setting `aks_cluster_sku_tier` to `Premium` tier and explicitly selecting the `cluster_support_tier` as `AKSLongTermSupport`. For details see [Long term Support](https://learn.microsoft.com/en-us/azure/aks/long-term-support) and for which K8s version has long term support see [AKS Kubernetes release calendar](https://learn.microsoft.com/en-us/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-kubernetes-release-calendar).|
198199

199200
## Node Pools
200201

@@ -358,7 +359,7 @@ Each server element, like `foo = {}`, can contain none, some, or all of the para
358359
| geo_redundant_backup_enabled | Enable Geo-redundant or not for server backup | bool | false | Not supported for the basic tier. |
359360
| administrator_login | The Administrator Login for the PostgreSQL Flexible Server. Changing this forces a new resource to be created. | string | "pgadmin" | The admin login name cannot be azure_superuser, azure_pg_admin, admin, administrator, root, guest, or public. It cannot start with pg_. See: [Microsoft Quickstart Server Database](https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/quickstart-create-server-portal) |
360361
| administrator_password | The Password associated with the administrator_login for the PostgreSQL Flexible Server | string | "my$up3rS3cretPassw0rd" | The password must contain between 8 and 128 characters and must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers (0 through 9), and non-alphanumeric characters (!, $, #, %, etc.). |
361-
| server_version | The version of the PostgreSQL Flexible server instance | string | "13" | Refer to the [SAS Viya Platform Administration Guide](https://documentation.sas.com/?cdcId=sasadmincdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#p1wq8ouke3c6ixn1la636df9oa1u) for the supported versions of PostgreSQL for the SAS Viya platform. |
362+
| server_version | The version of the PostgreSQL Flexible server instance | string | "15" | Refer to the [SAS Viya Platform Administration Guide](https://documentation.sas.com/?cdcId=sasadmincdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#p1wq8ouke3c6ixn1la636df9oa1u) for the supported versions of PostgreSQL for the SAS Viya platform. |
362363
| ssl_enforcement_enabled | Enforce SSL on connection to the Azure Database for PostgreSQL Flexible server instance | bool | true | |
363364
| connectivity_method | Network connectivity option to connect to your flexible server. There are two connectivity options available: Public access (allowed IP addresses) and Private access (VNet Integration). Defaults to public access with firewall rules enabled.| string | "public" | Valid options are `public` and `private`. See sample input file [here](../examples/sample-input-postgres.tfvars) and Private access documentation [here](./user/PostgreSQLPrivateAccess.md). For more details see [Networking overview](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-networking) |
364365
| postgresql_configurations | Sets a PostgreSQL Configuration value on a Azure PostgreSQL Flexible Server | list(object) | [] | More details can be found [here](https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/howto-configure-server-parameters-using-cli) |

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ module "aks" {
134134
aks_cluster_dns_prefix = "${var.prefix}-aks"
135135
aks_cluster_sku_tier = var.aks_cluster_sku_tier
136136
aks_cluster_location = var.location
137+
cluster_support_tier = var.cluster_support_tier
137138
fips_enabled = var.fips_enabled
138139
aks_cluster_node_auto_scaling = var.default_nodepool_min_nodes == var.default_nodepool_max_nodes ? false : true
139140
aks_cluster_node_count = var.default_nodepool_min_nodes
@@ -153,6 +154,7 @@ module "aks" {
153154
aks_log_analytics_workspace_id = var.create_aks_azure_monitor ? azurerm_log_analytics_workspace.viya4[0].id : null
154155
aks_network_plugin = var.aks_network_plugin
155156
aks_network_policy = var.aks_network_policy
157+
aks_network_plugin_mode = var.aks_network_plugin_mode
156158
aks_dns_service_ip = var.aks_dns_service_ip
157159
aks_docker_bridge_cidr = var.aks_docker_bridge_cidr
158160
cluster_egress_type = local.cluster_egress_type

modules/azure_aks/main.tf

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ resource "azurerm_kubernetes_cluster" "aks" {
1010
dns_prefix_private_cluster = var.aks_private_cluster && var.aks_cluster_private_dns_zone_id != "" ? var.aks_cluster_dns_prefix : null
1111

1212
sku_tier = var.aks_cluster_sku_tier
13+
support_plan = var.cluster_support_tier
1314
role_based_access_control_enabled = true
1415
http_application_routing_enabled = false
1516

@@ -21,9 +22,6 @@ resource "azurerm_kubernetes_cluster" "aks" {
2122
private_dns_zone_id = var.aks_private_cluster && var.aks_cluster_private_dns_zone_id != "" ? var.aks_cluster_private_dns_zone_id : (var.aks_private_cluster ? "System" : null)
2223

2324
network_profile {
24-
network_plugin = var.aks_network_plugin
25-
network_policy = var.aks_network_plugin == "kubenet" && var.aks_network_policy == "azure" ? null : var.aks_network_policy
26-
2725
# Docs on AKS Advanced Networking config
2826
# https://docs.microsoft.com/en-us/azure/architecture/aws-professional/networking
2927
# https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-vnet-plan-design-arm
@@ -32,12 +30,15 @@ resource "azurerm_kubernetes_cluster" "aks" {
3230
# https://docs.microsoft.com/en-us/azure/aks/load-balancer-standard
3331
# https://docs.microsoft.com/en-us/azure/aks/egress-outboundtype
3432

35-
service_cidr = var.aks_service_cidr
36-
dns_service_ip = var.aks_dns_service_ip
37-
pod_cidr = var.aks_network_plugin == "kubenet" ? var.aks_pod_cidr : null
38-
docker_bridge_cidr = var.aks_docker_bridge_cidr
39-
outbound_type = var.cluster_egress_type
40-
load_balancer_sku = "standard"
33+
network_plugin = var.aks_network_plugin
34+
network_policy = var.aks_network_policy
35+
network_plugin_mode = var.aks_network_plugin_mode
36+
service_cidr = var.aks_service_cidr
37+
dns_service_ip = var.aks_dns_service_ip
38+
pod_cidr = var.aks_network_plugin == "kubenet" ? var.aks_pod_cidr : null
39+
docker_bridge_cidr = var.aks_docker_bridge_cidr
40+
outbound_type = var.cluster_egress_type
41+
load_balancer_sku = "standard"
4142
}
4243

4344
dynamic "linux_profile" {
@@ -102,6 +103,14 @@ resource "azurerm_kubernetes_cluster" "aks" {
102103

103104
lifecycle {
104105
ignore_changes = [default_node_pool[0].node_count]
106+
precondition {
107+
condition = var.aks_network_policy != "azure" || var.aks_network_plugin == "azure"
108+
error_message = "When aks_network_policy is set to `azure`, the aks_network_plugin field can only be set to `azure`."
109+
}
110+
precondition {
111+
condition = var.aks_network_plugin_mode != "overlay" || var.aks_network_plugin == "azure"
112+
error_message = "When network_plugin_mode is set to `overlay`, the aks_network_plugin field can only be set to `azure`."
113+
}
105114
}
106115

107116
tags = var.aks_cluster_tags

modules/azure_aks/variables.tf

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,22 @@ variable "aks_cluster_location" {
2323
}
2424

2525
variable "aks_cluster_sku_tier" {
26-
description = "The SKU Tier that should be used for this Kubernetes Cluster. Possible values are Free and Standard (which includes the Uptime SLA). Defaults to Free"
26+
description = "The SKU Tier that should be used for this Kubernetes Cluster. Possible values are Free, Standard (which includes the Uptime SLA) and Premium. Defaults to Free"
2727
type = string
2828
default = "Free"
2929

3030
validation {
31-
condition = contains(["Free", "Standard"], var.aks_cluster_sku_tier)
32-
error_message = "ERROR: Valid types are \"Free\" and \"Standard\"!"
31+
condition = contains(["Free", "Standard", "Premium"], var.aks_cluster_sku_tier)
32+
error_message = "ERROR: Valid types are \"Free\", \"Standard\" and \"Premium\"!"
3333
}
3434
}
3535

36+
variable "cluster_support_tier" {
37+
description = "Specifies the support plan which should be used for this Kubernetes Cluster. Possible values are 'KubernetesOfficial' and 'AKSLongTermSupport'. Defaults to 'KubernetesOfficial'."
38+
type = string
39+
default = "KubernetesOfficial"
40+
}
41+
3642
variable "fips_enabled" {
3743
description = "Should the nodes in this Node Pool have Federal Information Processing Standard enabled? Changing this forces a new resource to be created."
3844
type = bool
@@ -133,7 +139,13 @@ variable "aks_network_plugin" {
133139
variable "aks_network_policy" {
134140
description = "Sets up network policy to be used with Azure CNI. Network policy allows us to control the traffic flow between pods. Currently supported values are calico and azure. Changing this forces a new resource to be created."
135141
type = string
136-
default = "azure"
142+
default = null
143+
}
144+
145+
variable "aks_network_plugin_mode" {
146+
description = "Specifies the network plugin mode used for building the Kubernetes network. Possible value is `overlay`. Changing this forces a new resource to be created."
147+
type = string
148+
default = null
137149
}
138150

139151
variable "aks_dns_service_ip" {

modules/azurerm_postgresql_flex/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ variable "administrator_password" {
5151
}
5252

5353
variable "server_version" {
54-
description = "Specifies the version of PostgreSQL to use. The version of PostgreSQL Flexible Server to use. Possible values are 11, 12 and 13. Changing this forces a new PostgreSQL Flexible Server to be created."
54+
description = "Specifies the version of PostgreSQL to use. The version of PostgreSQL Flexible Server to use. Possible values are from 12 - 15. Changing this forces a new PostgreSQL Flexible Server to be created."
5555
type = string
56-
default = "13"
56+
default = "15"
5757
}
5858

5959
variable "connectivity_method" {

variables.tf

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,24 @@ variable "location" {
5959
}
6060

6161
variable "aks_cluster_sku_tier" {
62-
description = "The SKU Tier that should be used for this Kubernetes Cluster. Possible values are Free and Standard (which includes the Uptime SLA). Defaults to Free"
62+
description = "The SKU Tier that should be used for this Kubernetes Cluster. Possible values are Free, Standard (which includes the Uptime SLA) and Premium. Defaults to Free"
6363
type = string
6464
default = "Free"
6565

6666
validation {
67-
condition = contains(["Free", "Standard"], var.aks_cluster_sku_tier)
68-
error_message = "ERROR: Valid types are \"Free\" and \"Standard\"!"
67+
condition = contains(["Free", "Standard", "Premium"], var.aks_cluster_sku_tier)
68+
error_message = "ERROR: Valid types are \"Free\", \"Standard\" and \"Premium\"!"
69+
}
70+
}
71+
72+
variable "cluster_support_tier" {
73+
description = "Specifies the support plan which should be used for this Kubernetes Cluster. Possible values are 'KubernetesOfficial' and 'AKSLongTermSupport'. Defaults to 'KubernetesOfficial'."
74+
type = string
75+
default = "KubernetesOfficial"
76+
77+
validation {
78+
condition = contains(["KubernetesOfficial", "AKSLongTermSupport"], var.cluster_support_tier)
79+
error_message = "ERROR: Valid types are \"KubernetesOfficial\" and \"AKSLongTermSupport\"!"
6980
}
7081
}
7182

@@ -169,12 +180,13 @@ variable "aks_network_plugin" {
169180
variable "aks_network_policy" {
170181
description = "Sets up network policy to be used with Azure CNI. Network policy allows control of the traffic flow between pods. Currently supported values are calico and azure. Changing this forces a new resource to be created."
171182
type = string
172-
default = "azure"
183+
default = null
184+
}
173185

174-
validation {
175-
condition = contains(["azure", "calico"], var.aks_network_policy)
176-
error_message = "Error: Currently the supported values are 'calico' and 'azure'."
177-
}
186+
variable "aks_network_plugin_mode" {
187+
description = "Specifies the network plugin mode used for building the Kubernetes network. Possible value is `overlay`. Changing this forces a new resource to be created."
188+
type = string
189+
default = null
178190
}
179191

180192
variable "aks_dns_service_ip" {
@@ -264,7 +276,7 @@ variable "postgres_server_defaults" {
264276
geo_redundant_backup_enabled = false
265277
administrator_login = "pgadmin"
266278
administrator_password = "my$up3rS3cretPassw0rd"
267-
server_version = "13"
279+
server_version = "15"
268280
ssl_enforcement_enabled = true
269281
connectivity_method = "public"
270282
postgresql_configurations = []

0 commit comments

Comments
 (0)