INNER CODE UNIT · Python

GetClusterName

DataDog/KubeHound · scripts/dashboard-demo/main.py:242

def GetClusterName():
    KH_QUERY_NODE_CLUSTER="kh.nodes().values('cluster').dedup()"
    res = c.submit(KH_QUERY_NODE_CLUSTER).all().result()
    return res[0]

ACCENT = "teal"
# Number of attacks to print out in the attack distribution graph
# max value is 23 as the palette has only 23 colors (https://docs.bokeh.org/en/latest/docs/reference/palettes.html#accessible-palettes)
TOP_ATTACKS = 15

styles = {
    "box-shadow": "rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px",
    "border-radius": "4px",
    "padding": "10px",
}

c = Client(f"ws://{GREMLIN_SOCKET}/gremlin", "kh")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…