mirror of
https://github.com/vcscsvcscs/OCI-Kubernetes-cluster-with-traefik.git
synced 2025-08-12 13:59:09 +02:00
set longhorn as default storageclass
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
@@ -8,5 +8,9 @@ terraform {
|
||||
source = "hashicorp/helm"
|
||||
version = ">= 2.12.1"
|
||||
}
|
||||
kubectl = {
|
||||
source = "gavinbunney/kubectl"
|
||||
version = ">= 1.14.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user