-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.tf
84 lines (79 loc) · 2.04 KB
/
main.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# kind https://kind.sigs.k8s.io/-
provider "kind" {
# configuration options
}
resource "kind_cluster" "ortelius" {
name = var.kind_cluster_name
node_image = "kindest/node:v1.25.3"
kubeconfig_path = pathexpand(var.kind_cluster_config_path)
wait_for_ready = true
kind_config {
kind = "Cluster"
api_version = "kind.x-k8s.io/v1alpha4"
node {
role = "control-plane"
kubeadm_config_patches = [
"kind: InitConfiguration\nnodeRegistration:\n kubeletExtraArgs:\n node-labels: \"kubernetes.io/os=linux\"\n"
]
# ortelius http port
extra_port_mappings {
container_port = 31000
host_port = 8080
listen_address = "0.0.0.0"
}
# postgresql port
extra_port_mappings {
container_port = 31316
host_port = 5432
listen_address = "0.0.0.0"
}
}
node {
role = "worker"
# postgres persistent volume
extra_mounts {
host_path = "/tmp/postgres"
container_path = "/pgdata"
}
}
}
}
# ortelius
# https://artifacthub.io/packages/helm/ortelius/ortelius
resource "helm_release" "ortelius" {
name = "ortelius"
chart = "ortelius"
repository = "https://ortelius.github.io/ortelius-charts/"
namespace = var.ortelius_namespace
create_namespace = true
recreate_pods = true
depends_on = [kind_cluster.ortelius]
timeout = 900
dependency_update = true
replace = true
# global ingress nginx controller
set {
name = "global.ingress.nginx.controller"
value = "true"
}
# node port for ui access from localhost
set {
name = "ms-nginx.ingress.nodePort"
value = "31000"
}
# postgres global
set {
name = "global.postgresql.enabled"
value = "true"
}
# node port for postgres access from localhost
set {
name = "ms-postgres.ingress.nodePort"
value = "31316"
}
# postgres password
set {
name = "ms-general.dbpass"
value = "postgres"
}
}