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 | '' | | task_extra_env | Environment variables to be added to Task container | '' |
| web_extra_env | Environment variables to be added to Web 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 Example configuration of environment variables
@@ -653,6 +654,9 @@ Example configuration of environment variables
web_extra_env: | web_extra_env: |
- name: MYCUSTOMVAR - name: MYCUSTOMVAR
value: foo value: foo
ee_extra_env: |
- name: MYCUSTOMVAR
value: foo
``` ```
#### Extra Settings #### Extra Settings

View File

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

View File

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

View File

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

View File

@@ -450,6 +450,12 @@ spec:
x-descriptors: x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden - 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 - description: Registry path to the Execution Environment container to use on control plane pods
displayName: Control Plane EE Image displayName: Control Plane EE Image
path: control_plane_ee_image path: control_plane_ee_image

View File

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

View File

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

View File

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