-
Notifications
You must be signed in to change notification settings - Fork 1
/
locals.tf
141 lines (135 loc) · 3.11 KB
/
locals.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
locals {
astronomer_helm_values = var.astronomer_helm_values
extra_istio_helm_values = <<EOF
---
global:
# Allow Istio control plane to run on platform nodes...
defaultTolerations:
- key: "platform"
operator: "Equal"
value: "true"
effect: "NoSchedule"
# ... and require it to land on that node pool.
defaultNodeSelector:
astronomer.io/multi-tenant: "false"
configRootNamespace: "istio-config"
proxy:
lifecycle:
preStop:
exec:
command:
- "/bin/bash"
- "-c"
- |
set -e
echo "Exit signal received, waiting for all network connections to clear..."
while [ $(netstat -plunt | grep tcp | grep -v envoy | grep -v pilot | wc -l | xargs) -ne 0 ]; do
printf "."
sleep 3;
done
echo "Network connections cleared, shutting down pilot..."
exit 0
# https://github.com/istio/istio/issues/8247
concurrency: 1
# Only use sidecar for RFC1918 address space (private networks).
# This will allow mesh-external traffic to leave the cluster
# without going through a sidecar.
includeIPRanges: "10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 400m
memory: 248Mi
istio_cni:
enabled: true
kiali:
enabled: true
tracing:
enabled: true
gateways:
istio-ingressgateway:
enabled: false
# minimums above 1 to make
# single-pod interruption
# acceptable to the pod disruption
# budget
sidecarInjectorWebhook:
replicaCount: 2
galley:
replicaCount: 2
pilot:
autoscaleMin: 2
security:
replicaCount: 2
mixer:
policy:
autoscaleMin: 2
telemetry:
autoscaleMin: 2
EOF
extra_velero_helm_values = <<EOF
---
# Allow Velero to run on platform nodes...
tolerations:
- key: "platform"
operator: "Equal"
value: "true"
effect: "NoSchedule"
# ... and require it to land on that node pool.
nodeSelector:
astronomer.io/multi-tenant: "false"
configuration:
provider: gcp
backupStorageLocation:
name: gcp
bucket: "${module.gcp.gcp_velero_backups_bucket_name}"
volumeSnapshotLocation:
name: gcp
metrics:
enabled: true
credentials:
secretContents:
cloud: |-
${indent(6, module.gcp.gcp_velero_service_account_key)}
schedules:
astronomer-platform:
schedule: "0 2 * * *"
template:
ttl: "720h"
includedNamespaces:
- astronomer
full-back-up:
schedule: "0 4 * * *"
template:
ttl: "720h"
EOF
extra_googlesqlproxy_helm_values = <<EOF
---
replicasCount: 10
podAnnotations:
sidecar.istio.io/proxyCPU: "1000m"
sidecar.istio.io/proxyMemory: "300Mi"
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
EOF
extra_kubecost_helm_values = <<EOF
---
prometheus:
server:
persistentVolume:
# default of 32Gi was exhausted
size: 300Gi
EOF
tiller_tolerations = [
{
key = "platform",
operator = "Equal",
value = "true",
effect = "NoSchedule"
}
]
tiller_node_selectors = {
"astronomer.io/multi-tenant" = "false"
}
}