ONLYOFFICE / Docker-MailServer

ONLYOFFICE Mail Server is a full-featured mail server solution developed on the base of the iRedMail package, containing the following components: Postfix, Dovecot, SpamAssassin, ClamAV, OpenDKIM, Fail2ban.
Other
79 stars 54 forks source link

kubernetes did not allow fully qualified domain name #17

Open mamiapatrick opened 4 years ago

mamiapatrick commented 4 years ago

Hello,

I try to install your mailserver in kubernetes but the installation failed because kubernetes did not allow fully qualified domain name. Do you preview an environment variable to overrides the hostnames of the pods or you mailserver is not compatible with kubernetes

Carazyda commented 4 years ago

Hello @mamiapatrick please describe how did you run the installation, and what an error get?

mamiapatrick commented 4 years ago

Hello @Carazyda I got an evnironnement of RKE (Rancher) and i deploy communitymailserver as a normal deployment with the image onlyoffice/communityserver and some environment variables for MySql configuration. The pod do not use the network host (when i do the mailserver take into consideration the hostname of the nodes but that hostname is not the domain that i want to use for my mailserver. I try to debug and i saw that the hostanme is not configurable and is read directly as the hostname where mailserver is deployed.

Carazyda commented 4 years ago

I think this is configuraton of kubernetes, not onlyoffice. I didn't work with kubernetes, and can't say about it. In Onlyoffice mailserver you can setup domain name by -h parameter in docker run or run using our script(opensource-install.sh or enterprise-install.sh).

mamiapatrick commented 4 years ago

Hello, You are right for docker i think it is ok. Yeah that is what i was talking about, kubernetes do not allow FQDN for pod (because dot (.) is not allowed as character for a hostname. Thatis why i suggest you to put the hostname as an environnement variable as MySql parameter ... you can name it HOSTNAME and the script could take it as other variable contrary to read the hostname of the host as it is setup now.

Carazyda commented 4 years ago

I don’t quite understand you. The -h yourdomain.com parameter in thedocker run command sets the host name for the docker container. What host name do you want to change and by what method?

mamiapatrick commented 4 years ago

Have you already use kubernetes ? You cannot use docker run with kubernetes. You have to set a deployment, yes you can set the hostnaime of a container in kubernetes but this hostname syntax denied the dot (.) So you can't have a hostname as mail.example.com, a fully qualified domain name. And community server require a FQDN.

My proposal is that, it is not necessary to set the hostname of the mail server by reading the hostname of the nodes where you deployed your container. The hostname can be a value provided by an environment variable that the container use, and the DNS will take care to point that domain to that host/container. I expect that my explanation is better this time. Thanks

Carazyda commented 4 years ago

Now I think I understand you. Yes, I have no experience with kubernetes, and I could not understand what you mean. We do not currently have kubernetes support, but we are working on it.

mamiapatrick commented 4 years ago

hello @Carazyda any update on your kubernetes support?

Carazyda commented 4 years ago

Hello @mamiapatrick yes, it is under testing.

mamiapatrick commented 4 years ago

Coool. Impatient to get your feedback