File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ resource "helm_release" "moodle_deployment" {
2
+ name = " moodle"
3
+ repository = " oci://registry-1.docker.io/bitnamicharts"
4
+ chart = " moodle"
5
+ version = " 25.1.2"
6
+ namespace = kubernetes_namespace. moodle_namespace . metadata . 0 . name
7
+
8
+ set {
9
+ name = " ingress.enabled"
10
+ value = " true"
11
+ }
12
+
13
+ set {
14
+ name = " ingress.hosts[0]"
15
+ value = " moodle.serlo-staging.dev"
16
+ }
17
+
18
+ set {
19
+ name = " serviceType"
20
+ value = " ClusterIP"
21
+ }
22
+ }
23
+
24
+
25
+ resource "kubernetes_namespace" "moodle_namespace" {
26
+ metadata {
27
+ name = " moodle"
28
+ }
29
+ }
30
+
31
+ resource "kubernetes_secret" "moodle_tls_certificate" {
32
+ type = " kubernetes.io/tls"
33
+
34
+ metadata {
35
+ name = " moodle-tls-secret"
36
+ namespace = kubernetes_namespace. moodle_namespace . metadata . 0 . name
37
+ }
38
+
39
+ data = {
40
+ " tls.crt" = module.cert.crt
41
+ " tls.key" = module.cert.key
42
+ }
43
+ }
44
+
45
+ module "cert" {
46
+ source = " ../../modules/tls-self-signed-cert"
47
+ domain = " moodle.serlo-staging.dev"
48
+ }
49
+
50
+ module "moodle_ingress" {
51
+ source = " ../../modules/ingress"
52
+
53
+ name = " moodle"
54
+ namespace = kubernetes_namespace. api_namespace . metadata . 0 . name
55
+ host = " moodle.${ local . domain } "
56
+ backend = {
57
+ service_name = " moodle"
58
+ service_port = 80
59
+ }
60
+ enable_tls = true
61
+ }
You can’t perform that action at this time.
0 commit comments