Skip to content

Commit

Permalink
pkg/recipe: Add fake smtp server
Browse files Browse the repository at this point in the history
Add recipe for using a mock mailserver for viewing emails sent by the
satellite.

Change-Id: Ied486315dc60320c39a945f4a71fcda8d4efa7a0
  • Loading branch information
mobyvb committed Jun 19, 2024
1 parent af8fc3f commit 5ce58fa
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ storj-up <subcommand> <selector> <argument>

Here `selector` can be either a service (like `storagenode`) or a name of a service group. (like `edge`). To find out all the groups, please use `storj-up recipes`

Other services include:
* `mailserver`: a mock smtp server that can be used to view emails sent from the satellite at localhost:1080

### Example: Building specific binaries based on a Gerrit change

After running `storj-up init`, you can use the following command to replace binaries based on a specific Gerrit changeset:
Expand Down
4 changes: 4 additions & 0 deletions pkg/recipe/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ var repair []byte
//go:embed audit.yaml
var audit []byte

//go:embed mailserver.yaml
var mailserver []byte

// Defaults is a map for recipes included in the binary.
var Defaults = map[string][]byte{
"minimal": minimal,
Expand All @@ -61,4 +64,5 @@ var Defaults = map[string][]byte{
"uplink": uplink,
"repair": repair,
"audit": audit,
"mailserver": mailserver,
}
19 changes: 19 additions & 0 deletions pkg/recipe/mailserver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: mailserver
description: mock smtp server for seeing emails sent from the satellite
add:
- name: mailserver
containername: mailserver
image: haravich/fake-smtp-server
port:
- name: webui
target: 1080
- name: smtp
target: 1025
modify:
- match:
label:
- core
flag:
add:
- --mail.smtp-server-address=mailserver:1025
- --mail.auth-type=insecure

0 comments on commit 5ce58fa

Please sign in to comment.