Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proxy env vars to pods #278

Merged
merged 1 commit into from
Apr 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions roles/migrationcontroller/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ configmap_secret: ""
controller_state: absent
deprecated_cors_configuration: false
cors_origins: []
http_proxy: "{{ lookup( 'env', 'HTTP_PROXY') }}"
https_proxy: "{{ lookup( 'env', 'HTTPS_PROXY') }}"
image_pull_policy: Always
mig_controller_image: "{{ registry }}/{{ project }}/{{ mig_controller_repo }}"
mig_controller_limits_cpu: "100m"
Expand Down Expand Up @@ -33,6 +35,7 @@ migration_registry_image: "{{ registry }}/{{ project }}/{{ migration_registry_re
migration_registry_repo: "{{ lookup( 'env', 'MIGRATION_REGISTRY_REPO') }}"
migration_registry_version: "{{ lookup( 'env', 'MIGRATION_REGISTRY_TAG') }}"
migration_registry_image_fqin: "{{ migration_registry_image }}:{{ migration_registry_version }}"
no_proxy: "{{ lookup( 'env', 'NO_PROXY') }}"
olm_managed: false
registry: "{{ lookup( 'env', 'REGISTRY') }}"
project: "{{ lookup( 'env', 'PROJECT') }}"
Expand Down
24 changes: 24 additions & 0 deletions roles/migrationcontroller/templates/controller.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ spec:
value: webhook-server-secret
- name: MIGRATION_REGISTRY_IMAGE
value: {{ migration_registry_image_fqin }}
{% if http_proxy|length >0 %}
- name: HTTP_PROXY
value: {{ http_proxy }}
{% endif %}
{% if https_proxy|length >0 %}
- name: HTTPS_PROXY
value: {{ https_proxy }}
{% endif %}
{% if no_proxy|length >0 %}
- name: NO_PROXY
value: {{ no_proxy }}
{% endif %}
envFrom:
- configMapRef:
name: migration-controller
Expand Down Expand Up @@ -114,6 +126,18 @@ spec:
value: discovery
- name: SECRET_NAME
value: webhook-server-secret
{% if http_proxy|length >0 %}
- name: HTTP_PROXY
value: {{ http_proxy }}
{% endif %}
{% if https_proxy|length >0 %}
- name: HTTPS_PROXY
value: {{ https_proxy }}
{% endif %}
{% if no_proxy|length >0 %}
- name: NO_PROXY
value: {{ no_proxy }}
{% endif %}
envFrom:
- configMapRef:
name: migration-controller
Expand Down
24 changes: 24 additions & 0 deletions roles/migrationcontroller/templates/velero.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ spec:
value: {{ mig_namespace }}
- name: VELERO_SCRATCH_DIR
value: /scratch
{% if http_proxy|length >0 %}
- name: HTTP_PROXY
value: {{ http_proxy }}
{% endif %}
{% if https_proxy|length >0 %}
- name: HTTPS_PROXY
value: {{ https_proxy }}
{% endif %}
{% if no_proxy|length >0 %}
- name: NO_PROXY
value: {{ no_proxy }}
{% endif %}
volumes:
- name: {{ velero_aws_secret_name }}
secret:
Expand Down Expand Up @@ -213,6 +225,18 @@ spec:
- name: certs
mountPath: /etc/ssl/certs
env:
{% if http_proxy|length >0 %}
- name: HTTP_PROXY
value: {{ http_proxy }}
{% endif %}
{% if https_proxy|length >0 %}
- name: HTTPS_PROXY
value: {{ https_proxy }}
{% endif %}
{% if no_proxy|length >0 %}
- name: NO_PROXY
value: {{ no_proxy }}
{% endif %}
- name: NODE_NAME
valueFrom:
fieldRef:
Expand Down