Skip to content
Merged
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: 16 additions & 1 deletion tests/13-event-subscriptions/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
spec:
concurrent: false
bindings:
- name: serverName
value: (join('-', ['compatibility', $namespace, 'system-0']))
- name: operatorNamespace
value: metal-maintenance-operator-system
- name: operatorDeployment
Expand Down Expand Up @@ -44,10 +46,23 @@ spec:
name: (join('-', ['compatibility', $namespace]))
status:
state: Enabled
# The subscription controller matches the vendor against the Server's
# manufacturer (Systems endpoint), not the BMC's (Manager endpoint).
# See https://github.com/ironcore-dev/metal-maintenance-operator/blob/17a374da64c6fc9f4a4194044c75e753683cb504/internal/telemetry/subscriptions/reconciler.go#L545
- name: assert-server-manufacturer
try:
- assert:
resource:
apiVersion: metal.ironcore.dev/v1alpha1
kind: Server
metadata:
name: ($serverName)
status:
(manufacturer != null): true
- name: subscribe
bindings:
- name: vendor
value: (x_k8s_get($client, 'metal.ironcore.dev/v1alpha1', 'BMC', '', join('-', ['compatibility', $namespace])).status.manufacturer)
value: (x_k8s_get($client, 'metal.ironcore.dev/v1alpha1', 'Server', '', $serverName).status.manufacturer)
- name: model
value: (x_k8s_get($client, 'metal.ironcore.dev/v1alpha1', 'BMC', '', join('-', ['compatibility', $namespace])).status.model)
try:
Expand Down
Loading