From 5e2a1a31eadd79145c54ea37d558d0042e3e6e7d Mon Sep 17 00:00:00 2001 From: Colin Saliceti Date: Fri, 10 Jan 2025 17:13:55 +0000 Subject: [PATCH] Pin postgres and redis to the application node pool Use the node_selector to pin the pods to the application node pool. The default node pool is reserved for the system. --- aks/postgres/resources.tf | 3 ++- aks/redis/resources.tf | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/aks/postgres/resources.tf b/aks/postgres/resources.tf index 210caeb..bd0ecf8 100644 --- a/aks/postgres/resources.tf +++ b/aks/postgres/resources.tf @@ -290,7 +290,8 @@ resource "kubernetes_deployment" "main" { } spec { node_selector = { - "kubernetes.io/os" : "linux" + "teacherservices.cloud/node_pool" = "applications" + "kubernetes.io/os" = "linux" } container { name = local.kubernetes_name diff --git a/aks/redis/resources.tf b/aks/redis/resources.tf index 72a08e8..9764046 100644 --- a/aks/redis/resources.tf +++ b/aks/redis/resources.tf @@ -141,7 +141,8 @@ resource "kubernetes_deployment" "main" { } spec { node_selector = { - "kubernetes.io/os" : "linux" + "teacherservices.cloud/node_pool" = "applications" + "kubernetes.io/os" = "linux" } container { name = local.kubernetes_name