-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathk8s-percona-mongodb.tf
97 lines (86 loc) · 2.18 KB
/
k8s-percona-mongodb.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
# resource "helm_release" "percona-mongodb-operator" {
# name = "percona-mongodb-operator"
# repository = "https://percona.github.io/percona-helm-charts/"
# chart = "psmdb-operator"
# version = "1.17.0"
# }
# resource "random_password" "percona-mongodb-database-password" {
# length = 64
# special = false
# }
# resource "kubernetes_secret" "percona-mongodb-database-password" {
# metadata {
# name = "percona-mongodb-database-password"
# }
# data = {
# "password" = random_password.percona-mongodb-database-password.result
# }
# type = "kubernetes.io/secret"
# lifecycle {
# ignore_changes = [ metadata ]
# }
# }
# resource "helm_release" "percona-mongodb-db" {
# name = "percona-mongodb-db"
# repository = "https://percona.github.io/percona-helm-charts/"
# chart = "psmdb-db"
# version = "1.17.0"
# values = [<<EOT
# allowUnsafeConfigurations: true
# unsafeFlags:
# tls: true
# replsetSize: true
# mongosSize: true
# terminationGracePeriod: true
# backupIfUnhealthy: true
# tls:
# mode: disabled
# users:
# - name: travigo
# db: travigo
# passwordSecretRef:
# name: percona-mongodb-database-password
# key: password
# roles:
# - name: clusterAdmin
# db: admin
# - name: userAdminAnyDatabase
# db: admin
# - name: dbAdminAnyDatabase
# db: admin
# - name: readWrite
# db: admin
# - name: readWrite
# db: travigo
# replsets:
# rs0:
# name: rs0
# size: 2
# resources:
# limits:
# cpu: "4"
# memory: "10G"
# requests:
# cpu: "0"
# memory: "0"
# configuration: |
# security:
# enableEncryption: false
# storage:
# engine: inMemory
# inMemory:
# engineConfig:
# inMemorySizeGB: 5
# statisticsLogDelaySecs: 0
# tolerations:
# - effect: "NoSchedule"
# key: "DATABASE-REALTIME"
# operator: "Equal"
# value: "true"
# sharding:
# enabled: false
# backup:
# enabled: false
# EOT
# ]
# }