-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-redis.tf
52 lines (43 loc) · 957 Bytes
/
k8s-redis.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
resource "kubernetes_namespace" "redis" {
metadata {
name = "redis"
annotations = {}
labels = {}
}
}
resource "random_password" "redis-password" {
length = 64
special = false
}
resource "kubernetes_secret" "redis-password" {
metadata {
name = "redis-password"
}
data = {
"password" = random_password.redis-password.result
}
type = "kubernetes.io/secret"
}
resource "helm_release" "redis" {
name = "redis"
repository = "https://charts.bitnami.com/bitnami"
chart = "redis"
version = "18.12.0"
namespace = kubernetes_namespace.redis.metadata[0].name
set {
name = "global.redis.password"
value = random_password.redis-password.result
}
set {
name = "master.persistence.enabled"
value = "false"
}
set {
name = "replica.persistence.enabled"
value = "false"
}
set {
name = "replica.replicaCount"
value = "0"
}
}