Skip to content

Commit

Permalink
Exclude watcher-operator-index- image in env_op_images role
Browse files Browse the repository at this point in the history
watcher-operator is going to shipped as a standalone operator.
It is going to be installed via olm seperatly from index image in openstack-operators
namespace.

when env_ops_images creates operator_images dictionary, it goes over all
the pods listed under openstack-operators namespace with label openstack.org/operator-name
which does not exists for watcher-operator-index- pod. It fails with
following error[1]:
```
The task includes an option with an undefined variable.
The error was: 'dict object' has no attribute 'openstack.org/operator-name'. 'dict object' has no attribute 'openstack.org/operator-name'
```

This pr excluded the watcher-operator-index- pod to fix the issue.

Links:
[1]. openstack-k8s-operators/watcher-operator#9 (comment)

Signed-off-by: Chandan Kumar <[email protected]>
  • Loading branch information
raukadah authored and openshift-merge-bot[bot] committed Nov 26, 2024
1 parent ac382fa commit d3f25e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion roles/env_op_images/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@
RABBITMQ_OP_IMG: "{{ selected_pod.status.containerStatuses[0].imageID }}"
selected_pods: "{{ pod_list.resources |
rejectattr('metadata.generateName', 'contains', 'openstack-operator-index-') |
rejectattr('metadata.generateName', 'contains', 'rabbitmq-cluster-operator-')
rejectattr('metadata.generateName', 'contains', 'rabbitmq-cluster-operator-') |
rejectattr('metadata.generateName', 'contains', 'watcher-operator-index-')
}}"

- name: Add operator images to the dictionary
Expand Down

0 comments on commit d3f25e8

Please sign in to comment.