Skip to content

Commit

Permalink
Merge pull request #273 from sassoftware/staging
Browse files Browse the repository at this point in the history
6.1.0 - December 19, 2022
  • Loading branch information
jarpat authored Dec 19, 2022
2 parents ab66dbd + 3d9c5d3 commit 36d2104
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 4 deletions.
5 changes: 4 additions & 1 deletion docs/CONFIG-VARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ Ubuntu 20.04 LTS is the operating system used on the Jump/NFS servers. Ubuntu cr
| aks_identity | Use UserAssignedIdentity or Service Principal as [AKS identity](https://docs.microsoft.com/en-us/azure/aks/concepts-identity) | string | "uai" | A value of `uai` wil create a Managed Identity based on the permissions of the authenticated user or use [`AKS_UAI_NAME`](#use-existing), if set. A value of `sp` will use values from [`CLIENT_ID`/`CLIENT_SECRET`](#azure-authentication), if set. |
| 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` |
| cluster_api_mode | Public or private IP for the cluster api | string | "public" | Valid Values: "public", "private" |
| aks_cluster_sku_tier | Optimizes api server for cost vs availability | string | "Free" | Valid Values: "Free", "Paid" |

## Node Pools

Expand Down Expand Up @@ -204,6 +205,8 @@ Additional node pools can be created separate from the default node pool. This i

The default values for the `node_pools` variable are as follows:

**Note**: SAS recommends that you maintain a minimum of 1 node in the pool for `compute` workloads. This allocation ensures that compute-related pods have the required images pulled and ready for use in the environment..

```yaml
{
cas = {
Expand All @@ -220,7 +223,7 @@ The default values for the `node_pools` variable are as follows:
compute = {
"machine_type" = "Standard_E16s_v3"
"os_disk_size" = 200
"min_nodes" = 0
"min_nodes" = 1
"max_nodes" = 5
"max_pods" = 110
"node_taints" = ["workload.sas.com/class=compute:NoSchedule"]
Expand Down
4 changes: 2 additions & 2 deletions examples/sample-input-minimal.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ container_registry_admin_enabled = false

# AKS config
kubernetes_version = "1.23.8"
default_nodepool_min_nodes = 1
default_nodepool_min_nodes = 2
default_nodepool_vm_type = "Standard_D4_v3"
#v3 still has local temp storage
default_nodepool_vm_type = "Standard_D2_v3"

# AKS Node Pools config - minimal
cluster_node_pool_mode = "minimal"
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ module "aks" {
aks_cluster_rg = local.aks_rg.name
aks_cluster_rg_id = local.aks_rg.id
aks_cluster_dns_prefix = "${var.prefix}-aks"
aks_cluster_sku_tier = var.aks_cluster_sku_tier
aks_cluster_location = var.location
aks_cluster_node_auto_scaling = var.default_nodepool_min_nodes == var.default_nodepool_max_nodes ? false : true
aks_cluster_node_count = var.default_nodepool_min_nodes
Expand Down
1 change: 1 addition & 0 deletions modules/azure_aks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ resource "azurerm_kubernetes_cluster" "aks" {
location = var.aks_cluster_location
resource_group_name = var.aks_cluster_rg
dns_prefix = var.aks_cluster_dns_prefix
sku_tier = var.aks_cluster_sku_tier
role_based_access_control_enabled = true
http_application_routing_enabled = false

Expand Down
10 changes: 10 additions & 0 deletions modules/azure_aks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ variable "aks_cluster_location" {
default = "eastus"
}

variable aks_cluster_sku_tier {
description = "The SKU Tier that should be used for this Kubernetes Cluster. Possible values are Free and Paid (which includes the Uptime SLA). Defaults to Free"
default = "Free"

validation {
condition = contains(["Free", "Paid"], var.aks_cluster_sku_tier)
error_message = "ERROR: Valid types are \"Free\" and \"Paid\"!"
}
}

variable "aks_private_cluster" {
default = false
}
Expand Down
13 changes: 12 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ variable "location" {
default = "eastus"
}

variable aks_cluster_sku_tier {
description = "The SKU Tier that should be used for this Kubernetes Cluster. Possible values are Free and Paid (which includes the Uptime SLA). Defaults to Free"
default = "Free"
type = string

validation {
condition = contains(["Free", "Paid"], var.aks_cluster_sku_tier)
error_message = "ERROR: Valid types are \"Free\" and \"Paid\"!"
}
}

variable "ssh_public_key" {
type = string
default = "~/.ssh/id_rsa.pub"
Expand Down Expand Up @@ -394,7 +405,7 @@ variable "node_pools" {
compute = {
"machine_type" = "Standard_E16s_v3"
"os_disk_size" = 200
"min_nodes" = 0
"min_nodes" = 1
"max_nodes" = 5
"max_pods" = 110
"node_taints" = ["workload.sas.com/class=compute:NoSchedule"]
Expand Down

0 comments on commit 36d2104

Please sign in to comment.