-
Notifications
You must be signed in to change notification settings - Fork 5
/
chart.tf
116 lines (111 loc) · 2.56 KB
/
chart.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
module "release" {
source = "terraform-module/release/helm"
depends_on = [
module.mongodb_backup_s3_storage_user
]
version = "2.7.0"
namespace = var.namespace
repository = "https://charts.helm.sh/stable"
app = {
name = var.app_name
version = var.app_version
chart = "${path.module}/helm/mongodb-backup-aws"
force_update = true
wait = false
recreate_pods = false
deploy = 1
}
values = []
set = [
{
name = "resources.limits.cpu"
value = "${var.resources.limits.cpu}"
},
{
name = "resources.limits.memory"
value = "${var.resources.limits.memory}"
},
{
name = "resources.requests.cpu"
value = "${var.resources.requests.cpu}"
},
{
name = "resources.requests.memory"
value = "${var.resources.requests.memory}"
},
{
name = "volume.storageClass"
value = "${var.volume_storageClass}"
},
{
name = "volume.size"
value = "${var.volume_size}"
},
{
name = "config.MONGODB_HOST"
value = "${var.mongodb_host}"
},
{
name = "config.MONGODB_PORT"
value = "${var.mongodb_port}"
},
{
name = "config.MONGODB_DATABASE"
value = "${var.mongodb_database}"
},
{
name = "config.MONGODB_EXCLUDE_COLLECTIONS"
value = "${var.mongodb_exclude_collections}"
},
{
name = "config.S3_BUCKET"
value = "${var.s3_bucket}"
},
{
name = "config.AWS_DEFAULT_REGION"
value = "${var.aws_default_region}"
},
{
name = "config.CRON_SCHEDULE"
value = "${var.cron_schedule}"
},
{
name = "config.MAX_BACKUPS"
value = "${var.max_backups}"
},
{
name = "config.INIT_BACKUP"
value = "${var.init_backup}"
},
{
name = "config.INIT_RESTORE"
value = "${var.init_restore}"
},
{
name = "config.RUN_AS_DAEMON"
value = "${var.run_as_daemon}"
},
{
name = "config.MONGODB_URI"
value = "${var.mongodb_uri}"
}
]
set_sensitive = [
{
path = "config.AWS_ACCESS_KEY_ID"
value = "${module.mongodb_backup_s3_storage_user.iam_access_key_id}"
},
{
path = "config.AWS_SECRET_ACCESS_KEY"
value = "${module.mongodb_backup_s3_storage_user.iam_access_key_secret}"
},
{
path = "config.MONGODB_INITDB_ROOT_USERNAME"
value = "${var.mongodb_username}"
},
{
path = "config.MONGODB_INITDB_ROOT_PASSWORD"
value = "${var.mongodb_password}"
},
]
}