Skip to content

Commit

Permalink
Add mailcatcher to helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
rielas committed Apr 8, 2024
1 parent 7b546bc commit 7c65724
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/brokencrystals/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: |
Benchmark application that uses modern technologies and implements a set of
common security vulnerabilities
type: application
version: 0.0.64
version: 0.0.69
keywords:
- brokencrystals
- brkn
6 changes: 5 additions & 1 deletion charts/brokencrystals/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spec:
- "nodejs"
- "proxy"
- "repeater"
- "mailcatcher"
containers:
- name: postgres
image: postgres
Expand Down Expand Up @@ -174,7 +175,10 @@ spec:
scheme: HTTP
initialDelaySeconds: 120
periodSeconds: 30


- name: mailcatcher
image: sj26/mailcatcher

{{- if and .Values.repeaterID .Values.token .Values.cluster }}
- name: repeater
image: brightsec/cli{{ if ne .Values.repeaterImageTag "" }}:{{ .Values.repeaterImageTag }}{{ else }}:latest{{ end }}
Expand Down
30 changes: 29 additions & 1 deletion charts/brokencrystals/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ spec:
name: {{ .Release.Name }}
port:
number: 3000

---
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand Down Expand Up @@ -57,3 +56,32 @@ spec:
name: {{ .Release.Name }}-keycloak
port:
number: 8080
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "brokencrystals.fullname" . }}-mailcatcher
namespace: {{ .Release.Namespace }}
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/proxy-ssl-protocols: "TLSv1.1 TLSv1.2"
{{ if eq .Values.ingress.cert "" }}
cert-manager.io/cluster-issuer: letsencrypt-cf-prod
{{ end }}
spec:
ingressClassName: nginx
tls:
- hosts:
- mailcatcher.{{ .Values.ingress.url }}
secretName: {{ if eq .Values.ingress.cert "" }}{{ include "brokencrystals.fullname" . }}-mailcatcher-secret{{ else }}{{ .Values.ingress.cert }}{{ end }}
rules:
- host: mailcatcher.{{ .Values.ingress.url }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Release.Name }}-mailcatcher
port:
number: 1080
14 changes: 12 additions & 2 deletions charts/brokencrystals/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ spec:
- protocol: TCP
port: 3000
targetPort: 3000

---
apiVersion: v1
kind: Service
Expand All @@ -22,4 +21,15 @@ spec:
- protocol: TCP
port: 8080
targetPort: 8080

---
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-mailcatcher
spec:
selector:
app: {{ .Release.Name }}
ports:
- protocol: TCP
port: 1080
targetPort: 1080

0 comments on commit 7c65724

Please sign in to comment.