Skip to content

Commit e4c4156

Browse files
authored
Merge branch 'feature/storage-cluster' into feat/mcm-migration
2 parents 62bfb2e + 927ef39 commit e4c4156

20 files changed

Lines changed: 376 additions & 31 deletions

File tree

gitops/applications/base/monitoring/values-kube-prometheus.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ prometheusOperator:
77
resources:
88
limits:
99
cpu: 200m
10-
memory: 200Mi
10+
memory: 256Mi
1111
requests:
1212
cpu: 100m
1313
memory: 128Mi

gitops/applications/overlays/cloud_provider/private-cloud/storage-provider/monitoring/values-kube-prometheus.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ prometheusOperator:
77
resources:
88
limits:
99
cpu: 200m
10-
memory: 200Mi
10+
memory: 256Mi
1111
requests:
1212
cpu: 100m
1313
memory: 128Mi

terraform/ccnew/ansible-k8s-deploy/terragrunt.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ dependency "k8s_deploy" {
5252
private_dns_zone_id = "null"
5353
}
5454
mock_outputs_allowed_terraform_commands = ["init", "validate", "plan", "show"]
55-
mock_outputs_merge_strategy_with_state = "shallow"
55+
mock_outputs_merge_strategy_with_state = "deep_map_only"
5656
}
5757

5858
inputs = {

terraform/ccnew/default-config/private-cloud-vars.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
external_load_balancer_dns: publicip
22
wireguard_port: 31821
3+
wireguard_health_port: 31822
34
dns_provider: aws
45
create_ext_dns_user: true
56
create_iam_user: true
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: vault-agent
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app.kubernetes.io/instance: mcm
10+
app.kubernetes.io/name: vault-agent
11+
template:
12+
metadata:
13+
name: vault-agent
14+
labels:
15+
app.kubernetes.io/instance: mcm
16+
app.kubernetes.io/name: vault-agent
17+
spec:
18+
restartPolicy: Always
19+
serviceAccountName: ${mcm_service_account_name}
20+
volumes:
21+
- name: mcm-secret-volume
22+
secret:
23+
secretName: mcm-secret
24+
defaultMode: 420
25+
- name: tls-configmap
26+
configMap:
27+
name: mcm-connection-manager-api-tls-configmap
28+
items:
29+
- key: tlsClientCSRParameters.json
30+
path: tlsClientCSRParameters.json
31+
- key: tlsServerCSRParameters.json
32+
path: tlsServerCSRParameters.json
33+
- key: caCSRParameters.json
34+
path: caCSRParameters.json
35+
defaultMode: 420
36+
- name: home-init
37+
emptyDir:
38+
medium: Memory
39+
- name: home-sidecar
40+
emptyDir:
41+
medium: Memory
42+
- name: vault-secrets
43+
emptyDir:
44+
medium: Memory
45+
- name: vault-config
46+
configMap:
47+
name: vault-agent
48+
defaultMode: 420
49+
initContainers:
50+
- name: vault-agent-init
51+
image: ghcr.io/mojaloop/vault-agent-util:0.0.2
52+
command:
53+
- /bin/sh
54+
- '-ec'
55+
args:
56+
- touch /home/vault/.vault-token && vault agent -config=/vault/configs/config-init.hcl
57+
env:
58+
- name: NAMESPACE
59+
valueFrom:
60+
fieldRef:
61+
apiVersion: v1
62+
fieldPath: metadata.namespace
63+
- name: HOST_IP
64+
valueFrom:
65+
fieldRef:
66+
apiVersion: v1
67+
fieldPath: status.hostIP
68+
- name: POD_IP
69+
valueFrom:
70+
fieldRef:
71+
apiVersion: v1
72+
fieldPath: status.podIP
73+
- name: VAULT_LOG_LEVEL
74+
value: debug
75+
- name: VAULT_LOG_FORMAT
76+
value: standard
77+
- name: VAULT_ADDR
78+
value: http://vault.vault.svc:8200
79+
- name: VAULT_SKIP_VERIFY
80+
value: 'false'
81+
resources:
82+
limits:
83+
cpu: 500m
84+
requests:
85+
cpu: 250m
86+
memory: 64Mi
87+
volumeMounts:
88+
- name: home-init
89+
mountPath: /home/vault
90+
- name: vault-secrets
91+
mountPath: /vault/secrets
92+
- name: vault-config
93+
readOnly: true
94+
mountPath: /vault/configs
95+
imagePullPolicy: IfNotPresent
96+
securityContext:
97+
capabilities:
98+
drop:
99+
- ALL
100+
runAsUser: 100
101+
runAsGroup: 1000
102+
runAsNonRoot: true
103+
readOnlyRootFilesystem: true
104+
allowPrivilegeEscalation: false
105+
containers:
106+
- name: vault-agent
107+
image: ghcr.io/mojaloop/vault-agent-util:0.0.2
108+
command:
109+
- /bin/sh
110+
- '-ec'
111+
args:
112+
- touch /home/vault/.vault-token && vault agent -config=/vault/configs/config.hcl
113+
env:
114+
- name: NAMESPACE
115+
valueFrom:
116+
fieldRef:
117+
apiVersion: v1
118+
fieldPath: metadata.namespace
119+
- name: HOST_IP
120+
valueFrom:
121+
fieldRef:
122+
apiVersion: v1
123+
fieldPath: status.hostIP
124+
- name: POD_IP
125+
valueFrom:
126+
fieldRef:
127+
apiVersion: v1
128+
fieldPath: status.podIP
129+
- name: VAULT_LOG_LEVEL
130+
value: debug
131+
- name: VAULT_LOG_FORMAT
132+
value: standard
133+
- name: VAULT_ADDR
134+
value: http://vault.vault.svc:8200
135+
- name: VAULT_SKIP_VERIFY
136+
value: 'false'
137+
resources:
138+
limits:
139+
cpu: 500m
140+
requests:
141+
cpu: 250m
142+
memory: 64Mi
143+
volumeMounts:
144+
- name: home-sidecar
145+
mountPath: /home/vault
146+
- name: vault-secrets
147+
mountPath: /vault/secrets
148+
- name: vault-config
149+
readOnly: true
150+
mountPath: /vault/configs
151+
imagePullPolicy: IfNotPresent
152+
securityContext:
153+
capabilities:
154+
drop:
155+
- ALL
156+
runAsUser: 100
157+
runAsGroup: 1000
158+
runAsNonRoot: true
159+
readOnlyRootFilesystem: true
160+
allowPrivilegeEscalation: false

terraform/gitops/generate-files/templates/mcm/kustomization.yaml.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ resources:
1212
- istio-gateway.yaml
1313
# %{ endif }
1414
- service-monitors.yaml
15+
- agent.yaml
1516
configMapGenerator:
1617
- name: vault-agent
1718
files:
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
---
1+
resources:
2+
requests:
3+
cpu: 100m
4+
memory: 128Mi
5+
limits:
6+
cpu: 200m
7+
memory: 256Mi

terraform/gitops/generate-files/templates/monitoring/install/values-loki-official-helm.yaml.tpl

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,13 @@ gateway:
317317
enabled: true
318318
replicas: 1
319319
verboseLogging: true
320+
resources:
321+
requests:
322+
cpu: 50m
323+
memory: 64Mi
324+
limits:
325+
cpu: 200m
326+
memory: 256Mi
320327
service:
321328
type: ClusterIP
322329
port: 80
@@ -341,6 +348,13 @@ indexGateway:
341348
name: ${object_store_loki_credentials_secret_name}
342349
extraArgs:
343350
- -config.expand-env=true
351+
resources:
352+
requests:
353+
cpu: 100m
354+
memory: 256Mi
355+
limits:
356+
cpu: 500m
357+
memory: 512Mi
344358
persistence:
345359
enabled: true
346360
size: 10Gi
@@ -362,6 +376,13 @@ chunksCache:
362376
replicas: 1
363377
allocatedMemory: 1400
364378
maxItemMemory: 5
379+
resources:
380+
requests:
381+
cpu: 100m
382+
memory: 256Mi
383+
limits:
384+
cpu: 500m
385+
memory: 2Gi
365386
nodeSelector:
366387
workload-class.mojaloop.io/MONITORING: "enabled"
367388
%{if length(tolerations) > 0 ~}
@@ -379,6 +400,13 @@ resultsCache:
379400
enabled: true
380401
replicas: 1
381402
allocatedMemory: 1024
403+
resources:
404+
requests:
405+
cpu: 50m
406+
memory: 128Mi
407+
limits:
408+
cpu: 200m
409+
memory: 1Gi
382410
nodeSelector:
383411
workload-class.mojaloop.io/MONITORING: "enabled"
384412
%{if length(tolerations) > 0 ~}
@@ -404,6 +432,13 @@ monitoring:
404432
#Loki Canary
405433
lokiCanary:
406434
enabled: true
435+
resources:
436+
requests:
437+
cpu: 25m
438+
memory: 32Mi
439+
limits:
440+
cpu: 100m
441+
memory: 128Mi
407442
nodeSelector:
408443
workload-class.mojaloop.io/MONITORING: "enabled"
409444
%{if length(tolerations) > 0 ~}
@@ -421,4 +456,4 @@ backend:
421456
read:
422457
replicas: 0
423458
write:
424-
replicas: 0
459+
replicas: 0

terraform/gitops/generate-files/templates/monitoring/install/values-metrics-server.yaml.tpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
replicas: ${metrics_server_replicas}
2+
resources:
3+
requests:
4+
cpu: 100m
5+
memory: 256Mi
6+
limits:
7+
cpu: 200m
8+
memory: 512Mi
29
defaultArgs:
310
- --cert-dir=/tmp
411
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
@@ -14,4 +21,4 @@ tolerations:
1421
operator: "${t.operator}"
1522
value: "${t.value}"
1623
%{ endfor ~}
17-
%{ endif ~}
24+
%{ endif ~}
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
manager:
22
collectorImage:
33
repository: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s
4+
resources:
5+
requests:
6+
cpu: 50m
7+
memory: 128Mi
8+
limits:
9+
cpu: 100m
10+
memory: 256Mi
411
%{if length(tolerations) > 0 ~}
512
tolerations:
613
%{ for t in tolerations ~}
@@ -9,4 +16,4 @@ tolerations:
916
operator: "${t.operator}"
1017
value: "${t.value}"
1118
%{ endfor ~}
12-
%{ endif ~}
19+
%{ endif ~}

0 commit comments

Comments
 (0)