From f68dc77ea315ff69449dcabc5c2761aa20c6911b Mon Sep 17 00:00:00 2001 From: Gabe Muniz Date: Thu, 15 Apr 2021 17:33:31 -0400 Subject: [PATCH] added documentation around environment variables --- README.md | 23 +++++++++++++++++++ .../awx-operator.clusterserviceversion.yaml | 2 ++ .../manifests/awx.ansible.com_awxs_crd.yaml | 2 ++ 3 files changed, 27 insertions(+) diff --git a/README.md b/README.md index f9fd0624..b7b430e9 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ An [Ansible AWX](https://github.com/ansible/awx) operator for Kubernetes built w * [LDAP Certificate Authority](#ldap-certificate-authority) * [Persisting Projects Directory](#persisting-projects-directory) * [Custom Volume and Volume Mount Options](#custom-volume-and-volume-mount-options) + * [Exporting Environment Variables to Containers](#exporting-environment-variables-to-containers) * [Development](#development) * [Testing](#testing) * [Testing in Docker](#testing-in-docker) @@ -477,6 +478,28 @@ Example spec file for volumes and volume mounts > :warning: **Volume and VolumeMount names cannot contain underscores(_)** +#### Exporting Environment Variables to Containers + +If you need to export custom environment variables to your containers. + +| Name | Description | Default | +| ----------------------------- | -------------------------------------------------------- | ------- | +| tower_task_extra_env | Environment variables to be added to Task container | '' | +| tower_web_extra_env | Environment variables to be added to Web container | '' | + +Example configuration of environment variables + +```yaml + spec: + tower_task_extra_env: | + - name: MYCUSTOMVAR + value: foo + tower_web_extra_env: | + - name: MYCUSTOMVAR + value: foo +``` + + ## Development ### Testing diff --git a/deploy/olm-catalog/awx-operator/manifests/awx-operator.clusterserviceversion.yaml b/deploy/olm-catalog/awx-operator/manifests/awx-operator.clusterserviceversion.yaml index 0fea86e0..960d8987 100644 --- a/deploy/olm-catalog/awx-operator/manifests/awx-operator.clusterserviceversion.yaml +++ b/deploy/olm-catalog/awx-operator/manifests/awx-operator.clusterserviceversion.yaml @@ -295,6 +295,7 @@ spec: - urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:hidden - displayName: Tower Task Extra Env + description: Environment variables to be added to Task container path: tower_task_extra_env x-descriptors: - urn:alm:descriptor:com.tectonic.ui:advanced @@ -322,6 +323,7 @@ spec: - urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:hidden - displayName: Tower Web Extra Env + description: Environment variables to be added to Web container path: tower_web_extra_env x-descriptors: - urn:alm:descriptor:com.tectonic.ui:advanced diff --git a/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml b/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml index 1d684484..e628463e 100644 --- a/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml +++ b/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml @@ -225,6 +225,7 @@ spec: type: string type: array tower_task_extra_env: + description: Environment variables to be added to Task container type: string tower_ee_extra_volume_mounts: description: Specify volume mounts to be added to Execution container @@ -270,6 +271,7 @@ spec: type: string type: array tower_web_extra_env: + description: Environment variables to be added to Web container type: string tower_web_extra_volume_mounts: description: Specify volume mounts to be added to web container