diff --git a/installer/roles/kubernetes/templates/deployment.yml.j2 b/installer/roles/kubernetes/templates/deployment.yml.j2 index 7a84e3d52a13..dbe61afc8300 100644 --- a/installer/roles/kubernetes/templates/deployment.yml.j2 +++ b/installer/roles/kubernetes/templates/deployment.yml.j2 @@ -4,6 +4,10 @@ kind: ServiceAccount metadata: name: awx namespace: {{ kubernetes_namespace }} +{% if kubernetes_image_pull_secrets is defined %} +imagePullSecrets: + - name: "{{ kubernetes_image_pull_secrets }}" +{% endif %} --- kind: Service diff --git a/installer/roles/kubernetes/templates/management-pod.yml.j2 b/installer/roles/kubernetes/templates/management-pod.yml.j2 index 9cb35932cec4..14d8b61cc572 100644 --- a/installer/roles/kubernetes/templates/management-pod.yml.j2 +++ b/installer/roles/kubernetes/templates/management-pod.yml.j2 @@ -5,6 +5,10 @@ metadata: name: ansible-tower-management namespace: {{ kubernetes_namespace }} spec: +{% if kubernetes_image_pull_secrets is defined %} + imagePullSecrets: + - name: "{{ kubernetes_image_pull_secrets }}" +{% endif %} containers: - name: ansible-tower-management image: "{{ kubernetes_task_image }}:{{ kubernetes_task_version }}"