Skip to content

Commit

Permalink
Merge pull request #301 from elfiesmelfie/efoley-zuul_autoscaling
Browse files Browse the repository at this point in the history
[zuul] Add autoscaling job
  • Loading branch information
openshift-merge-bot[bot] authored Feb 20, 2024
2 parents cce4d37 + 45c7723 commit 03b108b
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
40 changes: 40 additions & 0 deletions ci/create-coo-subscription.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
- 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: Create the COO subscription
ansible.builtin.shell:
cmd: |
oc create -f - <<EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: cluster-observability-operator
namespace: openshift-operators
spec:
channel: development
installPlanApproval: Automatic
name: cluster-observability-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
EOF
register: output

# need to have a wait here, since the csv is not created immediately. There is a slight delay, during which time, the oc wait command would fail, since there's no resource to watch
- name: Wait for the required resource to be created
ansible.builtin.command:
cmd:
oc get csv --namespace=openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators
delay: 2
retries: 10
register: output
until: output.stdout_lines | length != 0

- name: Wait for the resources to be available
ansible.builtin.command:
cmd: |
oc wait --for jsonpath="{.status.phase}"=Succeeded csv --namespace=openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators
42 changes: 42 additions & 0 deletions zuul.d/projects.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
---
- job:
name: telemetry-operator-multinode-autoscaling
parent: podified-multinode-edpm-deployment-crc
dependencies: ["openstack-k8s-operators-content-provider"]
description: |
Deploy OpenStack with Autoscaling features enabled
vars:
cifmw_edpm_prepare_timeout: 60
pre_deploy:
- name: Create COO subscription
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/create-coo-subscription.yaml"
type: playbook
cifmw_install_yamls_vars:
BMO_SETUP: false
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
monitoringStack:
alertingEnabled: false
autoscaling:
enabled: true
target:
kind: OpenStackControlPlane
- project:
name: openstack-k8s-operators/telemetry-operator
templates:
- podified-multinode-edpm-pipeline
github-check:
jobs:
- telemetry-operator-multinode-autoscaling

0 comments on commit 03b108b

Please sign in to comment.