Closed aav66 closed 2 years ago
Hi @aav66 could you better explain the issue you are fixing and how did you test it ? your PR description is very vague.
Hi @aav66 could you better explain the issue you are fixing and how did you test it ? your PR description is very vague. Yes, sure. So I got issue when
read SMTP_PASSWORD < ${SMTP_PASSWORD_FILE}
exit with error, but SMTP_PASSWORD is defined.
$ kubectl exec -t -i mailer-testing-64f7f656f4-vgx4q -c postfix -- /bin/bash
bash-5.1# ls -lhat "${SMTP_PASSWORD_FILE}"
lrwxrwxrwx 1 root root 24 Nov 2 14:49 /var/secrets/smtp_password.txt -> ..data/smtp_password.txt
bash-5.1# if [ -n "${SMTP_PASSWORD_FILE}" ]; then [ -f "${SMTP_PASSWORD_FILE}" ] && read SMTP_PASSWORD < ${SMTP_PASSWORD_FILE} || echo "SMTP_PASSWORD_FILE defined, but file not existing, skipping."; fi
SMTP_PASSWORD_FILE defined, but file not existing, skipping.
bash-5.1# echo $SMTP_PASSWORD
secret
Hi @aav66, please amend the commit message, it is missing the colons after the word "fix", it should be "fix:"
Creating a Pull Request
We use github actions to do automatic semantic versioning, so please use the following nomenclature for the commit message according to the type of change:
feat:
, and it will trigger a minor version bump.fix
:, and it will trigger a patch version bump.BREAKING CHANGE:
, and it will trigger a major version bump.Description of the change
Checking for file or symlink is exist for SMTP_PASSWORD_FILE and SMTP_USERNAME_FILE.
Motivation and Context
Able to read password from symlinks and prevent error logging on read.
How Has This Been Tested?
at local environment
Types of Changes
Checklist:
.env.example
file accordingly.