EE: Allow one to specify extra environment variable

This commit is contained in:
Yanis Guenane
2021-06-17 10:20:12 +02:00
parent 12f9fff6d5
commit 3899365da7
8 changed files with 23 additions and 1 deletions

View File

@@ -642,6 +642,7 @@ If you need to export custom environment variables to your containers.
| ----------------------------- | -------------------------------------------------------- | ------- |
| task_extra_env | Environment variables to be added to Task container | '' |
| web_extra_env | Environment variables to be added to Web container | '' |
| ee_extra_env | Environment variables to be added to EE container | '' |
Example configuration of environment variables
@@ -653,6 +654,9 @@ Example configuration of environment variables
web_extra_env: |
- name: MYCUSTOMVAR
value: foo
ee_extra_env: |
- name: MYCUSTOMVAR
value: foo
```
#### Extra Settings

View File

@@ -246,6 +246,8 @@ spec:
type: string
web_extra_env:
type: string
ee_extra_env:
type: string
ee_extra_volume_mounts:
description: Specify volume mounts to be added to Execution container
type: string

View File

@@ -248,6 +248,8 @@ spec:
type: string
web_extra_env:
type: string
ee_extra_env:
type: string
ee_extra_volume_mounts:
description: Specify volume mounts to be added to Execution container
type: string

View File

@@ -246,6 +246,8 @@ spec:
type: string
web_extra_env:
type: string
ee_extra_env:
type: string
ee_extra_volume_mounts:
description: Specify volume mounts to be added to Execution container
type: string

View File

@@ -450,6 +450,12 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- description: Environment variables to be added to EE container
displayName: EE Extra Env
path: ee_extra_env
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- description: Registry path to the Execution Environment container to use on control plane pods
displayName: Control Plane EE Image
path: control_plane_ee_image

View File

@@ -62,6 +62,8 @@ spec:
type: string
type: object
type: array
ee_extra_env:
type: string
ee_pull_credentials_secret:
description: Secret where pull credentials for registered ees can be found
type: string

View File

@@ -149,6 +149,7 @@ web_resource_requirements:
# value: bing
task_extra_env: ''
web_extra_env: ''
ee_extra_env: ''
# Mount extra volumes on the AWX task/web containers. Specify as literal block.
# E.g.:

View File

@@ -221,13 +221,16 @@ spec:
{% if ee_extra_volume_mounts -%}
{{ ee_extra_volume_mounts | indent(width=12, indentfirst=True) }}
{% endif %}
{% if development_mode | bool %}
env:
{% if development_mode | bool %}
- name: SDB_NOTIFY_HOST
valueFrom:
fieldRef:
fieldPath: status.podIP
{% endif %}
{% if ee_extra_env -%}
{{ ee_extra_env | indent(width=12, indentfirst=True) }}
{% endif %}
{% if node_selector %}
nodeSelector:
{{ node_selector | indent(width=8) }}