Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[k8s] helm charts #545

Open
volker-raschek opened this issue Sep 27, 2021 · 3 comments
Open

[k8s] helm charts #545

volker-raschek opened this issue Sep 27, 2021 · 3 comments

Comments

@volker-raschek
Copy link

volker-raschek commented Sep 27, 2021

Hi folks,
in the past weeks I have been working on a helm chart for postfixadmin as well as the fetchmail job. For this I packaged postfixadmin as a separate container image, because major changes were necessary.

Furthermore I adapted the fetchmail.pl script, because it was missing the option for a port. The script is also deployed via its own container and then started as a kubernetes cron job.

I would ask the community here to look at the changes and lead back in the long run. As a note, postfixadmin I currently only support as an apache image to avoid the configuration overhead in helm. Both images, postfixadmin and fetchmail, are available for ARM architecture to run on Raspberry Pis for example.

Here are the images and helm charts:

@DavidGoodwin
Copy link
Member

Hello - thank you for the contribution? I've no experience of helm, but am curious why the 'official' docker image couldn't have been used?
( https://github.com/postfixadmin/docker )

@volker-raschek
Copy link
Author

I think there are two main differences:

Your image supports only certain environment variables. The image from me replaces all variables with the prefix POSTFIXADMIN_ in the configuration. This works for all config parameters, except for nested configurations.

https://github.com/volker-raschek/postfixadmin-docker/blob/master/entrypoint.sh#L51

At this point, though, I'd like to play the ball back and prefer if this could be solved directly by the application. This would significantly minimize the complexity in the entrypoint.sh script and make the configuration of the container more flexible.

Next, config['setup_password'] expects a bcrypt hash from a salt. The user must be able to pass the salt value via plain text. This is not the case with your image. The user has to create the hash himself and provide it as environment variable. This annoyed me personally, so I now solve this in the entrypoint.sh script.

https://github.com/volker-raschek/postfixadmin-docker/blob/master/entrypoint.sh#L43

This was also the reason to understand how the password was generated in an older version of postfixadmin. Unfortunately I could not recreate this with linux commands #538

@DavidGoodwin
Copy link
Member

setup password stuff - postfixadmin/docker#48

I like this bit -

# create config.local.pgp with vaules from env with POSTFIXADMIN_ prefix
POSTFIXADMIN_ENV_VARS=($(env | sort | grep --perl-regexp '^POSTFIXADMIN_.*'))

and the subsequent generation of config.local.php ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants