Skip to content

Commit

Permalink
update to g4 flavors (#25)
Browse files Browse the repository at this point in the history
Bug: T368076
  • Loading branch information
vivian-rook authored Jun 20, 2024
1 parent 0b213b7 commit a974d90
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 11 deletions.
9 changes: 2 additions & 7 deletions tofu/126-2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ resource "openstack_containerinfra_cluster_v1" "k8s_126_2" {
node_count = var.workers[var.datacenter]
}

resource "local_file" "kube_config" {
content = resource.openstack_containerinfra_cluster_v1.k8s_126_2.kubeconfig.raw_config
filename = "kube.config"
}

resource "openstack_containerinfra_clustertemplate_v1" "template_126_2" {
name = "superset${var.name[var.datacenter]}-126-2"
coe = "kubernetes"
Expand All @@ -19,10 +14,10 @@ resource "openstack_containerinfra_clustertemplate_v1" "template_126_2" {
external_network_id = var.external_network_id[var.datacenter]
fixed_subnet = var.fixed_subnet[var.datacenter]
fixed_network = var.fixed_network[var.datacenter]
flavor = var.worker_flavor[var.datacenter]
flavor = "g3.cores2.ram4.disk20"
floating_ip_enabled = "false"
image = "Fedora-CoreOS-38"
master_flavor = var.control_flavor[var.datacenter]
master_flavor = "g3.cores2.ram4.disk20"
network_driver = "flannel"

labels = {
Expand Down
36 changes: 36 additions & 0 deletions tofu/127.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
resource "openstack_containerinfra_cluster_v1" "k8s_127" {
name = "superset${var.name[var.datacenter]}-127"
cluster_template_id = resource.openstack_containerinfra_clustertemplate_v1.template_127.id
master_count = 1
node_count = var.workers[var.datacenter]
}

resource "local_file" "kube_config" {
content = resource.openstack_containerinfra_cluster_v1.k8s_127.kubeconfig.raw_config
filename = "kube.config"
}

resource "openstack_containerinfra_clustertemplate_v1" "template_127" {
name = "superset${var.name[var.datacenter]}-127"
coe = "kubernetes"
dns_nameserver = "8.8.8.8"
docker_storage_driver = "overlay2"
docker_volume_size = "50"
external_network_id = var.external_network_id[var.datacenter]
fixed_subnet = var.fixed_subnet[var.datacenter]
fixed_network = var.fixed_network[var.datacenter]
flavor = var.worker_flavor[var.datacenter]
floating_ip_enabled = "false"
image = "Fedora-CoreOS-38"
master_flavor = var.control_flavor[var.datacenter]
network_driver = "flannel"

labels = {
kube_tag = "v1.26.8-rancher1"
container_runtime = "containerd"
containerd_version = "1.6.20"
containerd_tarball_sha256 = "1d86b534c7bba51b78a7eeb1b67dd2ac6c0edeb01c034cc5f590d5ccd824b416"
hyperkube_prefix = "docker.io/rancher/"
cloud_provider_enabled = "true"
}
}
8 changes: 4 additions & 4 deletions tofu/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ variable "application_credential_id" {
variable "worker_flavor" {
type = map(any)
default = {
"codfw1dev" = "g3.cores1.ram2.disk20"
"eqiad1" = "g3.cores2.ram4.disk20"
"codfw1dev" = "g4.cores1.ram2.disk20"
"eqiad1" = "g4.cores2.ram4.disk20"
}
}
variable "control_flavor" {
type = map(any)
default = {
"codfw1dev" = "g3.cores1.ram2.disk20"
"eqiad1" = "g3.cores2.ram4.disk20"
"codfw1dev" = "g4.cores1.ram2.disk20"
"eqiad1" = "g4.cores2.ram4.disk20"
}
}
variable "external_network_id" {
Expand Down

0 comments on commit a974d90

Please sign in to comment.