This repository has been archived by the owner on Nov 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustin-test.yaml
1352 lines (1288 loc) · 34.8 KB
/
justin-test.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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
apiVersion: v1
data:
ENV_VAR_1: fake
ENV_VAR_2: faker
kind: ConfigMap
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
kots.io/app-slug: justin-test
kots.io/backup: velero
name: example-config
---
apiVersion: v1
data:
config.yml: |-
# While a lot of configuration in Sentry can be changed via the UI, for all
# new-style config (as of 8.0) you can also declare values here in this file
# to enforce defaults or to ensure they cannot be changed via the UI. For more
# information see the Sentry documentation.
###############
# Mail Server #
###############
# mail.backend: 'smtp' # Use dummy if you want to disable email entirely
# mail.host: 'localhost'
# mail.port: 25
# mail.username: ''
# mail.password: ''
# mail.use-tls: false
# The email address to send on behalf of
# mail.from: 'root@localhost'
# If you'd like to configure email replies, enable this.
# mail.enable-replies: false
# When email-replies are enabled, this value is used in the Reply-To header
# mail.reply-hostname: ''
# If you're using mailgun for inbound mail, set your API key and configure a
# route to forward to /api/hooks/mailgun/inbound/
# mail.mailgun-api-key: ''
###################
# System Settings #
###################
# If this file ever becomes compromised, it's important to regenerate your a new key
# Changing this value will result in all current sessions being invalidated.
# A new key can be generated with `$ sentry config generate-secret-key`
# system.secret-key: 'changeme'
# The ``redis.clusters`` setting is used, unsurprisingly, to configure Redis
# clusters. These clusters can be then referred to by name when configuring
# backends such as the cache, digests, or TSDB backend.
# redis.clusters:
# default:
# hosts:
# 0:
# host: 127.0.0.1
# port: 6379
################
# File storage #
################
# Uploaded media uses these `filestore` settings. The available
# backends are either `filesystem` or `s3`.
filestore.backend: 'filesystem'
filestore.options:
location: '/var/lib/sentry/files'
sentry.conf.py: |-
# This file is just Python, with a touch of Django which means
# you can inherit and tweak settings to your hearts content.
# For Docker, the following environment variables are supported:
# SENTRY_POSTGRES_HOST
# SENTRY_POSTGRES_PORT
# SENTRY_DB_NAME
# SENTRY_DB_USER
# SENTRY_DB_PASSWORD
# SENTRY_RABBITMQ_HOST
# SENTRY_RABBITMQ_USERNAME
# SENTRY_RABBITMQ_PASSWORD
# SENTRY_RABBITMQ_VHOST
# SENTRY_REDIS_HOST
# SENTRY_REDIS_PASSWORD
# SENTRY_REDIS_PORT
# SENTRY_REDIS_DB
# SENTRY_MEMCACHED_HOST
# SENTRY_MEMCACHED_PORT
# SENTRY_FILESTORE_DIR
# SENTRY_SERVER_EMAIL
# SENTRY_EMAIL_HOST
# SENTRY_EMAIL_PORT
# SENTRY_EMAIL_USER
# SENTRY_EMAIL_PASSWORD
# SENTRY_EMAIL_USE_TLS
# SENTRY_ENABLE_EMAIL_REPLIES
# SENTRY_SMTP_HOSTNAME
# SENTRY_MAILGUN_API_KEY
# SENTRY_SINGLE_ORGANIZATION
# SENTRY_SECRET_KEY
# GITHUB_APP_ID
# GITHUB_API_SECRET
# BITBUCKET_CONSUMER_KEY
# BITBUCKET_CONSUMER_SECRET
from sentry.conf.server import * # NOQA
import os
import os.path
CONF_ROOT = os.path.dirname(__file__)
postgres = env('SENTRY_POSTGRES_HOST') or (env('POSTGRES_PORT_5432_TCP_ADDR') and 'postgres')
if postgres:
DATABASES = {
'default': {
'ENGINE': 'sentry.db.postgres',
'NAME': (
env('SENTRY_DB_NAME')
or env('POSTGRES_ENV_POSTGRES_USER')
or 'postgres'
),
'USER': (
env('SENTRY_DB_USER')
or env('POSTGRES_ENV_POSTGRES_USER')
or 'postgres'
),
'PASSWORD': (
env('SENTRY_DB_PASSWORD')
or env('POSTGRES_ENV_POSTGRES_PASSWORD')
or ''
),
'HOST': postgres,
'PORT': (
env('SENTRY_POSTGRES_PORT')
or ''
),
'OPTIONS': {
'autocommit': True,
},
},
}
# You should not change this setting after your database has been created
# unless you have altered all schemas first
SENTRY_USE_BIG_INTS = True
# If you're expecting any kind of real traffic on Sentry, we highly recommend
# configuring the CACHES and Redis settings
###########
# General #
###########
# Instruct Sentry that this install intends to be run by a single organization
# and thus various UI optimizations should be enabled.
SENTRY_SINGLE_ORGANIZATION = env('SENTRY_SINGLE_ORGANIZATION', True)
#########
# Redis #
#########
# Generic Redis configuration used as defaults for various things including:
# Buffers, Quotas, TSDB
redis = env('SENTRY_REDIS_HOST') or (env('REDIS_PORT_6379_TCP_ADDR') and 'redis')
if not redis:
raise Exception('Error: REDIS_PORT_6379_TCP_ADDR (or SENTRY_REDIS_HOST) is undefined, did you forget to `--link` a redis container?')
redis_password = env('SENTRY_REDIS_PASSWORD') or ''
redis_port = env('SENTRY_REDIS_PORT') or '6379'
redis_db = env('SENTRY_REDIS_DB') or '0'
SENTRY_OPTIONS.update({
'redis.clusters': {
'default': {
'hosts': {
0: {
'host': redis,
'password': redis_password,
'port': redis_port,
'db': redis_db,
},
},
},
},
})
#########
# Cache #
#########
# Sentry currently utilizes two separate mechanisms. While CACHES is not a
# requirement, it will optimize several high throughput patterns.
memcached = env('SENTRY_MEMCACHED_HOST') or (env('MEMCACHED_PORT_11211_TCP_ADDR') and 'memcached')
if memcached:
memcached_port = (
env('SENTRY_MEMCACHED_PORT')
or '11211'
)
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': [memcached + ':' + memcached_port],
'TIMEOUT': 3600,
}
}
# A primary cache is required for things such as processing events
SENTRY_CACHE = 'sentry.cache.redis.RedisCache'
#########
# Queue #
#########
# See https://docs.getsentry.com/on-premise/server/queue/ for more
# information on configuring your queue broker and workers. Sentry relies
# on a Python framework called Celery to manage queues.
rabbitmq = env('SENTRY_RABBITMQ_HOST') or (env('RABBITMQ_PORT_5672_TCP_ADDR') and 'rabbitmq')
if rabbitmq:
BROKER_URL = (
'amqp://' + (
env('SENTRY_RABBITMQ_USERNAME')
or env('RABBITMQ_ENV_RABBITMQ_DEFAULT_USER')
or 'guest'
) + ':' + (
env('SENTRY_RABBITMQ_PASSWORD')
or env('RABBITMQ_ENV_RABBITMQ_DEFAULT_PASS')
or 'guest'
) + '@' + rabbitmq + '/' + (
env('SENTRY_RABBITMQ_VHOST')
or env('RABBITMQ_ENV_RABBITMQ_DEFAULT_VHOST')
or '/'
)
)
else:
BROKER_URL = 'redis://:' + redis_password + '@' + redis + ':' + redis_port + '/' + redis_db
###############
# Rate Limits #
###############
# Rate limits apply to notification handlers and are enforced per-project
# automatically.
SENTRY_RATELIMITER = 'sentry.ratelimits.redis.RedisRateLimiter'
##################
# Update Buffers #
##################
# Buffers (combined with queueing) act as an intermediate layer between the
# database and the storage API. They will greatly improve efficiency on large
# numbers of the same events being sent to the API in a short amount of time.
# (read: if you send any kind of real data to Sentry, you should enable buffers)
SENTRY_BUFFER = 'sentry.buffer.redis.RedisBuffer'
##########
# Quotas #
##########
# Quotas allow you to rate limit individual projects or the Sentry install as
# a whole.
SENTRY_QUOTAS = 'sentry.quotas.redis.RedisQuota'
########
# TSDB #
########
# The TSDB is used for building charts as well as making things like per-rate
# alerts possible.
SENTRY_TSDB = 'sentry.tsdb.redis.RedisTSDB'
###########
# Digests #
###########
# The digest backend powers notification summaries.
SENTRY_DIGESTS = 'sentry.digests.backends.redis.RedisBackend'
##############
# Web Server #
##############
# If you're using a reverse SSL proxy, you should enable the X-Forwarded-Proto
# header and set `SENTRY_USE_SSL=1`
if env('SENTRY_USE_SSL', False):
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SOCIAL_AUTH_REDIRECT_IS_HTTPS = True
SENTRY_WEB_HOST = '0.0.0.0'
SENTRY_WEB_PORT = 9000
SENTRY_WEB_OPTIONS = {
# 'workers': 3, # the number of web workers
}
###############
# Mail Server #
###############
email = env('SENTRY_EMAIL_HOST') or (env('SMTP_PORT_25_TCP_ADDR') and 'smtp')
if email:
SENTRY_OPTIONS['mail.backend'] = 'smtp'
SENTRY_OPTIONS['mail.host'] = email
SENTRY_OPTIONS['mail.password'] = env('SENTRY_EMAIL_PASSWORD') or ''
SENTRY_OPTIONS['mail.username'] = env('SENTRY_EMAIL_USER') or ''
SENTRY_OPTIONS['mail.port'] = int(env('SENTRY_EMAIL_PORT') or 25)
SENTRY_OPTIONS['mail.use-tls'] = env('SENTRY_EMAIL_USE_TLS', False)
else:
SENTRY_OPTIONS['mail.backend'] = 'dummy'
# The email address to send on behalf of
SENTRY_OPTIONS['mail.from'] = env('SENTRY_SERVER_EMAIL') or 'root@localhost'
# If you're using mailgun for inbound mail, set your API key and configure a
# route to forward to /api/hooks/mailgun/inbound/
SENTRY_OPTIONS['mail.mailgun-api-key'] = env('SENTRY_MAILGUN_API_KEY') or ''
# If you specify a MAILGUN_API_KEY, you definitely want EMAIL_REPLIES
if SENTRY_OPTIONS['mail.mailgun-api-key']:
SENTRY_OPTIONS['mail.enable-replies'] = True
else:
SENTRY_OPTIONS['mail.enable-replies'] = env('SENTRY_ENABLE_EMAIL_REPLIES', False)
if SENTRY_OPTIONS['mail.enable-replies']:
SENTRY_OPTIONS['mail.reply-hostname'] = env('SENTRY_SMTP_HOSTNAME') or ''
# If this value ever becomes compromised, it's important to regenerate your
# SENTRY_SECRET_KEY. Changing this value will result in all current sessions
# being invalidated.
secret_key = env('SENTRY_SECRET_KEY')
if not secret_key:
raise Exception('Error: SENTRY_SECRET_KEY is undefined, run `generate-secret-key` and set to -e SENTRY_SECRET_KEY')
if 'SENTRY_RUNNING_UWSGI' not in os.environ and len(secret_key) < 32:
print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
print('!! CAUTION !!')
print('!! Your SENTRY_SECRET_KEY is potentially insecure. !!')
print('!! We recommend at least 32 characters long. !!')
print('!! Regenerate with `generate-secret-key`. !!')
print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
SENTRY_OPTIONS['system.secret-key'] = secret_key
if 'GITHUB_APP_ID' in os.environ:
GITHUB_EXTENDED_PERMISSIONS = ['repo']
GITHUB_APP_ID = env('GITHUB_APP_ID')
GITHUB_API_SECRET = env('GITHUB_API_SECRET')
if 'BITBUCKET_CONSUMER_KEY' in os.environ:
BITBUCKET_CONSUMER_KEY = env('BITBUCKET_CONSUMER_KEY')
BITBUCKET_CONSUMER_SECRET = env('BITBUCKET_CONSUMER_SECRET')
kind: ConfigMap
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: sentry
kots.io/app-slug: justin-test
kots.io/backup: velero
name: sentry
---
apiVersion: v1
data:
sentry-secret: cm5lRWNsSWNuQWZIc2dydlppVW05Z2NBd09JQUU2bUFtQ2E3MFBxRg==
smtp-password: cGFzc3dvcmQ=
user-password: aGVsbG8xMjM=
kind: Secret
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: sentry
kots.io/app-slug: justin-test
kots.io/backup: velero
name: sentry
type: Opaque
---
apiVersion: v1
data:
postgres-password: cnNGelVnbDFHQ0ZkU2h3a2t1aHlVNF96Y242UUx2QW4=
kind: Secret
metadata:
annotations:
kots.io/app-slug: justin-test
kots.io/when: "true"
labels:
app: postgresql
kots.io/app-slug: justin-test
kots.io/backup: velero
name: sentry-postgresql
type: Opaque
---
apiVersion: v1
data:
redis-password: TmVDS3J6cWc4aw==
kind: Secret
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: redis
kots.io/app-slug: justin-test
kots.io/backup: velero
name: sentry-redis
type: Opaque
---
apiVersion: v1
kind: Service
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: example
component: nginx
kots.io/app-slug: justin-test
kots.io/backup: velero
name: example-nginx
spec:
ports:
- port: 80
selector:
app: example
component: nginx
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
annotations:
kots.io/app-slug: justin-test
kots.io/when: "true"
labels:
app: sentry
kots.io/app-slug: justin-test
kots.io/backup: velero
name: sentry
spec:
ports:
- name: sentry
port: 9000
protocol: TCP
targetPort: 9000
selector:
app: sentry
role: web
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
annotations:
kots.io/app-slug: justin-test
kots.io/when: "true"
labels:
app: postgresql
kots.io/app-slug: justin-test
kots.io/backup: velero
name: sentry-postgresql
spec:
ports:
- name: postgresql
port: 5432
targetPort: postgresql
selector:
app: postgresql
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: redis
kots.io/app-slug: justin-test
kots.io/backup: velero
name: sentry-redis-master
spec:
ports:
- name: redis
port: 6379
targetPort: redis
selector:
app: redis
role: master
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: redis
kots.io/app-slug: justin-test
kots.io/backup: velero
name: sentry-redis-slave
spec:
ports:
- name: redis
port: 6379
targetPort: redis
selector:
app: redis
role: slave
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: example
component: nginx
kots.io/app-slug: justin-test
kots.io/backup: velero
name: example-nginx
spec:
selector:
matchLabels:
app: example
component: nginx
template:
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: example
component: nginx
kots.io/app-slug: justin-test
kots.io/backup: velero
spec:
containers:
- envFrom:
- configMapRef:
name: example-config
image: nginx
name: nginx
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 100m
memory: 32Mi
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: sentry-cron
kots.io/app-slug: justin-test
kots.io/backup: velero
name: sentry-cron
spec:
replicas: 1
selector:
matchLabels:
app: sentry-cron
template:
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: sentry-cron
component: sentry
kots.io/app-slug: justin-test
kots.io/backup: velero
spec:
containers:
- args:
- run
- cron
env:
- name: SENTRY_SECRET_KEY
valueFrom:
secretKeyRef:
key: sentry-secret
name: sentry
- name: SENTRY_DB_USER
value: sentry
- name: SENTRY_DB_NAME
value: sentry
- name: SENTRY_DB_PASSWORD
valueFrom:
secretKeyRef:
key: postgres-password
name: sentry-postgresql
- name: SENTRY_POSTGRES_HOST
value: sentry-postgresql
- name: SENTRY_POSTGRES_PORT
value: "5432"
- name: SENTRY_REDIS_PASSWORD
valueFrom:
secretKeyRef:
key: redis-password
name: sentry-redis
- name: SENTRY_REDIS_HOST
value: sentry-redis-master
- name: SENTRY_REDIS_PORT
value: "6379"
- name: SENTRY_EMAIL_HOST
value: ""
- name: SENTRY_EMAIL_PORT
value: ""
- name: SENTRY_EMAIL_USER
value: ""
- name: SENTRY_EMAIL_PASSWORD
valueFrom:
secretKeyRef:
key: smtp-password
name: sentry
- name: SENTRY_EMAIL_USE_TLS
value: "false"
- name: SENTRY_SERVER_EMAIL
value: [email protected]
image: sentry:9.1.1
imagePullPolicy: IfNotPresent
name: sentry-cron
ports:
- containerPort: 9000
resources:
limits:
cpu: 200m
memory: 200Mi
requests:
cpu: 100m
memory: 100Mi
volumeMounts:
- mountPath: /etc/sentry
name: config
readOnly: true
- mountPath: /var/lib/sentry/files
name: sentry-data
volumes:
- configMap:
name: sentry
name: config
- emptyDir: {}
name: sentry-data
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kots.io/app-slug: justin-test
kots.io/when: "true"
labels:
app: postgresql
kots.io/app-slug: justin-test
kots.io/backup: velero
name: sentry-postgresql
spec:
selector:
matchLabels:
app: postgresql
strategy:
type: Recreate
template:
metadata:
annotations:
backup.velero.io/backup-volumes: postgres-backup
kots.io/app-slug: justin-test
pre.hook.backup.velero.io/command: '["/bin/bash", "-c", "PGPASSWORD=$POSTGRES_PASSWORD
pg_dump -U $POSTGRES_USER -d $POSTGRES_DB -h 127.0.0.1 > /backup/backup.sql"]'
pre.hook.backup.velero.io/timeout: 3m
labels:
app: postgresql
component: sentry
kots.io/app-slug: justin-test
kots.io/backup: velero
spec:
containers:
- args: null
env:
- name: POSTGRES_USER
value: sentry
- name: PGUSER
value: sentry
- name: POSTGRES_DB
value: sentry
- name: POSTGRES_INITDB_ARGS
value: ""
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
key: postgres-password
name: sentry-postgresql
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
image: postgres:9.6
imagePullPolicy: ""
livenessProbe:
exec:
command:
- sh
- -c
- exec pg_isready --host $POD_IP
failureThreshold: 6
initialDelaySeconds: 60
timeoutSeconds: 5
name: sentry-postgresql
ports:
- containerPort: 5432
name: postgresql
readinessProbe:
exec:
command:
- sh
- -c
- exec pg_isready --host $POD_IP
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 3
resources:
requests:
cpu: 100m
memory: 256Mi
volumeMounts:
- mountPath: /var/lib/postgresql/data/pgdata
name: data
subPath: postgresql-db
- mountPath: /backup
name: postgres-backup
volumes:
- name: data
persistentVolumeClaim:
claimName: sentry-postgresql
- emptyDir: {}
name: postgres-backup
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: redis
kots.io/app-slug: justin-test
kots.io/backup: velero
name: sentry-redis-slave
spec:
replicas: 1
selector:
matchLabels:
app: redis
role: slave
template:
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: redis
component: sentry
kots.io/app-slug: justin-test
kots.io/backup: velero
role: slave
spec:
containers:
- env:
- name: REDIS_REPLICATION_MODE
value: slave
- name: REDIS_MASTER_HOST
value: sentry-redis-master
- name: REDIS_PORT
value: "6379"
- name: REDIS_MASTER_PORT_NUMBER
value: "6379"
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
key: redis-password
name: sentry-redis
- name: REDIS_MASTER_PASSWORD
valueFrom:
secretKeyRef:
key: redis-password
name: sentry-redis
- name: REDIS_DISABLE_COMMANDS
value: FLUSHDB,FLUSHALL
image: docker.io/bitnami/redis:4.0.11-debian-9
imagePullPolicy: Always
livenessProbe:
exec:
command:
- redis-cli
- ping
failureThreshold: 5
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
name: sentry-redis
ports:
- containerPort: 6379
name: redis
readinessProbe:
exec:
command:
- redis-cli
- ping
failureThreshold: 5
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
securityContext:
fsGroup: 1001
runAsUser: 1001
serviceAccountName: default
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: sentry
kots.io/app-slug: justin-test
kots.io/backup: velero
name: sentry-web
spec:
replicas: 1
selector:
matchLabels:
app: sentry
template:
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: sentry
component: sentry
kots.io/app-slug: justin-test
kots.io/backup: velero
role: web
spec:
containers:
- env:
- name: SENTRY_SECRET_KEY
valueFrom:
secretKeyRef:
key: sentry-secret
name: sentry
- name: SENTRY_DB_USER
value: sentry
- name: SENTRY_DB_NAME
value: sentry
- name: SENTRY_DB_PASSWORD
valueFrom:
secretKeyRef:
key: postgres-password
name: sentry-postgresql
- name: SENTRY_POSTGRES_HOST
value: sentry-postgresql
- name: SENTRY_POSTGRES_PORT
value: "5432"
- name: SENTRY_REDIS_PASSWORD
valueFrom:
secretKeyRef:
key: redis-password
name: sentry-redis
- name: SENTRY_REDIS_HOST
value: sentry-redis-master
- name: SENTRY_REDIS_PORT
value: "6379"
- name: SENTRY_EMAIL_HOST
value: ""
- name: SENTRY_EMAIL_PORT
value: ""
- name: SENTRY_EMAIL_USER
value: ""
- name: SENTRY_EMAIL_PASSWORD
valueFrom:
secretKeyRef:
key: smtp-password
name: sentry
- name: SENTRY_EMAIL_USE_TLS
value: "false"
- name: SENTRY_SERVER_EMAIL
value: [email protected]
- name: GITHUB_APP_ID
value: ""
- name: GITHUB_API_SECRET
value: ""
image: sentry:9.1.1
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 5
httpGet:
path: /_health/
port: 9000
scheme: HTTP
initialDelaySeconds: 50
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 2
name: sentry-web
ports:
- containerPort: 9000
readinessProbe:
failureThreshold: 10
httpGet:
path: /_health/
port: 9000
scheme: HTTP
initialDelaySeconds: 50
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 2
resources:
limits:
cpu: 500m
memory: 500Mi
requests:
cpu: 300m
memory: 300Mi
volumeMounts:
- mountPath: /etc/sentry
name: config
readOnly: true
- mountPath: /var/lib/sentry/files
name: sentry-data
volumes:
- configMap:
name: sentry
name: config
- name: sentry-data
persistentVolumeClaim:
claimName: sentry
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: sentry-worker
kots.io/app-slug: justin-test
kots.io/backup: velero
name: sentry-worker
spec:
replicas: 2
selector:
matchLabels:
app: sentry-worker
template:
metadata:
annotations:
kots.io/app-slug: justin-test
labels:
app: sentry-worker
component: sentry
kots.io/app-slug: justin-test
kots.io/backup: velero
spec:
containers:
- args:
- run
- worker
env:
- name: SENTRY_SECRET_KEY
valueFrom:
secretKeyRef:
key: sentry-secret
name: sentry
- name: SENTRY_DB_USER
value: sentry
- name: SENTRY_DB_NAME
value: sentry
- name: SENTRY_DB_PASSWORD
valueFrom:
secretKeyRef:
key: postgres-password
name: sentry-postgresql
- name: SENTRY_POSTGRES_HOST