-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrontend.tf
78 lines (68 loc) · 1.51 KB
/
frontend.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
resource "kubernetes_service" "frontend" {
metadata {
name = "frontend"
labels = {
"gropius.app" = "frontend"
}
namespace = kubernetes_namespace.gropius.metadata[0].name
}
spec {
port {
name = "80"
port = 80
target_port = 80
}
selector = {
"gropius.app" = "frontend"
}
}
}
resource "kubernetes_deployment" "frontend" {
metadata {
name = "frontend"
labels = {
"gropius.app" = "frontend"
}
namespace = kubernetes_namespace.gropius.metadata[0].name
}
spec {
replicas = 1
selector {
match_labels = {
"gropius.app" = "frontend"
}
}
template {
metadata {
labels = {
"gropius.app" = "frontend"
}
}
spec {
container {
name = "frontend"
image = "ghcr.io/ccims/gropius-frontend:${var.gropius_version}"
image_pull_policy = "Always"
env {
name = "LOGIN_SERVICE_ENDPOINT"
value = "http://login-service:3000"
}
env {
name = "API_PUBLIC_ENDPOINT"
value = "http://api-public:8080/graphql"
}
liveness_probe {
http_get {
port = "80"
path = "/"
}
failure_threshold = 20
initial_delay_seconds = 30
period_seconds = 5
timeout_seconds = 10
}
}
}
}
}
}