-
Notifications
You must be signed in to change notification settings - Fork 0
/
rook-ceph.tf
67 lines (55 loc) · 1.84 KB
/
rook-ceph.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
resource "null_resource" "rook_ceph" {
count = var.storage == "rook-ceph" ? 1 : 0
depends_on = [null_resource.setup_worker]
connection {
type = "ssh"
user = "root"
host = equinix_metal_device.k8s_controller.access_public_ipv4
private_key = tls_private_key.k8s_cluster_access_key.private_key_pem
}
provisioner "remote-exec" {
inline = [
"sleep 10",
"kubectl create -f https://raw.githubusercontent.com/rook/rook/${var.rook_ceph_version}/deploy/examples/crds.yaml"
]
}
provisioner "remote-exec" {
inline = [
"kubectl create -f https://raw.githubusercontent.com/rook/rook/${var.rook_ceph_version}/deploy/examples/common.yaml"
]
}
provisioner "remote-exec" {
inline = [
"kubectl create -f https://raw.githubusercontent.com/rook/rook/${var.rook_ceph_version}/deploy/examples/operator.yaml"
]
}
provisioner "remote-exec" {
inline = [
"sleep 5",
"kubectl create -f https://raw.githubusercontent.com/rook/rook/${var.rook_ceph_version}/deploy/examples/cluster.yaml"
]
}
provisioner "remote-exec" {
inline = [
"sleep 5",
"kubectl create -f https://raw.githubusercontent.com/rook/rook/${var.rook_ceph_version}/deploy/examples/csi/rbd/storageclass.yaml"
]
}
provisioner "remote-exec" {
inline = [
"sleep 5",
"kubectl patch storageclass rook-ceph-block -p '{\"metadata\": {\"annotations\":{\"storageclass.kubernetes.io/is-default-class\":\"true\"}}}'"
]
}
/*provisioner "file" {
source = "${path.module}/templates/wait-for-rook-ceph-cluster-creation.sh.tpl"
destination = "/tmp/wait-for-rook-ceph-cluster-creation.sh"
}
provisioner "remote-exec" {
inline = [
"sleep 5",
"chmod +x /tmp/wait-for-rook-ceph-cluster-creation.sh",
"/tmp/wait-for-rook-ceph-cluster-creation.sh"
]
}*/
}