Skip to content

Commit b33c898

Browse files
committed
Create a NAD in the Kuttl namespace
The ctlplane NAD exists in the openstack namespace https://github.com/openstack-k8s-operators/install_yamls/blob/ba562f76c944c4bc92f7a4efe092e7ec30aebce4/scripts/gen-netatt.sh#L71 and this might be the reason the required NAD is not being picked up during the metricstorage creation Try precreating the NAD. Maybe some other resources are needed, will follow up if that is the case. Also, get back to updating the existing metricstorage so we can test that updating the metricstorage when TLS is enabled doesn't fall in a reconciliation loop.
1 parent 8825fbf commit b33c898

File tree

2 files changed

+26
-16
lines changed

2 files changed

+26
-16
lines changed

tests/kuttl/suites/tls/tests/03-assert.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
apiVersion: v1
22
kind: Pod
33
metadata:
4-
name: prometheus-telemetry-kuttl-metricstorage-with-nad-0
4+
name: prometheus-telemetry-kuttl-metricstorage-0
55
ownerReferences:
66
- kind: StatefulSet
7-
name: prometheus-telemetry-kuttl-metricstorage-with-nad
7+
name: prometheus-telemetry-kuttl-metricstorage
88
annotations:
99
k8s.v1.cni.cncf.io/networks: '[{"name":"ctlplane","namespace":"openstack","interface":"ctlplane"}]'
1010
spec:
@@ -18,12 +18,12 @@ spec:
1818
name: tls-assets
1919
readOnly: true
2020
- mountPath: /prometheus
21-
name: prometheus-telemetry-kuttl-metricstorage-with-nad-db
21+
name: prometheus-telemetry-kuttl-metricstorage-db
2222
- mountPath: /etc/prometheus/secrets/combined-ca-bundle
2323
name: secret-combined-ca-bundle
2424
readOnly: true
25-
- mountPath: /etc/prometheus/rules/prometheus-telemetry-kuttl-metricstorage-with-nad-rulefiles-0
26-
name: prometheus-telemetry-kuttl-metricstorage-with-nad-rulefiles-0
25+
- mountPath: /etc/prometheus/rules/prometheus-telemetry-kuttl-metricstorage-rulefiles-0
26+
name: prometheus-telemetry-kuttl-metricstorage-rulefiles-0
2727
- mountPath: /etc/prometheus/web_config/web-config.yaml
2828
name: web-config
2929
readOnly: true

tests/kuttl/suites/tls/tests/03-configure-nad-metricstorage.yaml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1-
# Kuttl test doesn't seem to wait correctly for the metric
2-
# storage to reconcile when enabling the NAD
3-
# Deleting it here and than recreating it in the next step
4-
# should ensure kuttl waits long enough.
5-
apiVersion: kuttl.dev/v1beta1
6-
kind: TestStep
7-
delete:
8-
- apiVersion: telemetry.openstack.org/v1beta1
9-
kind: MetricStorage
10-
name: telemetry-kuttl-metricstorage
1+
apiVersion: k8s.cni.cncf.io/v1
2+
kind: NetworkAttachmentDefinition
3+
metadata:
4+
labels:
5+
osp/net: ctlplane
6+
name: ctlplane
7+
spec:
8+
config: |
9+
{
10+
"cniVersion": "0.3.1",
11+
"name": "ctlplane",
12+
"type": "macvlan",
13+
"master": "enp7s0",
14+
"ipam": {
15+
"type": "whereabouts",
16+
"range": "172.20.250.0/24",
17+
"range_start": "172.20.250.30",
18+
"range_end": "172.20.250.70"
19+
}
20+
}
1121
---
1222
apiVersion: telemetry.openstack.org/v1beta1
1323
kind: MetricStorage
1424
metadata:
15-
name: telemetry-kuttl-metricstorage-with-nad
25+
name: telemetry-kuttl-metricstorage
1626
spec:
1727
monitoringStack:
1828
alertingEnabled: true

0 commit comments

Comments
 (0)