mirror of
https://github.com/vcscsvcscs/OCI-Kubernetes-cluster-with-traefik.git
synced 2025-08-13 22:39:06 +02:00
set longhorn as default storageclass
This commit is contained in:
@@ -11,3 +11,18 @@ resource "helm_release" "longhorn" {
|
|||||||
# Helm chart deployment can sometimes take longer than the default 5 minutes
|
# Helm chart deployment can sometimes take longer than the default 5 minutes
|
||||||
timeout = var.timeout_seconds
|
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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -8,5 +8,9 @@ terraform {
|
|||||||
source = "hashicorp/helm"
|
source = "hashicorp/helm"
|
||||||
version = ">= 2.12.1"
|
version = ">= 2.12.1"
|
||||||
}
|
}
|
||||||
|
kubectl = {
|
||||||
|
source = "gavinbunney/kubectl"
|
||||||
|
version = ">= 1.14.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user