Skip to content

Commit

Permalink
fix(gke-cluster): update gke-cluster config
Browse files Browse the repository at this point in the history
Signed-off-by: Ales Verbic <[email protected]>
  • Loading branch information
verbotenj committed Dec 18, 2024
1 parent e0a6923 commit c2d6e80
Show file tree
Hide file tree
Showing 10 changed files with 371 additions and 182 deletions.
148 changes: 92 additions & 56 deletions common/defaults-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,35 @@ vpc_cidr: "10.6.0.0/16"
dmtr_namespace: dmtr-system
dmtr_context: k3d-dmtr-cluster
managed_node_groups:
# GKE
- name: gke-system-az1
labels:
gke-managed-components: "true"
instance_type: n2-standard-2
min_size: 1
max_size: 1
desired_capacity: 1
disk_size_gb: 40
disk_type: pd-ssd
taints:
- key: components.gke.io/gke-managed-components
value: "true"
effect: NO_SCHEDULE
availability_zones: us-central1-a
- name: gke-system-az2
labels:
gke-managed-components: "true"
instance_type: n2-standard-2
min_size: 1
max_size: 1
desired_capacity: 1
disk_size_gb: 40
disk_type: pd-ssd
taints:
- key: components.gke.io/gke-managed-components
value: "true"
effect: NO_SCHEDULE
availability_zones: us-central1-b
# Consistent
- name: co-ad-x86-az1
labels:
Expand Down Expand Up @@ -63,11 +92,12 @@ managed_node_groups:
demeter.run/compute-profile: general-purpose
demeter.run/compute-arch: x86
demeter.run/availability-zone: az1
instance_type: n2-standard-8
instance_type: n2-standard-2
min_size: 0
max_size: 1
desired_capacity: 0
disk_size_gb: 100
disk_type: pd-balanced
taints:
- key: demeter.run/availability-sla
value: "consistent"
Expand All @@ -80,63 +110,66 @@ managed_node_groups:
effect: NO_SCHEDULE
availability_zones: us-central1-a

- name: co-gp-x86-az2
labels:
demeter.run/availability-sla: consistent
demeter.run/compute-profile: general-purpose
demeter.run/compute-arch: x86
demeter.run/availability-zone: az1
instance_type: n2-standard-8
min_size: 0
max_size: 1
desired_capacity: 0
disk_size_gb: 100
taints:
- key: demeter.run/availability-sla
value: "consistent"
effect: NO_SCHEDULE
- key: demeter.run/compute-profile
value: "general-purpose"
effect: NO_SCHEDULE
- key: demeter.run/compute-arch
value: "x86"
effect: NO_SCHEDULE
availability_zones: us-central1-b
# - name: co-gp-x86-az2
# labels:
# demeter.run/availability-sla: consistent
# demeter.run/compute-profile: general-purpose
# demeter.run/compute-arch: x86
# demeter.run/availability-zone: az1
# instance_type: n2-standard-2
# min_size: 0
# max_size: 1
# desired_capacity: 0
# disk_size_gb: 100
# disk_type: pd-balanced
# taints:
# - key: demeter.run/availability-sla
# value: "consistent"
# effect: NO_SCHEDULE
# - key: demeter.run/compute-profile
# value: "general-purpose"
# effect: NO_SCHEDULE
# - key: demeter.run/compute-arch
# value: "x86"
# effect: NO_SCHEDULE
# availability_zones: us-central1-b

- name: co-gp-arm64-az1
labels:
demeter.run/availability-sla: consistent
demeter.run/compute-profile: general-purpose
demeter.run/compute-arch: arm64
demeter.run/availability-zone: az1
instance_type: t2a-standard-8
min_size: 0
max_size: 1
desired_capacity: 0
disk_size_gb: 100
taints:
- key: demeter.run/availability-sla
value: "consistent"
effect: NO_SCHEDULE
- key: demeter.run/compute-profile
value: "general-purpose"
effect: NO_SCHEDULE
- key: demeter.run/compute-arch
value: "arm64"
effect: NO_SCHEDULE
availability_zones: us-central1-a
# - name: co-gp-arm64-az1
# labels:
# demeter.run/availability-sla: consistent
# demeter.run/compute-profile: general-purpose
# demeter.run/compute-arch: arm64
# demeter.run/availability-zone: az1
# instance_type: c4a-standard-8
# min_size: 0
# max_size: 1
# desired_capacity: 0
# disk_size_gb: 100
# disk_type: hyperdisk-balanced
# taints:
# - key: demeter.run/availability-sla
# value: "consistent"
# effect: NO_SCHEDULE
# - key: demeter.run/compute-profile
# value: "general-purpose"
# effect: NO_SCHEDULE
# - key: demeter.run/compute-arch
# value: "arm64"
# effect: NO_SCHEDULE
# availability_zones: us-central1-a

- name: co-mem-x86-az1
labels:
demeter.run/availability-sla: consistent
demeter.run/compute-profile: mem-intensive
demeter.run/compute-arch: x86
demeter.run/availability-zone: az1
instance_type: n2-highmem-8
instance_type: n2-standard-4
min_size: 0
max_size: 1
desired_capacity: 0
disk_size_gb: 100
disk_type: pd-standard
taints:
- key: demeter.run/availability-sla
value: "consistent"
Expand All @@ -155,11 +188,12 @@ managed_node_groups:
demeter.run/compute-profile: mem-intensive
demeter.run/compute-arch: arm64
demeter.run/availability-zone: az1
instance_type: t2a-standard-16
instance_type: c4a-standard-4
min_size: 0
max_size: 1
desired_capacity: 0
disk_size_gb: 100
disk_type: hyperdisk-balanced
taints:
- key: demeter.run/availability-sla
value: "consistent"
Expand All @@ -172,50 +206,52 @@ managed_node_groups:
effect: NO_SCHEDULE
availability_zones: us-central1-a

# Best Effort
- name: be-gp-x86-az1
# Disk Intensive
- name: be-di-x86-az1
labels:
demeter.run/availability-sla: best-effort
demeter.run/compute-profile: general-purpose
demeter.run/compute-arch: x86
demeter.run/availability-zone: az1
instance_type: n2-standard-8
instance_type: n2-standard-4
min_size: 0
max_size: 1
desired_capacity: 1
disk_size_gb: 100
disk_type: pd-ssd
spot: true
taints:
- key: demeter.run/availability-sla
value: "best-effort"
value: "consistent"
effect: NO_SCHEDULE
- key: demeter.run/compute-profile
value: "general-purpose"
value: "disk-intensive"
effect: NO_SCHEDULE
- key: demeter.run/compute-arch
value: "x86"
effect: NO_SCHEDULE
availability_zones: us-central1-a

- name: be-gp-arm64-az1
- name: be-di-arm64-az1
labels:
demeter.run/availability-sla: best-effort
demeter.run/compute-profile: general-purpose
demeter.run/compute-arch: arm64
demeter.run/availability-zone: az1
# Google supports one instance type per node group
instance_type: t2a-standard-8
instance_type: t2a-standard-4
min_size: 0
max_size: 1
desired_capacity: 1
disk_size_gb: 100
disk_type: pd-ssd
spot: true
taints:
- key: demeter.run/availability-sla
value: "best-effort"
value: "consistent"
effect: NO_SCHEDULE
- key: demeter.run/compute-profile
value: "general-purpose"
value: "disk-intensive"
effect: NO_SCHEDULE
- key: demeter.run/compute-arch
value: "arm64"
Expand Down
8 changes: 4 additions & 4 deletions modules/common/cert-manager/stage2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ resource "helm_release" "cert-manager" {

set {
name = "tolerations[2].value"
value = "admin"
value = "consistent"
}

set {
Expand Down Expand Up @@ -113,7 +113,7 @@ resource "helm_release" "cert-manager" {

set {
name = "webhook.tolerations[2].value"
value = "admin"
value = "consistent"
}

set {
Expand Down Expand Up @@ -163,7 +163,7 @@ resource "helm_release" "cert-manager" {

set {
name = "cainjector.tolerations[2].value"
value = "admin"
value = "consistent"
}

set {
Expand Down Expand Up @@ -213,7 +213,7 @@ resource "helm_release" "cert-manager" {

set {
name = "startupapicheck.tolerations[2].value"
value = "admin"
value = "consistent"
}

# set {
Expand Down
45 changes: 45 additions & 0 deletions modules/gcp/storage-classes/stage1/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,48 @@ resource "kubernetes_storage_class" "gp" {
"type" = "pd-balanced"
}
}

resource "kubernetes_storage_class" "fast" {
metadata {
name = "fast"
}

allow_volume_expansion = true
storage_provisioner = "pd.csi.storage.gke.io"
reclaim_policy = "Delete"
volume_binding_mode = "Immediate"

parameters = {
"type" = "pd-balanced"
}
}

resource "kubernetes_storage_class" "hyperdisk-balanced" {
metadata {
name = "hyperdisk-balanced"
}

allow_volume_expansion = true
storage_provisioner = "pd.csi.storage.gke.io"
reclaim_policy = "Delete"
volume_binding_mode = "WaitForFirstConsumer"

parameters = {
"type" = "hyperdisk-balanced"
}
}

resource "kubernetes_storage_class" "hyperdisk-balanced-immediate" {
metadata {
name = "hyperdisk-balanced-immediate"
}

allow_volume_expansion = true
storage_provisioner = "pd.csi.storage.gke.io"
reclaim_policy = "Delete"
volume_binding_mode = "Immediate"

parameters = {
"type" = "hyperdisk-balanced"
}
}
12 changes: 6 additions & 6 deletions stage0/gcp-terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c2d6e80

Please sign in to comment.