Skip to content

Commit

Permalink
Add inbucket Helm chart (SQPIT-1034) (#2544)
Browse files Browse the repository at this point in the history
The chart in wire-server provides defaults for the parent
chart (`inbucket/inbucket`) to simplify it's usage in Wire test
environments.

Co-authored-by: jschaul <[email protected]>
  • Loading branch information
supersven and jschaul authored Jul 11, 2022
1 parent f2ed9b6 commit cb66536
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CHARTS_INTEGRATION := wire-server databases-ephemeral redis-cluster fake-aws
# (e.g. move charts/brig to charts/wire-server/brig)
# this list could be generated from the folder names under ./charts/ like so:
# CHARTS_RELEASE := $(shell find charts/ -maxdepth 1 -type d | xargs -n 1 basename | grep -v charts)
CHARTS_RELEASE := wire-server redis-ephemeral redis-cluster databases-ephemeral fake-aws fake-aws-s3 fake-aws-sqs aws-ingress fluent-bit kibana backoffice calling-test demo-smtp elasticsearch-curator elasticsearch-external elasticsearch-ephemeral minio-external cassandra-external nginx-ingress-controller nginx-ingress-services reaper wire-server-metrics sftd restund coturn
CHARTS_RELEASE := wire-server redis-ephemeral redis-cluster databases-ephemeral fake-aws fake-aws-s3 fake-aws-sqs aws-ingress fluent-bit kibana backoffice calling-test demo-smtp elasticsearch-curator elasticsearch-external elasticsearch-ephemeral minio-external cassandra-external nginx-ingress-controller nginx-ingress-services reaper wire-server-metrics sftd restund coturn inbucket
BUILDAH_PUSH ?= 0
KIND_CLUSTER_NAME := wire-server
BUILDAH_KIND_LOAD ?= 1
Expand Down Expand Up @@ -409,6 +409,10 @@ charts-integration: $(foreach chartName,$(CHARTS_INTEGRATION),chart-$(chartName)
charts-serve: charts-integration
./hack/bin/serve-charts.sh $(CHARTS_INTEGRATION)

.PHONY: charts-serve-all
charts-serve-all: $(foreach chartName,$(CHARTS_RELEASE),chart-$(chartName))
./hack/bin/serve-charts.sh $(CHARTS_RELEASE)

# Usecase for this make target:
# 1. for releases of helm charts
# 2. for testing helm charts more generally
Expand Down
1 change: 1 addition & 0 deletions changelog.d/5-internal/add-inbucket-chart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add Helm chart for inbucket. Inbucket is a SMTP server that does not relay, but instead display received mail in a webapp and make them accessible via an API.
10 changes: 10 additions & 0 deletions charts/inbucket/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
name: inbucket
version: 0.0.42
description: Inbucket is an email testing application; it will accept messages for any email address and make them available to view via a web interface.
home: https://www.inbucket.org/
sources:
- https://github.com/inbucket/inbucket
- https://artifacthub.io/packages/helm/inbucket/inbucket
- https://hub.docker.com/r/inbucket/inbucket
appVersion: 3.0.0
10 changes: 10 additions & 0 deletions charts/inbucket/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Inbucket chart

[*Inbucket*](https://www.inbucket.org/) is a fake SMTP server that provides all
captured eMails via a webapp and a REST API. At *Wire* it is used in testing
environments to not have to deal with concrete SMTP server configurations.
Especially, it saves us to care about topics like *SPAM filters* and *server
grey & black listing*.

This chart exists to adjust the [`inbucket/inbucket`
chart](https://artifacthub.io/packages/helm/inbucket/inbucket) to our needs.
4 changes: 4 additions & 0 deletions charts/inbucket/requirements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dependencies:
- name: inbucket
version: 2.0.1
repository: https://inbucket.github.io/inbucket-community
19 changes: 19 additions & 0 deletions charts/inbucket/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: "inbucket"
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ include "inbucket.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "inbucket.chart" . }}
spec:
rules:
- host: {{ required "must specify host" .Values.host | quote }}
http:
paths:
- path: /
backend:
serviceName: {{ include "inbucket.fullname" . }}
servicePort: http
13 changes: 13 additions & 0 deletions charts/inbucket/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Fully qualified domain name (FQDN) of the domain where to serve inbucket.
# E.g. 'inbucket.my-test-env.wire.link'
host:

# Configure the inbucket "parent" chart
inbucket:
image:
tag: 3.0.2

extraEnv:
INBUCKET_WEB_GREETINGFILE: "/config/greeting.html"
INBUCKET_MAILBOXNAMING: full
INBUCKET_STORAGE_RETENTIONPERIOD: "72h"

0 comments on commit cb66536

Please sign in to comment.