From c62c4d59045b89af398296f43dc203b20b817238 Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Thu, 24 Oct 2024 11:39:34 +0100 Subject: [PATCH] Fix aodh test Signed-off-by: Fabricio Aguiar --- ci/tempest/ci_fw_vars.yaml | 36 +++++++++++++------ ci/tempest/control_plane_hook.yaml | 26 -------------- .../create-coo-subscription-playbook.yaml | 10 ++++++ ci/tempest/create-coo-subscription.yaml | 33 +++++++++++++++++ zuul.d/jobs.yaml | 18 +++++----- 5 files changed, 78 insertions(+), 45 deletions(-) delete mode 100644 ci/tempest/control_plane_hook.yaml create mode 100644 ci/tempest/create-coo-subscription-playbook.yaml create mode 100644 ci/tempest/create-coo-subscription.yaml diff --git a/ci/tempest/ci_fw_vars.yaml b/ci/tempest/ci_fw_vars.yaml index 73b00909..3fb33fac 100644 --- a/ci/tempest/ci_fw_vars.yaml +++ b/ci/tempest/ci_fw_vars.yaml @@ -1,13 +1,27 @@ --- -# note by default the source for the playbook specified -# in the hooks is relative to -# https://github.com/openstack-k8s-operators/ci-framework/tree/main/hooks/playbooks -# if you want to use a different source you can use the full path on the ansible controller - -post_ctlplane_deploy: - - name: 71 Kustomize control plane to enable heat service +cifmw_edpm_prepare_timeout: 60 +pre_deploy_create_coo_subscription: + source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/heat-operator'].src_dir }}/ci/tempest/create-coo-subscription-playbook.yaml" type: playbook - source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/heat-operator'].src_dir }}/ci/tempest/control_plane_hook.yaml" - - name: 82 Kustomize and update Control Plane - type: playbook - source: control_plane_kustomize_deploy.yml +cifmw_edpm_prepare_kustomizations: + - apiVersion: kustomize.config.k8s.io/v1beta1 + kind: Kustomization + namespace: openstack + patches: + - patch: |- + apiVersion: core.openstack.org/v1beta1 + kind: OpenStackControlPlane + metadata: + name: unused + spec: + heat: + enabled: true + telemetry: + enabled: true + template: + metricStorage: + enabled: true + autoscaling: + enabled: true + target: + kind: OpenStackControlPlane diff --git a/ci/tempest/control_plane_hook.yaml b/ci/tempest/control_plane_hook.yaml deleted file mode 100644 index e196cd9d..00000000 --- a/ci/tempest/control_plane_hook.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- name: Kustomize ControlPlane - hosts: "{{ cifmw_target_hook_host | default('localhost') }}" - gather_facts: false - tasks: - - name: Ensure the kustomizations dir exists - ansible.builtin.file: - path: "{{ cifmw_basedir }}/artifacts/manifests/kustomizations/controlplane" - state: directory - mode: "0755" - - - name: Create kustomization - ansible.builtin.copy: - dest: "{{ cifmw_basedir }}/artifacts/manifests/kustomizations/controlplane/71-controlplane-kustomization.yaml" - content: |- - apiVersion: kustomize.config.k8s.io/v1beta1 - kind: Kustomization - resources: - namespace: {{ cifmw_install_yamls_defaults['NAMESPACE'] }} - patches: - - target: - kind: OpenStackControlPlane - patch: |- - - op: replace - path: /spec/heat/enabled - value: true diff --git a/ci/tempest/create-coo-subscription-playbook.yaml b/ci/tempest/create-coo-subscription-playbook.yaml new file mode 100644 index 00000000..c29d3969 --- /dev/null +++ b/ci/tempest/create-coo-subscription-playbook.yaml @@ -0,0 +1,10 @@ +--- +- name: "Create the cluster-observability-operator subscription" + hosts: "{{ cifmw_target_hook_host | default('localhost') }}" + gather_facts: false + environment: + KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" + PATH: "{{ cifmw_path }}" + tasks: + - name: Import tasks for creating COO subscription + ansible.builtin.include_tasks: "create-coo-subscription.yaml" diff --git a/ci/tempest/create-coo-subscription.yaml b/ci/tempest/create-coo-subscription.yaml new file mode 100644 index 00000000..38cfd943 --- /dev/null +++ b/ci/tempest/create-coo-subscription.yaml @@ -0,0 +1,33 @@ +--- +- name: Create the COO subscription + ansible.builtin.shell: + cmd: | + oc create -f - <