feat: add proxy env var support for AWX containers (#2113)

Add http_proxy, https_proxy, and no_proxy CRD fields to the AWX spec
and inject them into all application containers via a shared proxy-env
ConfigMap, with automatic rollouts when proxy values change.

Assisted by: Claude

Signed-off-by: James Marshall <jamarsha@redhat.com>
This commit is contained in:
jamesmarshall24
2026-04-29 11:22:17 -04:00
committed by GitHub
parent 9c3f521514
commit 7745848ba5
8 changed files with 90 additions and 0 deletions

View File

@@ -48,6 +48,9 @@ spec:
{{ task_annotations | indent(width=8) }}
{% elif annotations %}
{{ annotations | indent(width=8) }}
{% endif %}
{% if http_proxy or https_proxy or no_proxy %}
checksum-configmaps-proxy-env: "{{ lookup('template', 'configmaps/proxy-env.configmap.yaml.j2') | sha1 }}"
{% endif %}
spec:
serviceAccountName: '{{ ansible_operator_meta.name }}'
@@ -351,6 +354,10 @@ spec:
{% if task_extra_env -%}
{{ task_extra_env | indent(width=12, first=True) }}
{% endif %}
envFrom:
- configMapRef:
name: '{{ ansible_operator_meta.name }}-proxy-env'
optional: true
resources: {{ task_resource_requirements }}
- image: '{{ _control_plane_ee_image }}'
name: '{{ ansible_operator_meta.name }}-ee'
@@ -414,6 +421,10 @@ spec:
{% if ee_extra_env -%}
{{ ee_extra_env | indent(width=12, first=True) }}
{% endif %}
envFrom:
- configMapRef:
name: '{{ ansible_operator_meta.name }}-proxy-env'
optional: true
- image: '{{ _image }}'
name: '{{ ansible_operator_meta.name }}-rsyslog'
{% if rsyslog_command %}
@@ -475,6 +486,10 @@ spec:
{% if rsyslog_extra_env -%}
{{ rsyslog_extra_env | indent(width=12, first=True) }}
{% endif %}
envFrom:
- configMapRef:
name: '{{ ansible_operator_meta.name }}-proxy-env'
optional: true
{% if task_node_selector %}
nodeSelector:
{{ task_node_selector | indent(width=8) }}

View File

@@ -51,6 +51,9 @@ spec:
{{ web_annotations | indent(width=8) }}
{% elif annotations %}
{{ annotations | indent(width=8) }}
{% endif %}
{% if http_proxy or https_proxy or no_proxy %}
checksum-configmaps-proxy-env: "{{ lookup('template', 'configmaps/proxy-env.configmap.yaml.j2') | sha1 }}"
{% endif %}
spec:
{% if uwsgi_listen_queue_size is defined and uwsgi_listen_queue_size|int > 128 %}
@@ -300,6 +303,10 @@ spec:
{% if web_extra_env -%}
{{ web_extra_env | indent(width=12, first=True) }}
{% endif %}
envFrom:
- configMapRef:
name: '{{ ansible_operator_meta.name }}-proxy-env'
optional: true
resources: {{ web_resource_requirements }}
- image: '{{ _image }}'
name: '{{ ansible_operator_meta.name }}-rsyslog'
@@ -349,6 +356,10 @@ spec:
{% if rsyslog_extra_env -%}
{{ rsyslog_extra_env | indent(width=12, first=True) }}
{% endif %}
envFrom:
- configMapRef:
name: '{{ ansible_operator_meta.name }}-proxy-env'
optional: true
resources: {{ rsyslog_resource_requirements }}
{% if web_node_selector %}
nodeSelector: