maddy

Fork https://github.com/foxcpp/maddy

git clone git://git.lin.moe/go/maddy.git

 1# maddy Helm chart for Kubernetes
 2
 3![Version: 0.2.5](https://img.shields.io/badge/Version-0.2.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.1](https://img.shields.io/badge/AppVersion-0.4.1-informational?style=flat-square)
 4
 5This is just initial effort to run maddy within Kubernetes cluster. We have used Deployment resource which has some downsides
 6but at least this chart will allow you to install maddy relatively easily on your Kubernetes cluster. We have considered
 7StatefulSet and DaemonSet but such solutions would require much more configuration and in casae of DaemonSet also a TCP
 8load balancer in front of the nodes.
 9
10## Requirement
11
12In order to run maddy properly, you need to have TLS secret under name maddy present in the cluster. If you have commercial
13certificate, you can create it by the following command:
14
15```sh
16kubectl create secret tls maddy --cert=fullchain.pem --key=privkey.pem
17```
18
19If you use cert-manager, just create the secret under name maddy.
20
21## Replication
22
23Default for this chart is 1 replica of maddy. If you try to increase this, you will probably get an error because of
24the busy ports 25, 143, 587, etc. We do not support this feature at the moment, so please use just 1 replica. Like said
25at the beginning of this document, multiple replicas would probably require to switch do DaemonSet which would further require
26to have TCP load balancer and shared storage between all replicas. This is not supported by this chart, sorry.
27This chart is used on one node cluster and then installation is straight forward, like described bellow, but if you have
28multiple node cluster, please use taints and tolerations to select the desired node. This chart supports tolerations to
29be set.
30
31## Configuration
32
33| Key                        | Type   | Default           | Description |
34| -------------------------- | ------ | ----------------- | ----------- |
35| affinity                   | object | `{}`              |             |
36| fullnameOverride           | string | `""`              |             |
37| image.pullPolicy           | string | `"IfNotPresent"`  |             |
38| image.repository           | string | `"foxcpp/maddy"`  |             |
39| image.tag                  | string | `""`              |             |
40| imagePullSecrets           | list   | `[]`              |             |
41| nameOverride               | string | `""`              |             |
42| nodeSelector               | object | `{}`              |             |
43| persistence.accessMode     | string | `"ReadWriteOnce"` |             |
44| persistence.annotations    | object | `{}`              |             |
45| persistence.enabled        | bool   | `false`           |             |
46| persistence.path           | string | `"/data"`         |             |
47| persistence.size           | string | `"128Mi"`         |             |
48| podAnnotations             | object | `{}`              |             |
49| podSecurityContext         | object | `{}`              |             |
50| replicaCount               | int    | `1`               |             |
51| resources                  | object | `{}`              |             |
52| securityContext            | object | `{}`              |             |
53| service.type               | string | `"NodePort"`      |             |
54| serviceAccount.annotations | object | `{}`              |             |
55| serviceAccount.create      | bool   | `true`            |             |
56| serviceAccount.name        | string | `""`              |             |
57| tolerations                | list   | `[]`              |             |
58
59## Installing the chart
60
61```sh
62helm upgrade --install maddy ./chart --set service.externapIPs[0]=1.2.3.4
63```
64
651.2.3.4 is your public IP of the node.
66
67## maddy configuration
68
69Feel free to tweak files/maddy.conf and files/aliases according to your needs.