Skip to content

Commit

Permalink
feat(k8s): add namespace for running queryservice jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
m90 committed Dec 11, 2023
1 parent f07d8dd commit 8aa4bbf
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tf/env/local/namespaces.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,22 @@ resource "kubernetes_resource_quota" "adhoc-jobs-podquota" {
scopes = ["BestEffort"]
}
}

resource "kubernetes_namespace" "qs-job-namespace" {
metadata {
name = "qs-jobs"
}
}

resource "kubernetes_resource_quota" "api-jobs-podquota" {
metadata {
name = "api-jobs-podquota"
namespace = kubernetes_namespace.api-job-namespace.metadata[0].name
}
spec {
hard = {
pods = 2
}
scopes = ["BestEffort"]
}
}
23 changes: 23 additions & 0 deletions tf/env/production/namespaces.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,26 @@ resource "kubernetes_resource_quota" "adhoc-jobs-podquota" {
scopes = ["BestEffort"]
}
}

resource "kubernetes_namespace" "qs-job-namespace" {
provider = kubernetes.wbaas-3

metadata {
name = "qs-jobs"
}
}

resource "kubernetes_resource_quota" "qs-jobs-podquota" {
provider = kubernetes.wbaas-3

metadata {
name = "qs-jobs-podquota"
namespace = kubernetes_namespace.qs-job-namespace.metadata[0].name
}
spec {
hard = {
pods = 4
}
scopes = ["BestEffort"]
}
}
23 changes: 23 additions & 0 deletions tf/env/staging/namespaces.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,26 @@ resource "kubernetes_resource_quota" "adhoc-jobs-podquota" {
scopes = ["BestEffort"]
}
}

resource "kubernetes_namespace" "qs-job-namespace" {
provider = kubernetes.wbaas-2

metadata {
name = "qs-jobs"
}
}

resource "kubernetes_resource_quota" "qs-jobs-podquota" {
provider = kubernetes.wbaas-2

metadata {
name = "qs-jobs-podquota"
namespace = kubernetes_namespace.qs-job-namespace.metadata[0].name
}
spec {
hard = {
pods = 2
}
scopes = ["BestEffort"]
}
}

0 comments on commit 8aa4bbf

Please sign in to comment.