message-tagging-services: set env var USERNAME for fedmsg to publish messages

Refer to the comment inside code for details.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
This commit is contained in:
Chenxiong Qi 2019-08-16 17:08:43 +08:00 committed by Pierre-Yves Chibon
parent 8e9f2ae762
commit fe3781dde7

View file

@ -20,10 +20,19 @@ spec:
- name: mts
image: quay.io/factory2/message-tagging-service:{{ quay_tag }}
env:
# Set this environment variable for fedmsg to publish a message to
# fedmsg hub.
# Some details:
# When call publish function to publish a message, fedmsg requires to
# get current user's name by calling getpass.getuser function, which
# then tries to get name from several environment variables firstly, if
# fail on all of those variables, it gets current user id and tries to
# get name from local user database /etc/passwd.
# Without this variable set manually, user id does not exist in
# /etc/passwd, and there is also no environment variables set to make
# getpass.getuser work normally.
- name: USERNAME
value: mts
- name: LOGNAME
value: mts
ports:
- containerPort: 8080
volumeMounts: