Use pod uid as instance uuid

Inject the pod uid as an environment variable and use it for the
SYSTEM_UUID in the settings file defined by the configmap.
This commit is contained in:
Jake McDermott 2020-02-12 13:48:20 -05:00
parent c7516ec50e
commit 3831efb3be
No known key found for this signature in database
GPG Key ID: 0E56ED990CDFCB4F
2 changed files with 5 additions and 1 deletions

View File

@ -144,7 +144,7 @@ data:
#Autoprovisioning should replace this
CLUSTER_HOST_ID = socket.gethostname()
SYSTEM_UUID = '00000000-0000-0000-0000-000000000000'
SYSTEM_UUID = os.environ.get('MY_POD_UID', '00000000-0000-0000-0000-000000000000')
SESSION_COOKIE_SECURE = False
CSRF_COOKIE_SECURE = False

View File

@ -285,6 +285,10 @@ spec:
env:
- name: AWX_SKIP_MIGRATIONS
value: "1"
- name: MY_POD_UID
valueFrom:
fieldRef:
fieldPath: metadata.uid
resources:
requests:
memory: "{{ task_mem_request }}Gi"