Mailu / helm-charts

Development repo for helm charts
127 stars 131 forks source link

Helm documentation #21

Closed outbackdingo closed 4 years ago

outbackdingo commented 4 years ago

first, its been days ive been "fighting" to deploy mailu on k8s ... i see the kubernetes ymls are broken, and now i find a helm chart with literally 0 documentation or a values.yml "example" ... so again, while mailu is great, i ran it for a very long time on docker. I am getting literally nowhere running it on k8s.

micw commented 4 years ago

Hi, thank you for the feedback. I try to find enough time to improve docs before the next release. Could you please go more into detail what problems occured?

micw commented 4 years ago

For a valid values.yaml, please have a look into https://github.com/Mailu/helm-charts/blob/master/mailu/values.yaml You just need to provide "hostnames", "domain" and "secretKey", that's all you need for a basic deployment.

outbackdingo commented 4 years ago

Yupp jys noticed, please add the too documents ... easier to understand :) so progress, seems certs holding me up, i have a prod-issue working for ingress-nginx.... but... Yikes.. HELP!

mail-mailu-admin-7cdd7f78c6-bbdtk 0/1 ContainerCreating 0 6m49s mail-mailu-clamav-5f8bf98d64-fwplq 0/1 ContainerCreating 0 6m49s mail-mailu-dovecot-86559f8bf7-ncm6s 0/1 ContainerCreating 0 6m49s mail-mailu-front-dfx6c 0/1 CrashLoopBackOff 6 6m50s mail-mailu-front-jtncd 0/1 CrashLoopBackOff 6 6m50s mail-mailu-front-qc646 0/1 CrashLoopBackOff 6 6m50s mail-mailu-front-z7m56 0/1 CrashLoopBackOff 6 6m50s mail-mailu-postfix-58747d7cb8-ljvwx 0/1 ContainerCreating 0 6m49s mail-mailu-redis-7f5c977d85-44c9d 0/1 ContainerCreating 0 6m49s mail-mailu-roundcube-587f689c76-4vw4t 0/1 ContainerCreating 0 6m49s mail-mailu-rspamd-58779db9dd-qjjtf 0/1 ContainerCreating 0 6m49s

kubectl logs -f mail-mailu-front-jtncd   20:10  01.03.20  55.27G RAM nginx: [emerg] cannot load certificate "/certs/cert.pem": PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)

values.yml

Default values for mailu.

A list of mail hostnames is required. The first will be used as primary mail hostname

hostnames:

An initial account can automatically be created:

initialAccount: username: admin domain: domain.com password: XXXXXXXXX

nameOverride: "" fullnameOverride: ""

nodeSelector: {} imagePullSecrets: {}

database:

default database is an embedded sqlite

type: sqlite

For mysql/mariadb use the following config:

Set the host to use an external database.

If not host is set, a database instance is created by this chart.

type: mysql

mysql: {}

database: mailu

user: mailu

password: chang3m3!

host: external-db-hostname

rootPassword: chang3m3! # can only be set for embedded mysql

persistence: size: 10Gi type: hostPath

storageClass: default

hostPath: /mailu

Change this if you're using different address ranges for pods

subnet: 10.42.0.0/16

Version of mailu docker images to use when not specified otherwise

mailuVersion: master

default log level. can be overridden globally or per service

logLevel: WARNING

mail: messageSizeLimitInMegabytes: 50 authRatelimit: 10/minute;1000/hour

certmanager settings

certmanager: issuerType: ClusterIssuer issuerName: letsencrypt

Frontend load balancer for non-HTTP(s) services

front:

logLevel: WARNING

image: repository: mailu/nginx

tag defaults to mailuVersion

# tag: master

resources: requests: memory: 100Mi cpu: 100m limits: memory: 200Mi cpu: 200m

admin:

logLevel: WARNING

image: repository: mailu/admin

tag defaults to mailuVersion

# tag: master

resources: requests: memory: 500Mi cpu: 500m limits: memory: 500Mi cpu: 500m

redis: image: repository: redis tag: 5-alpine resources: requests: memory: 200Mi cpu: 100m limits: memory: 300Mi cpu: 200m

postfix:

logLevel: WARNING

image: repository: mailu/postfix

tag defaults to mailuVersion

# tag: master

resources: requests: memory: 2Gi cpu: 500m limits: memory: 2Gi cpu: 500m

dovecot:

logLevel: WARNING

image: repository: mailu/dovecot

tag defaults to mailuVersion

# tag: master

resources: requests: memory: 500Mi cpu: 500m limits: memory: 500Mi cpu: 500m

rspamd:

logLevel: WARNING

image: repository: mailu/rspamd

tag defaults to mailuVersion

# tag: master

resources: requests: memory: 100Mi cpu: 100m limits: memory: 200Mi cpu: 200m

clamav:

logLevel: WARNING

image: repository: mailu/clamav

tag defaults to mailuVersion

# tag: master

resources: requests: memory: 1Gi cpu: 1000m limits: memory: 2Gi cpu: 1000m

roundcube:

logLevel: WARNING

image: repository: mailu/roundcube

tag defaults to mailuVersion

# tag: master

resources: requests: memory: 100Mi cpu: 100m limits: memory: 200Mi cpu: 200m

webdav:

logLevel: WARNING

image: repository: mailu/clamav

tag defaults to mailuVersion

# tag: master

mysql: image: repository: library/mariadb tag: 10.4.10 resources: requests: memory: 256Mi cpu: 100m limits: memory: 512Mi cpu: 200m

outbackdingo commented 4 years ago

i believe my issue might be hostPath, as im not familiar with it .... persistence: size: 10Gi type: hostPath

storageClass: default

hostPath: /mailu

generally, using StorageOS i would use

Persist data to a persitent volume

persistence: enabled: true storageClass: fast accessMode: ReadWriteOnce size: 800Mi

micw commented 4 years ago

I have re-worked and documented persistence. Default is now to create a PVC, please check if it works for you now.

outbackdingo commented 4 years ago

ahah... nice..... last note: accessMode: ReadWriteOnce should be configurable, as i do require ReadWriteMany like you had, and then changed. When multiple pods access / mount same storage RWM is a requirement, also note StorageOS places RWM pvc on NFS ... and im pretty sure there were some tweaks for dovecot on NFS .... however I dont see them in the config. As per https://mailu.io/1.7/kubernetes/mailu/index.html#adaptations ..... i dont see an "overides" directory.

micw commented 4 years ago

When multiple pods access / mount same storage RWM is a requirement, also note StorageOS places RWM pvc on NFS

I'm pretty sure that it's only a requirement for mutiple nodes, not multiple pods but I made it configurable now.

i dont see an "overides" directory

That's not supported yet in the chart but can easily be added. I'll create new issue and close this "meta issue". Please create individual issues for individual bugs.

micw commented 4 years ago

See #22