fix up nlb config

This commit is contained in:
2024-03-03 19:25:29 +01:00
parent 0ca08d2ac3
commit ff933a317e
11 changed files with 1026 additions and 24 deletions

View File

@@ -6,9 +6,21 @@ data "oci_core_images" "latest_image" {
compartment_id = var.compartment_ocid
operating_system = "Oracle Linux"
operating_system_version = "8.8"
shape = "VM.Standard.A1.Flex"
filter {
name = "display_name"
values = ["^.*aarch64-.*$"]
regex = true
}
}
data "oci_containerengine_cluster_kube_config" "cluster_kube_config" {
#Required
cluster_id = oci_containerengine_cluster.k8s_cluster.id
token_version = "2.0.0"
}
resource "local_file" "oke_kubeconfig" {
content = data.oci_containerengine_cluster_kube_config.cluster_kube_config.content
filename = "${path.module}/kubeconfig"
}

View File

@@ -21,7 +21,7 @@ resource "oci_containerengine_node_pool" "k8s_node_pool" {
}
node_source_details {
image_id = data.oci_core_images.latest_image.images.0.id
image_id = var.node_image_ocid
source_type = "image"
}

View File

@@ -12,9 +12,11 @@ variable "kubernetes_version" {
variable "ssh_public_key" {
type = string
}
variable "node_image_ocid" {
default = "ocid1.image.oc1.eu-frankfurt-1.aaaaaaaaiiymiaz2loraurxo6dgj5y4oiturf4inrkzvwimzw3d2a42kns6q"
}
variable "node_availability_domains" {
type = list(string)
default = data.oci_identity_availability_domains.ads.availability_domains[*].name
}
variable "node_pool_size" {
type = number
@@ -34,4 +36,3 @@ variable "vcn_public_subnet_id" {
variable "vcn_private_subnet_id" {
type = string
}