diff --git a/oci-managed/oke/longhorn.tf b/oci-managed/oke/longhorn.tf index 3ab0d55..5623d66 100644 --- a/oci-managed/oke/longhorn.tf +++ b/oci-managed/oke/longhorn.tf @@ -1,5 +1,5 @@ resource "helm_release" "longhorn" { - count = var.install_longhorn ? 1 : 0 + count = var.install_longhorn ? 1 : 0 namespace = "longhorn-system" create_namespace = true name = "longhorn" @@ -11,3 +11,18 @@ resource "helm_release" "longhorn" { # Helm chart deployment can sometimes take longer than the default 5 minutes timeout = var.timeout_seconds } + +resource "kubernetes_annotations" "patch_oci-bv" { + count = var.install_longhorn ? 1 : 0 + depends_on = [helm_release.longhorn] + api_version = "storage.k8s.io/v1" + kind = "StorageClass" + + metadata { + name = "oci-bv" + } + + annotations = { + "storageclass.kubernetes.io/is-default-class" = "false" + } +} diff --git a/oci-managed/oke/provider.tf b/oci-managed/oke/provider.tf index 213fa54..70212bf 100644 --- a/oci-managed/oke/provider.tf +++ b/oci-managed/oke/provider.tf @@ -8,5 +8,9 @@ terraform { source = "hashicorp/helm" version = ">= 2.12.1" } + kubectl = { + source = "gavinbunney/kubectl" + version = ">= 1.14.0" + } } }