54 lines
No EOL
2 KiB
HCL
54 lines
No EOL
2 KiB
HCL
|
|
resource "oci_containerengine_addon" "cluster_autoscaler" {
|
|
count = var.oke_enable_autoscaler ? 1 : 0
|
|
|
|
#Required, a name uniquely identifies an add-on, see all supported add-on names in data.oci_containerengine_addon_options.all.addon_options
|
|
addon_name = "ClusterAutoscaler"
|
|
#Required
|
|
cluster_id = "${oci_containerengine_cluster.containerengine_cluster.id}"
|
|
#Required, remove the resource on addon deletion
|
|
remove_addon_resources_on_delete = true
|
|
|
|
#Optional, will override an existing installation if true and Addon already exists
|
|
override_existing = false
|
|
|
|
#Optional
|
|
dynamic configurations {
|
|
for_each = local.addon_clusterAutoscaler
|
|
content {
|
|
key = configurations.value.key
|
|
value = configurations.value.value
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "oci_containerengine_addon" "cluster_metricServer" {
|
|
count = var.oke_enable_metric_server ? 1 : 0
|
|
|
|
#Required, a name uniquely identifies an add-on, see all supported add-on names in data.oci_containerengine_addon_options.all.addon_options
|
|
addon_name = "KubernetesMetricsServer"
|
|
#Required
|
|
cluster_id = "${oci_containerengine_cluster.containerengine_cluster.id}"
|
|
#Required, remove the resource on addon deletion
|
|
remove_addon_resources_on_delete = true
|
|
|
|
#Optional, will override an existing installation if true and Addon already exists
|
|
override_existing = false
|
|
depends_on = [
|
|
oci_containerengine_addon.cluster_certManager
|
|
]
|
|
}
|
|
|
|
resource "oci_containerengine_addon" "cluster_certManager" {
|
|
count = var.oke_enable_cert_manager || var.oke_enable_metric_server ? 1 : 0
|
|
|
|
#Required, a name uniquely identifies an add-on, see all supported add-on names in data.oci_containerengine_addon_options.all.addon_options
|
|
addon_name = "CertManager"
|
|
#Required
|
|
cluster_id = "${oci_containerengine_cluster.containerengine_cluster.id}"
|
|
#Required, remove the resource on addon deletion
|
|
remove_addon_resources_on_delete = true
|
|
|
|
#Optional, will override an existing installation if true and Addon already exists
|
|
override_existing = false
|
|
} |