From 0dbf3ddff81cca6bf21302f7db3892429de9d2cc Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Wed, 13 Mar 2024 16:56:56 -0400 Subject: [PATCH] Add ServiceAccount and ImagePullSecet to migration job (#1763) 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"