init
This commit is contained in:
19
terraform/modules/k8s/ceph/k8s-ceph-csi-rbd/helm.tf
Normal file
19
terraform/modules/k8s/ceph/k8s-ceph-csi-rbd/helm.tf
Normal file
@@ -0,0 +1,19 @@
|
||||
resource "helm_release" "ceph_csi_rbd" {
|
||||
name = "ceph-csi-rbd"
|
||||
namespace = kubernetes_namespace_v1.this.metadata[0].name
|
||||
repository = "https://ceph.github.io/csi-charts"
|
||||
chart = "ceph-csi-rbd"
|
||||
version = var.chart_version
|
||||
|
||||
create_namespace = false
|
||||
|
||||
values = [yamlencode({
|
||||
csiConfig = [{
|
||||
clusterID = var.ceph_cluster_id
|
||||
monitors = var.ceph_monitors
|
||||
}]
|
||||
provisioner = {
|
||||
replicaCount = 1
|
||||
}
|
||||
})]
|
||||
}
|
||||
3
terraform/modules/k8s/ceph/k8s-ceph-csi-rbd/namespace.tf
Normal file
3
terraform/modules/k8s/ceph/k8s-ceph-csi-rbd/namespace.tf
Normal file
@@ -0,0 +1,3 @@
|
||||
resource "kubernetes_namespace_v1" "this" {
|
||||
metadata { name = var.namespace }
|
||||
}
|
||||
15
terraform/modules/k8s/ceph/k8s-ceph-csi-rbd/variables.tf
Normal file
15
terraform/modules/k8s/ceph/k8s-ceph-csi-rbd/variables.tf
Normal file
@@ -0,0 +1,15 @@
|
||||
variable "namespace" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "chart_version" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "ceph_cluster_id" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "ceph_monitors" {
|
||||
type = list(string)
|
||||
}
|
||||
6
terraform/modules/k8s/ceph/k8s-ceph-csi-rbd/versions.tf
Normal file
6
terraform/modules/k8s/ceph/k8s-ceph-csi-rbd/versions.tf
Normal file
@@ -0,0 +1,6 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
helm = { source = "hashicorp/helm" }
|
||||
kubernetes = { source = "hashicorp/kubernetes" }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user