-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopulator.yaml
85 lines (85 loc) · 2.53 KB
/
populator.yaml
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
kind: Pod
apiVersion: v1
metadata:
# Initializes database with Sentry data and creates initial user
name: database-populator
spec:
containers:
- name: database-populator
image: sentry:9.1.2
resources:
limits:
# for some reason this populator is consuming lots of memory
cpu: 500m
memory: 1500Mi
requests:
cpu: 50m
memory: 800Mi
env:
- name: SENTRY_SECRET_KEY
value: '158)bg&cc__)#i=3@-pl&dej#51%l#2^w3kek^34-ixc8@m-c!'
- name: C_FORCE_ROOT
value: 'TRUE'
- name: SENTRY_POSTGRES_HOST
valueFrom:
secretKeyRef:
key: database-host
name: postgres-secrets
- name: SENTRY_DB_NAME
valueFrom:
secretKeyRef:
key: database-name
name: postgres-secrets
- name: SENTRY_DB_USER
valueFrom:
secretKeyRef:
key: database-user
name: postgres-secrets
- name: SENTRY_DB_PASSWORD
valueFrom:
secretKeyRef:
key: database-password
name: postgres-secrets
- name: SENTRY_REDIS_DB
valueFrom:
secretKeyRef:
key: database-db
name: redis-secrets
- name: SENTRY_REDIS_PORT
valueFrom:
secretKeyRef:
key: database-port
name: redis-secrets
- name: SENTRY_REDIS_HOST
valueFrom:
secretKeyRef:
key: database-host
name: redis-secrets
- name: SENTRY_REDIS_PASSWORD
valueFrom:
secretKeyRef:
key: database-password
name: redis-secrets
- name: SENTRY_INITIAL_EMAIL
value: 'YOUR_EMAIL@BLABLA.com'
- name: SENTRY_INITIAL_PASSWORD
value: 'foobar'
volumeMounts:
- name: config-volume
mountPath: /etc/sentry/
command:
- "/bin/bash"
- "-ecx"
- |
# Init migrations
sentry upgrade --noinput
# Create user to sentry
sentry createuser --email ${SENTRY_INITIAL_EMAIL} --password ${SENTRY_INITIAL_PASSWORD} --superuser --no-input
imagePullPolicy: Always
volumes:
- name: config-volume
configMap:
name: sentry
restartPolicy: OnFailure
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst