From 16988920ff9594b20204f2bf5239c926b322dea5 Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Thu, 25 May 2023 10:30:09 -0300 Subject: [PATCH] Make AEE logs storage optional Signed-off-by: Fabricio Aguiar --- .gitignore | 1 + ci/playbooks/deploy_edpm.yaml | 7 ------- scripts/gen-edpm-kustomize.sh | 26 +++++++++++++++----------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index b5031f6..9efd6b2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ kuttl-test-*.json kubeconfig devsetup/ci-framework devsetup/tls.crt +.vscode diff --git a/ci/playbooks/deploy_edpm.yaml b/ci/playbooks/deploy_edpm.yaml index 51aacee..296e72b 100644 --- a/ci/playbooks/deploy_edpm.yaml +++ b/ci/playbooks/deploy_edpm.yaml @@ -10,13 +10,6 @@ name: libguestfs-tools-c state: present - - name: Run make crc_storage - community.general.make: - target: crc_storage - chdir: "{{ install_yamls_basedir }}" - params: - OUT: "{{ install_yamls_basedir }}/out" - - name: Run make edpm_compute community.general.make: target: edpm_compute diff --git a/scripts/gen-edpm-kustomize.sh b/scripts/gen-edpm-kustomize.sh index d872dac..d254edd 100644 --- a/scripts/gen-edpm-kustomize.sh +++ b/scripts/gen-edpm-kustomize.sh @@ -79,17 +79,6 @@ patches: - op: replace path: /spec/roles/edpm-compute/openStackAnsibleEERunnerImage value: ${OPENSTACK_RUNNER_IMG} - - op: replace - path: /spec/roles/edpm-compute/nodeTemplate/extraMounts - value: - - extraVolType: Logs - volumes: - - name: ansible-logs - persistentVolumeClaim: - claimName: ansible-ee-logs - mounts: - - name: ansible-logs - mountPath: "/runner/artifacts" - op: replace path: /spec/roles/edpm-compute/nodeTemplate/ansibleVars value: | @@ -188,6 +177,21 @@ patches: path: /spec/roles/edpm-compute/nodeTemplate/ansibleSSHPrivateKeySecret value: ${EDPM_ANSIBLE_SECRET} EOF +if oc get pvc ansible-ee-logs 2>&1 1>/dev/null; then +cat <>kustomization.yaml + - op: replace + path: /spec/roles/edpm-compute/nodeTemplate/extraMounts + value: + - extraVolType: Logs + volumes: + - name: ansible-logs + persistentVolumeClaim: + claimName: ansible-ee-logs + mounts: + - name: ansible-logs + mountPath: "/runner/artifacts" +EOF +fi if [ "$EDPM_SINGLE_NODE" == "true" ]; then cat <>kustomization.yaml - op: remove