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:
parent
8e9f2ae762
commit
fe3781dde7
1 changed files with 11 additions and 2 deletions
|
@ -20,10 +20,19 @@ spec:
|
||||||
- name: mts
|
- name: mts
|
||||||
image: quay.io/factory2/message-tagging-service:{{ quay_tag }}
|
image: quay.io/factory2/message-tagging-service:{{ quay_tag }}
|
||||||
env:
|
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
|
- name: USERNAME
|
||||||
value: mts
|
value: mts
|
||||||
- name: LOGNAME
|
|
||||||
value: mts
|
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue