Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@
This job deploy a basic "Compute Starter Kit" topology
https://www.openstack.org/software/sample-configs#compute-starter-kit
that is the minium set of openstack services required to boot a vm.
post-run:
- ci/nova-operator-base/playbooks/collect-logs.yaml
vars:
collection_namespace_override: "nova-kuttl-default"
operator_name: nova-operator
nova_repo: "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/nova-operator"
zuul_log_collection: true
post-run:
- ci/nova-operator-base/playbooks/collect-logs.yaml
nova_hook: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/nova-operator'].src_dir }}/ci/nova-operator-kuttl/deploy_webhooks.yaml"
pre_kuttl_from_operator:
- name: 70 Create nova webhooks
type: playbook
source: "{{ nova_hook }}"
extra_vars:
nova_catalog_image: "{{ content_provider_registry_ip }}:5001/openstack-k8s-operators/nova-operator-index:{{ zuul.patchset }}"
extra-vars:
crc_ci_bootstrap_networking:
networks:
Expand Down Expand Up @@ -179,11 +187,12 @@
name: openstack-k8s-operators/nova-operator
default-branch: main
github-check:
debug: true
jobs:
- openstack-meta-content-provider
- nova-operator-kuttl
- nova-operator-tempest-multinode
- nova-operator-tempest-multinode-ceph
# - nova-operator-tempest-multinode
# - nova-operator-tempest-multinode-ceph

- pragma:
implied-branch-matchers: True
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ DEFAULT_IMG ?= quay.io/openstack-k8s-operators/nova-operator:latest
IMG ?= $(DEFAULT_IMG)
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.29
CATALOG_IMAGE ?= quay.io/openstack-k8s-operators/nova-operator-index:latest

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -428,3 +429,11 @@ PHONY: crd-schema-check
crd-schema-check: manifests
INSTALL_DIR=$(LOCALBIN) CRD_SCHEMA_CHECKER_VERSION=$(CRD_SCHEMA_CHECKER_VERSION) hack/build-crd-schema-checker.sh
INSTALL_DIR=$(LOCALBIN) BASE_REF="$${PULL_BASE_SHA:-$(BRANCH)}" hack/crd-schema-checker.sh


.PHONY: run_with_olm
run_with_olm: export CATALOG_IMG=${CATALOG_IMAGE}
run_with_olm: ## Install nova operator via olm
bash ci/olm.sh
oc apply -f ci/olm.yaml
timeout 300s bash -c "while ! (oc get csv -n openstack-operators -l operators.coreos.com/nova-operator.openstack-operators -o jsonpath='{.items[*].status.phase}' | grep Succeeded); do sleep 1; done"
17 changes: 17 additions & 0 deletions ci/nova-operator-kuttl/deploy_webhooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- name: Create custom service
hosts: "{{ cifmw_target_hook_host | default('localhost') }}"
environment:
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
PATH: "{{ cifmw_path }}"
gather_facts: false
tasks:
- name: Scale down deployment
ansible.builtin.shell: |
oc patch csv -n openstack-operators openstack-operator.v0.0.1 --type json -p="[{"op": "replace", "path": "/spec/install/spec/deployments/0/spec/replicas", "value": "0"}]"
- name: Install Nova Operator
cifmw.general.ci_script:
output_dir: "{{ cifmw_basedir }}/artifacts"
chdir: "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/nova-operator"
script: make run_with_olm
extra_args:
CATALOG_IMAGE: "{{ nova_catalog_image }}"
36 changes: 36 additions & 0 deletions ci/olm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
cat > ci/olm.yaml <<EOF_CAT
---
apiVersion: v1
kind: Namespace
metadata:
name: openstack-operators
labels:
pod-security.kubernetes.io/enforce: privileged
security.openshift.io/scc.podSecurityLabelSync: "false"
---
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: nova-operator-index
namespace: openstack-operators
spec:
image: ${CATALOG_IMG}
sourceType: grpc
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: openstack
namespace: openstack-operators
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: nova-operator
namespace: openstack-operators
spec:
name: nova-operator
channel: alpha
source: nova-operator-index
sourceNamespace: openstack-operators
EOF_CAT
23 changes: 7 additions & 16 deletions test/kuttl/test-suites/default/cell-tests/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,10 @@ metadata:
name: nova-kuttl-api-0
status:
containerStatuses:
- image: quay.io/podified-antelope-centos9/openstack-nova-api:current-podified
name: nova-kuttl-api-api
- name: nova-kuttl-api-api
ready: true
started: true
- image: quay.io/podified-antelope-centos9/openstack-nova-api:current-podified
name: nova-kuttl-api-log
- name: nova-kuttl-api-log
ready: true
started: true
---
Expand All @@ -161,8 +159,7 @@ metadata:
name: nova-kuttl-scheduler
status:
containerStatuses:
- image: quay.io/podified-antelope-centos9/openstack-nova-scheduler:current-podified
name: nova-kuttl-scheduler-scheduler
- name: nova-kuttl-scheduler-scheduler
ready: true
started: true
---
Expand All @@ -183,12 +180,10 @@ metadata:
name: nova-kuttl-metadata
status:
containerStatuses:
- image: quay.io/podified-antelope-centos9/openstack-nova-api:current-podified
name: nova-kuttl-metadata-log
- name: nova-kuttl-metadata-log
ready: true
started: true
- image: quay.io/podified-antelope-centos9/openstack-nova-api:current-podified
name: nova-kuttl-metadata-metadata
- name: nova-kuttl-metadata-metadata
ready: true
started: true
---
Expand All @@ -210,8 +205,7 @@ metadata:
name: nova-kuttl-cell0-conductor
status:
containerStatuses:
- image: quay.io/podified-antelope-centos9/openstack-nova-conductor:current-podified
name: nova-kuttl-cell0-conductor-conductor
- name: nova-kuttl-cell0-conductor-conductor
ready: true
started: true
---
Expand All @@ -232,8 +226,7 @@ metadata:
name: nova-kuttl-cell1-conductor
status:
containerStatuses:
- image: quay.io/podified-antelope-centos9/openstack-nova-conductor:current-podified
name: nova-kuttl-cell1-conductor-conductor
- name: nova-kuttl-cell1-conductor-conductor
ready: true
started: true
---
Expand Down Expand Up @@ -537,7 +530,6 @@ spec:
value: COPY_ALWAYS
- name: PURGE_AGE
value: "90"
image: quay.io/podified-antelope-centos9/openstack-nova-conductor:current-podified
name: nova-manage
securityContext:
runAsUser: 42436
Expand Down Expand Up @@ -595,7 +587,6 @@ spec:
value: COPY_ALWAYS
- name: PURGE_AGE
value: "90"
image: quay.io/podified-antelope-centos9/openstack-nova-conductor:current-podified
name: nova-manage
securityContext:
runAsUser: 42436
Expand Down
23 changes: 7 additions & 16 deletions test/kuttl/test-suites/default/scale-tests/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,10 @@ metadata:
name: nova-kuttl-api-0
status:
containerStatuses:
- image: quay.io/podified-antelope-centos9/openstack-nova-api:current-podified
name: nova-kuttl-api-api
- name: nova-kuttl-api-api
ready: true
started: true
- image: quay.io/podified-antelope-centos9/openstack-nova-api:current-podified
name: nova-kuttl-api-log
- name: nova-kuttl-api-log
ready: true
started: true
---
Expand All @@ -161,8 +159,7 @@ metadata:
name: nova-kuttl-scheduler
status:
containerStatuses:
- image: quay.io/podified-antelope-centos9/openstack-nova-scheduler:current-podified
name: nova-kuttl-scheduler-scheduler
- name: nova-kuttl-scheduler-scheduler
ready: true
started: true
---
Expand All @@ -183,12 +180,10 @@ metadata:
name: nova-kuttl-metadata
status:
containerStatuses:
- image: quay.io/podified-antelope-centos9/openstack-nova-api:current-podified
name: nova-kuttl-metadata-log
- name: nova-kuttl-metadata-log
ready: true
started: true
- image: quay.io/podified-antelope-centos9/openstack-nova-api:current-podified
name: nova-kuttl-metadata-metadata
- name: nova-kuttl-metadata-metadata
ready: true
started: true
---
Expand All @@ -210,8 +205,7 @@ metadata:
name: nova-kuttl-cell0-conductor
status:
containerStatuses:
- image: quay.io/podified-antelope-centos9/openstack-nova-conductor:current-podified
name: nova-kuttl-cell0-conductor-conductor
- name: nova-kuttl-cell0-conductor-conductor
ready: true
started: true
---
Expand All @@ -232,8 +226,7 @@ metadata:
name: nova-kuttl-cell1-conductor
status:
containerStatuses:
- image: quay.io/podified-antelope-centos9/openstack-nova-conductor:current-podified
name: nova-kuttl-cell1-conductor-conductor
- name: nova-kuttl-cell1-conductor-conductor
ready: true
started: true
---
Expand Down Expand Up @@ -537,7 +530,6 @@ spec:
value: COPY_ALWAYS
- name: PURGE_AGE
value: "90"
image: quay.io/podified-antelope-centos9/openstack-nova-conductor:current-podified
name: nova-manage
securityContext:
runAsUser: 42436
Expand Down Expand Up @@ -595,7 +587,6 @@ spec:
value: COPY_ALWAYS
- name: PURGE_AGE
value: "90"
image: quay.io/podified-antelope-centos9/openstack-nova-conductor:current-podified
name: nova-manage
securityContext:
runAsUser: 42436
Expand Down
Loading