Skip to content

Commit

Permalink
Add kuttl jobs configuration for Prometheus integration
Browse files Browse the repository at this point in the history
This patch is adjusting kuttl jobs for Prometheus integration. This
includes telemetry deployment in the deps  part and minor fixes in the
spec to make sure the watcher deployment deployes the used CA bundle
created in the controlplane.

This patch also adds Cluster Observability Operator installation to the
`make watcher` make target so that we are sure it is installed when
installing watcher operator in CI jobs or development workflow.
  • Loading branch information
amoralej committed Jan 21, 2025
1 parent b24ba16 commit f5df532
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ watcher: export CATALOG_IMG=${CATALOG_IMAGE}
watcher: ## Install watcher operator via olm
bash ci/olm.sh
oc apply -f ci/olm.yaml
timeout 300s bash -c "while ! (oc get csv -n openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators -o jsonpath='{.items[*].status.phase}' | grep Succeeded); do sleep 10; done"
timeout 300s bash -c "while ! (oc get csv -n openstack-operators -l operators.coreos.com/watcher-operator.openstack-operators -o jsonpath='{.items[*].status.phase}' | grep Succeeded); do sleep 1; done"

.PHONY: watcher_deploy
Expand All @@ -404,7 +405,7 @@ KUTTL_SUITE_DIR ?= tests/kuttl/test-suites/$(KUTTL_SUITE)
.PHONY: kuttl-test-prep
kuttl-test-prep:
oc apply -k $(KUTTL_SUITE_DIR)/deps/ --timeout=120s
oc wait -n $(KUTTL_NAMESPACE) openstackcontrolplane openstack --for condition=Ready --timeout=300s
oc wait -n $(KUTTL_NAMESPACE) openstackcontrolplane openstack --for condition=Ready --timeout=500s

.PHONY: kuttl-test-run
kuttl-test-run:
Expand Down
12 changes: 12 additions & 0 deletions ci/olm.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
cat > ci/olm.yaml <<EOF_CAT
---
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
---
apiVersion: v1
kind: Namespace
metadata:
Expand Down
2 changes: 2 additions & 0 deletions config/samples/watcher_v1beta1_watcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ metadata:
name: watcher
spec:
databaseInstance: "openstack"
tls:
caBundleSecretName: "combined-ca-bundle"
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ metadata:
namespace: watcher-kuttl-default
spec:
databaseInstance: "openstack"
tls:
caBundleSecretName: "combined-ca-bundle"
2 changes: 1 addition & 1 deletion tests/kuttl/test-suites/default/deps/infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ spec:
cinder:
enabled: false
telemetry:
enabled: false
enabled: true
3 changes: 3 additions & 0 deletions tests/kuttl/test-suites/default/deps/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ namespace: watcher-kuttl-default
secretGenerator:
- literals:
- AdminPassword=password
- AodhPassword=password
- CeilometerPassword=password
- DbRootPassword=password
- DatabasePassword=password
- WatcherPassword=password
Expand Down Expand Up @@ -40,3 +42,4 @@ patches:
secret: osp-secret
- path: infra.yaml
- path: keystone.yaml
- path: telemetry.yaml
35 changes: 35 additions & 0 deletions tests/kuttl/test-suites/default/deps/telemetry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: core.openstack.org/v1beta1
kind: OpenStackControlPlane
metadata:
name: openstack
spec:
telemetry:
template:
metricStorage:
enabled: true
dashboardsEnabled: true
monitoringStack:
alertingEnabled: true
scrapeInterval: 30s
storage:
strategy: persistent
retention: 24h
persistent:
pvcStorageRequest: 1G
autoscaling:
enabled: false
aodh:
passwordSelectors:
databaseAccount: aodh
databaseInstance: openstack
secret: osp-secret
heatInstance: heat
ceilometer:
enabled: true
secret: osp-secret
passwordSelector:
aodhService: AodhPassword
ceilometerService: CeilometerPassword
serviceUser: ceilometer
logging:
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ metadata:
spec:
databaseInstance: "openstack"
databaseAccount: watcher-precreated
tls:
caBundleSecretName: "combined-ca-bundle"
apiServiceTemplate:
replicas: 2

0 comments on commit f5df532

Please sign in to comment.