This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import subprocess | |
import sys | |
# fleet clustergroup membership is dynamic based on the rules in the clustergroup definition | |
# Those rules are either a matchExpressions selector, a matchLabels selector or a combination of both. | |
# This script gets the clustergroup name as parameter and get's the rule definition in json format. | |
# Those rules are then formated to be used in kubectl command that finds all the fleet clustergroup | |
# members that match those rules and show the in the standard out put. |
OlderNewer