diff --git a/oci-managed/oke/longhorn.tf b/oci-managed/oke/longhorn.tf new file mode 100644 index 0000000..3ab0d55 --- /dev/null +++ b/oci-managed/oke/longhorn.tf @@ -0,0 +1,13 @@ +resource "helm_release" "longhorn" { + count = var.install_longhorn ? 1 : 0 + namespace = "longhorn-system" + create_namespace = true + name = "longhorn" + repository = "https://charts.longhorn.io" + chart = "longhorn" + version = var.longhorn_chart_version + cleanup_on_fail = true + + # Helm chart deployment can sometimes take longer than the default 5 minutes + timeout = var.timeout_seconds +} diff --git a/oci-managed/oke/variables.tf b/oci-managed/oke/variables.tf index 6576d84..7ffc6f3 100644 --- a/oci-managed/oke/variables.tf +++ b/oci-managed/oke/variables.tf @@ -29,6 +29,19 @@ variable "tiller_enabled" { default = false } +variable "install_longhorn" { + default = true +} +variable "longhorn_chart_version" { + default = "1.6.1" +} +# Helm chart deployment can sometimes take longer than the default 5 minutes +variable "timeout_seconds" { + type = number + description = "Helm chart deployment can sometimes take longer than the default 5 minutes. Set a custom timeout here." + default = 800 # 10 minutes +} + variable "vcn_id" {} variable "vcn_public_subnet_id" { type = string