From 7508669a678848bb7464ae68c34de0cdc77e4877 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Wed, 13 Mar 2024 13:29:50 -0400 Subject: [PATCH] Add ServiceAccount and ImagePullSecet to migration pod --- roles/installer/templates/jobs/migration.yaml.j2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/installer/templates/jobs/migration.yaml.j2 b/roles/installer/templates/jobs/migration.yaml.j2 index 98b9f7cbd..f05270183 100644 --- a/roles/installer/templates/jobs/migration.yaml.j2 +++ b/roles/installer/templates/jobs/migration.yaml.j2 @@ -32,6 +32,16 @@ spec: {% if development_mode | bool %} - name: awx-devel mountPath: "/awx_devel" +{% endif %} + serviceAccountName: '{{ ansible_operator_meta.name }}' +{% if image_pull_secret is defined %} + imagePullSecrets: + - name: {{ image_pull_secret }} +{% elif image_pull_secrets | length > 0 %} + imagePullSecrets: +{% for secret in image_pull_secrets %} + - name: {{ secret }} +{% endfor %} {% endif %} volumes: - name: "{{ ansible_operator_meta.name }}-application-credentials"