Skip to content

Commit bd73909

Browse files
committed
redfish_virtual_bmc: Add nova-console-poller
Adds nova-console-poller containers to monitor console output for each instance. Deployment creates one container per UUID from `instances_uuids`, reusing the `os-client-config` secret for OpenStack credentials. Assisted-By: Claude Code/claude-4.5-sonnet Signed-off-by: Harald Jensås <hjensas@redhat.com>
1 parent b9c99f3 commit bd73909

3 files changed

Lines changed: 64 additions & 0 deletions

File tree

roles/redfish_virtual_bmc/tasks/main.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,17 @@
6969
] | ansible.builtin.path_join
7070
}}
7171
72+
- name: Template the Console Poller Deployment
73+
ansible.builtin.template:
74+
src: console_poller_deployment.yaml.j2
75+
dest: >-
76+
{{
77+
[
78+
_tempdir.path,
79+
'console_poller_deployment.yaml'
80+
] | ansible.builtin.path_join
81+
}}
82+
7283
- name: Load automation vars
7384
ansible.builtin.include_vars:
7485
file: automation-vars.yml
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: nova-console-poller
6+
namespace: sushy-emulator
7+
spec:
8+
replicas: 1
9+
selector:
10+
matchLabels:
11+
app: nova-console-poller
12+
triggers:
13+
- type: "ConfigChange"
14+
strategy:
15+
type: Recreate
16+
paused: false
17+
revisionHistoryLimit: 2
18+
minReadySeconds: 0
19+
template:
20+
metadata:
21+
annotations: {}
22+
labels:
23+
app: nova-console-poller
24+
name: nova-console-poller
25+
spec:
26+
volumes:
27+
- name: os-client-config
28+
secret:
29+
secretName: os-client-config
30+
defaultMode: 0644 # u=rw,g=r,o=r
31+
items:
32+
- key: openstack-clouds-yaml
33+
path: clouds.yaml
34+
- key: certificate-pem
35+
path: cacert.pem
36+
containers:
37+
{% for instance_uuid in instances_uuids %}
38+
- name: console-poller-{{ instance_uuid }}
39+
image: quay.io/rhn_gps_hjensas/nova-console-poller:latest
40+
env:
41+
- name: OS_CLOUD
42+
value: "{{ sushy_emulator_os_cloud }}"
43+
- name: INSTANCE_UUID
44+
value: "{{ instance_uuid }}"
45+
volumeMounts:
46+
- name: os-client-config
47+
mountPath: /etc/openstack/
48+
{% endfor %}

roles/redfish_virtual_bmc/vars/automation-vars.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ stages:
2323
wait_conditions:
2424
- "oc wait -n sushy-emulator pod -l app=sushy-emulator --for condition=Ready --timeout=300s"
2525

26+
- name: "Nova Console Poller : Deployment"
27+
manifest: console_poller_deployment.yaml
28+
wait_conditions:
29+
- "oc wait -n sushy-emulator pod -l app=nova-console-poller --for condition=Ready --timeout=300s"
30+
2631
- name: "Sushy Emulator : Service"
2732
manifest: service.yaml
2833
wait_conditions:

0 commit comments

Comments
 (0)