Skip to content

Commit 7c65724

Browse files
committed
Add mailcatcher to helm chart
1 parent 7b546bc commit 7c65724

4 files changed

Lines changed: 47 additions & 5 deletions

File tree

charts/brokencrystals/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: |
44
Benchmark application that uses modern technologies and implements a set of
55
common security vulnerabilities
66
type: application
7-
version: 0.0.64
7+
version: 0.0.69
88
keywords:
99
- brokencrystals
1010
- brkn

charts/brokencrystals/templates/deployment.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ spec:
2626
- "nodejs"
2727
- "proxy"
2828
- "repeater"
29+
- "mailcatcher"
2930
containers:
3031
- name: postgres
3132
image: postgres
@@ -174,7 +175,10 @@ spec:
174175
scheme: HTTP
175176
initialDelaySeconds: 120
176177
periodSeconds: 30
177-
178+
179+
- name: mailcatcher
180+
image: sj26/mailcatcher
181+
178182
{{- if and .Values.repeaterID .Values.token .Values.cluster }}
179183
- name: repeater
180184
image: brightsec/cli{{ if ne .Values.repeaterImageTag "" }}:{{ .Values.repeaterImageTag }}{{ else }}:latest{{ end }}

charts/brokencrystals/templates/ingress.yaml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ spec:
2727
name: {{ .Release.Name }}
2828
port:
2929
number: 3000
30-
3130
---
3231
apiVersion: networking.k8s.io/v1
3332
kind: Ingress
@@ -57,3 +56,32 @@ spec:
5756
name: {{ .Release.Name }}-keycloak
5857
port:
5958
number: 8080
59+
---
60+
apiVersion: networking.k8s.io/v1
61+
kind: Ingress
62+
metadata:
63+
name: {{ include "brokencrystals.fullname" . }}-mailcatcher
64+
namespace: {{ .Release.Namespace }}
65+
annotations:
66+
nginx.ingress.kubernetes.io/ssl-redirect: "false"
67+
nginx.ingress.kubernetes.io/proxy-ssl-protocols: "TLSv1.1 TLSv1.2"
68+
{{ if eq .Values.ingress.cert "" }}
69+
cert-manager.io/cluster-issuer: letsencrypt-cf-prod
70+
{{ end }}
71+
spec:
72+
ingressClassName: nginx
73+
tls:
74+
- hosts:
75+
- mailcatcher.{{ .Values.ingress.url }}
76+
secretName: {{ if eq .Values.ingress.cert "" }}{{ include "brokencrystals.fullname" . }}-mailcatcher-secret{{ else }}{{ .Values.ingress.cert }}{{ end }}
77+
rules:
78+
- host: mailcatcher.{{ .Values.ingress.url }}
79+
http:
80+
paths:
81+
- path: /
82+
pathType: Prefix
83+
backend:
84+
service:
85+
name: {{ .Release.Name }}-mailcatcher
86+
port:
87+
number: 1080

charts/brokencrystals/templates/service.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ spec:
99
- protocol: TCP
1010
port: 3000
1111
targetPort: 3000
12-
1312
---
1413
apiVersion: v1
1514
kind: Service
@@ -22,4 +21,15 @@ spec:
2221
- protocol: TCP
2322
port: 8080
2423
targetPort: 8080
25-
24+
---
25+
apiVersion: v1
26+
kind: Service
27+
metadata:
28+
name: {{ .Release.Name }}-mailcatcher
29+
spec:
30+
selector:
31+
app: {{ .Release.Name }}
32+
ports:
33+
- protocol: TCP
34+
port: 1080
35+
targetPort: 1080

0 commit comments

Comments
 (0)