Skip to content

Commit d084423

Browse files
committed
[ci] Add a pre_deploy hook to create the oscp kustomization to enable cloudkitty
* add s3storageConfig secret * disable autoscaling and logging * Enable metricsStorage in telemetry to provide prometheus for storage * Configure storageClass for CloudKitty in configure-cloudkitty hook Set the storageClass to crc-csi-hostpath-provisioner for CloudKitty deployment in CRC-based CI jobs. This prevents the need to increase PVC allocations in install_yamls by using the default storage class available in CRC, which allocates storage as required.
1 parent 588bdda commit d084423

File tree

2 files changed

+68
-4
lines changed

2 files changed

+68
-4
lines changed

ci/configure-cloudkitty.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
- name: "Create the kustomization for deploying CloudKitty"
3+
hosts: "{{ cifmw_target_hook_host | default('localhost') }}"
4+
gather_facts: false
5+
environment:
6+
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
7+
PATH: "{{ cifmw_path }}"
8+
tasks:
9+
- name: Copy controlplane kustomization
10+
ansible.builtin.copy:
11+
dest: "{{ cifmw_basedir }}/artifacts/manifests/kustomizations/controlplane/90-kustomize-controlplane-cloudkitty.yaml"
12+
content: |-
13+
apiVersion: kustomize.config.k8s.io/v1beta1
14+
kind: Kustomization
15+
namespace: openstack
16+
patches:
17+
- patch: |-
18+
apiVersion: core.openstack.org/v1beta1
19+
kind: OpenStackControlPlane
20+
metadata:
21+
name: unused
22+
spec:
23+
# Set overall storage class so we don't need to increase the
24+
# number of PVCs that install_yamls creates
25+
# this is only applicable to crc-based jobs, it is not in
26+
# openshift by default, but is included in the crc distribution
27+
storageClass: crc-csi-hostpath-provisioner
28+
telemetry:
29+
enabled: true
30+
template:
31+
logging:
32+
enabled: false
33+
autoscaling:
34+
enabled: false
35+
cloudkitty:
36+
enabled: true
37+
s3StorageConfig:
38+
secret:
39+
type: "s3"
40+
name: "cloudkitty-loki-s3"
41+
metricStorage:
42+
enabled: true
43+
target:
44+
kind: OpenStackControlPlane

ci/vars-cloudkitty-tempest.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
---
2+
cifmw_deploy_obs: true
3+
cifmw_openshift_obs_definition:
4+
apiVersion: operators.coreos.com/v1alpha1
5+
kind: Subscription
6+
metadata:
7+
name: observability-operator
8+
namespace: openshift-operators
9+
spec:
10+
channel: stable
11+
installPlanApproval: Automatic
12+
name: cluster-observability-operator
13+
source: redhat-operators
14+
sourceNamespace: openshift-marketplace
15+
16+
pre_deploy_kustomize_cloudkitty:
17+
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/configure-cloudkitty.yml"
18+
type: playbook
19+
20+
# test cloudkitty
221
cifmw_run_tests: true
322
cifmw_run_test_role: test_operator
23+
# TODO: Consider switching to podified-master-centos10 for features that patch master
424
cifmw_test_operator_tempest_namespace: podified-antelope-centos9
525
# cloudkitty tempest plugin is not part of the tempest rpm.
626
# https://review.rdoproject.org/cgit/openstack/tempest-distgit/tree/openstack-tempest.spec
@@ -11,6 +31,7 @@ cifmw_test_operator_tempest_container: openstack-tempest-all
1131
cifmw_test_operator_tempest_image_tag: 'current-podified'
1232
# This value is used to populate the `tempestconfRun` parameter of the Tempest CR: https://openstack-k8s-operators.github.io/test-operator/crds.html#tempest-custom-resource
1333
# https://github.com/openstack-k8s-operators/ci-framework/blob/main/roles/test_operator/defaults/main.yml
34+
# TODO: Refine this tempest config
1435
tempest_conf:
1536
overrides: |
1637
validation.run_validation true
@@ -29,10 +50,9 @@ cifmw_test_operator_tempest_include_list: |
2950
^tempest.*\[.*\bsmoke\b.*\]
3051
cloudkitty_tempest_plugin.*
3152
telemetry_tempest_plugin.*
32-
cifmw_test_operator_tempest_exclude_list: |
33-
telemetry_tempest_plugin.scenario.test_telemetry_integration_prometheus.PrometheusGabbiTest.test_autoscaling
34-
53+
# TODO: update this to allow multiple external plugins to be listed with Depends-On.
54+
# Potentially, this can be done via the meta content provider, by adding the tempest images to the list.
3555
external_plugin: "opendev.org/openstack/cloudkitty-tempest-plugin"
3656
change_item: "{{ zuul['items'] | selectattr('project.canonical_name', 'equalto', external_plugin) }}"
37-
# This is a workaround because CK tempest is not packages in RDO. Typically, the default would be [], since we would not require an external installation.
57+
# WORKAROUND: CloudKitty tempest is not packaged in RDO. Typically, the default would be [], since we would not require an external installation.
3858
cifmw_test_operator_tempest_external_plugin: "{{ [ {'repository': 'https://' + external_plugin + '.git'} ] if change_item | length < 1 else [ { 'repository': 'https://' + external_plugin + '.git', 'changeRepository': 'https://review' + external_plugin, 'changeRefspec': [ 'refs/changes', change_item[0].change[-2:], change_item[0].change, change_item[0].patchset ] | join('/') } ] }}"

0 commit comments

Comments
 (0)