This message was deleted.
# fleet
a
This message was deleted.
s
Is there anyone from Rancher of SuSe who participates in this channel?
q
Yes 🙂 ... just coming back from Christmas break. That can be done in many ways, I'll try to share with you some examples tomorrow.
s
Thank you @quick-sandwich-76600. For the moment I decided to use the logs from the fleet agent pod to try and determine if it appears to be getting a bundle with the cluster group in the name, but that seems hacky at best. I also wrote some code to connect to the remote Rancher server, but it wasn't 100% clear how to easily ensure the membership there either.
👍 1
q
Because of the temporary Slack outage I wasn't able to post this before so here we go ... You can find an example Python script here https://gist.github.com/juanbrny/5ec4c68bfef677985e4f3caa831b95c9 and a Bash version here: https://gist.github.com/juanbrny/134afd1e93947f2dbb53ae71eeac9999 (Just to contextualize this, the membership of a cluster to an specific cluster group in fleet is dynamic, that means that theres no place where that info is stored) The script does dynamic membership calculation using the rules defined in the cluster group and shows all the members of the group provided as param. With this you can play to add your own logic and check if a cluster is member of the provided cluster group. All that should also be posible applying the same logic but querying the objects through the REST API. Hope it helps ...