Skip to content

Commit 0fee586

Browse files
committed
Add kuttl jobs configuration for Prometheus integration
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.
1 parent 46bc3ce commit 0fee586

File tree

8 files changed

+59
-2
lines changed

8 files changed

+59
-2
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ watcher: export CATALOG_IMG=${CATALOG_IMAGE}
381381
watcher: ## Install watcher operator via olm
382382
bash ci/olm.sh
383383
oc apply -f ci/olm.yaml
384+
oc wait --timeout=300s --for jsonpath="{.status.phase}"=Succeeded csv --namespace=openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators
384385
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"
385386

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

409410
.PHONY: kuttl-test-run
410411
kuttl-test-run:

ci/olm.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
cat > ci/olm.yaml <<EOF_CAT
22
---
3+
apiVersion: operators.coreos.com/v1alpha1
4+
kind: Subscription
5+
metadata:
6+
name: cluster-observability-operator
7+
namespace: openshift-operators
8+
spec:
9+
channel: development
10+
installPlanApproval: Automatic
11+
name: cluster-observability-operator
12+
source: redhat-operators
13+
sourceNamespace: openshift-marketplace
14+
---
315
apiVersion: v1
416
kind: Namespace
517
metadata:

config/samples/watcher_v1beta1_watcher.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ metadata:
1010
name: watcher
1111
spec:
1212
databaseInstance: "openstack"
13+
tls:
14+
caBundleSecretName: "combined-ca-bundle"

tests/kuttl/test-suites/default/common/deploy-with-defaults.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ metadata:
55
namespace: watcher-kuttl-default
66
spec:
77
databaseInstance: "openstack"
8+
tls:
9+
caBundleSecretName: "combined-ca-bundle"

tests/kuttl/test-suites/default/deps/infra.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ spec:
3131
cinder:
3232
enabled: false
3333
telemetry:
34-
enabled: false
34+
enabled: true

tests/kuttl/test-suites/default/deps/kustomization.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ namespace: watcher-kuttl-default
55
secretGenerator:
66
- literals:
77
- AdminPassword=password
8+
- AodhPassword=password
9+
- CeilometerPassword=password
810
- DbRootPassword=password
911
- DatabasePassword=password
1012
- WatcherPassword=password
@@ -40,3 +42,4 @@ patches:
4042
secret: osp-secret
4143
- path: infra.yaml
4244
- path: keystone.yaml
45+
- path: telemetry.yaml
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
apiVersion: core.openstack.org/v1beta1
2+
kind: OpenStackControlPlane
3+
metadata:
4+
name: openstack
5+
spec:
6+
telemetry:
7+
template:
8+
metricStorage:
9+
enabled: true
10+
dashboardsEnabled: true
11+
monitoringStack:
12+
alertingEnabled: true
13+
scrapeInterval: 30s
14+
storage:
15+
strategy: persistent
16+
retention: 24h
17+
persistent:
18+
pvcStorageRequest: 1G
19+
autoscaling:
20+
enabled: false
21+
aodh:
22+
passwordSelectors:
23+
databaseAccount: aodh
24+
databaseInstance: openstack
25+
secret: osp-secret
26+
heatInstance: heat
27+
ceilometer:
28+
enabled: true
29+
secret: osp-secret
30+
passwordSelector:
31+
aodhService: AodhPassword
32+
ceilometerService: CeilometerPassword
33+
serviceUser: ceilometer
34+
logging:
35+
enabled: false

tests/kuttl/test-suites/default/watcher/04-deploy-with-precreated-account.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ metadata:
66
spec:
77
databaseInstance: "openstack"
88
databaseAccount: watcher-precreated
9+
tls:
10+
caBundleSecretName: "combined-ca-bundle"
911
apiServiceTemplate:
1012
replicas: 2

0 commit comments

Comments
 (0)