update(app): add helm chart and cleanup repo
Some checks failed
CI Pipeline / Build and Push Docker Image (push) Failing after 2m48s

This commit is contained in:
Aleksandr Tcitlionok
2024-12-11 09:05:15 +00:00
parent c12ce697c0
commit acef6cb9a1
19 changed files with 274 additions and 777 deletions

View File

@@ -1,292 +1,32 @@
[
{
"name": "akita",
"name": "chuo",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"vendor": "The Company",
"cpu": 24,
"memory": "32GB",
"memory": "64GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
"time_on_duty": 522,
"initial_cost": 1900
},
{
"name": "chiba",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"cpu": 24,
"memory": "32GB",
"name": "kyoto",
"location": "Kyoto",
"vendor": "The Company",
"cpu": 36,
"memory": "96GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
"time_on_duty": 807,
"initial_cost": 1889
},
{
"name": "ehime",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"cpu": 24,
"memory": "32GB",
"name": "sa-100",
"location": "Sapporo",
"vendor": "The Company",
"cpu": 8,
"memory": "16GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "fukuoka",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"cpu": 24,
"memory": "32GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "kanagawa",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"cpu": 24,
"memory": "32GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "kumamoto",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"cpu": 24,
"memory": "32GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "okayama",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"cpu": 24,
"memory": "32GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "okinawa",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"cpu": 24,
"memory": "32GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "osaka",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"cpu": 24,
"memory": "32GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "saitama",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"cpu": 24,
"memory": "32GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "osaka",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"cpu": 24,
"memory": "32GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "saitama",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"cpu": 24,
"memory": "32GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "shizuoka",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"cpu": 24,
"memory": "32GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "yamagata",
"location": "Tokyo",
"vendor": "Minisforum MS-01",
"cpu": 24,
"memory": "32GB",
"storage": "1TB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "adatara",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "arashima",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "asahi",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "aso",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "azuma",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "daisen",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "horoshiri",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "nantai",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "kirishima",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "ontake",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "rausu",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "rishiri",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "shari",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "yotei",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
},
{
"name": "zao",
"location": "Tokyo",
"vendor": "OrangePi 5 ARM",
"cpu": 8,
"memory": "16GB",
"storage": "128GB",
"time_on_duty": 1000,
"initial_cost": 1000.0
"time_on_duty": 4401,
"initial_cost": 849
}
]
]

View File

@@ -22,461 +22,5 @@
"memory": "192GB",
"storage": "960GB SSD",
"vm_type": "cx-6xlarge"
},
{
"name": "cpx-41-1",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "240GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cpx-41-2",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "240GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cpx-41-3",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "240GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cpx-41-4",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "240GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cpx-41-5",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "240GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cpx-41-6",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "240GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cpx-41-7",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "240GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cpx-41-8",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "240GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cpx-41-9",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "240GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cpx-41-10",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "240GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cx-22-1",
"location": "Helsinki",
"cpu": 2,
"memory": "4GB",
"storage": "40GB SSD",
"vm_type": "cx-medium"
},
{
"name": "cx-22-2",
"location": "Helsinki",
"cpu": 2,
"memory": "4GB",
"storage": "40GB SSD",
"vm_type": "cx-medium"
},
{
"name": "cx-22-3",
"location": "Helsinki",
"cpu": 2,
"memory": "4GB",
"storage": "40GB SSD",
"vm_type": "cx-medium"
},
{
"name": "cx-22-4",
"location": "Helsinki",
"cpu": 2,
"memory": "4GB",
"storage": "40GB SSD",
"vm_type": "cx-medium"
},
{
"name": "cx-22-5",
"location": "Helsinki",
"cpu": 2,
"memory": "4GB",
"storage": "40GB SSD",
"vm_type": "cx-medium"
},
{
"name": "cx-22-6",
"location": "Helsinki",
"cpu": 2,
"memory": "4GB",
"storage": "40GB SSD",
"vm_type": "cx-medium"
},
{
"name": "cx-22-7",
"location": "Helsinki",
"cpu": 2,
"memory": "4GB",
"storage": "40GB SSD",
"vm_type": "cx-medium"
},
{
"name": "cx-22-8",
"location": "Helsinki",
"cpu": 2,
"memory": "4GB",
"storage": "40GB SSD",
"vm_type": "cx-medium"
},
{
"name": "cx-22-9",
"location": "Helsinki",
"cpu": 2,
"memory": "4GB",
"storage": "40GB SSD",
"vm_type": "cx-medium"
},
{
"name": "cx-22-10",
"location": "Helsinki",
"cpu": 2,
"memory": "4GB",
"storage": "40GB SSD",
"vm_type": "cx-medium"
},
{
"name": "cx-42-1",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-2",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-3",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-4",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-5",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-6",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-7",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-8",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-9",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-10",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-11",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB SSD",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-gawa-1",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-gawa-2",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-gawa-3",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-gawa-4",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-gawa-5",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-gawa-6",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-gawa-7",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-gawa-8",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-gawa-9",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-gawa-10",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-yama-1",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-yama-2",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-yama-3",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-yama-4",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-yama-5",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-yama-6",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-yama-7",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-yama-8",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-yama-9",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-42-yama-10",
"location": "Helsinki",
"cpu": 8,
"memory": "16GB",
"storage": "160GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-52-1",
"location": "Helsinki",
"cpu": 16,
"memory": "32GB",
"storage": "320GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-52-2",
"location": "Helsinki",
"cpu": 16,
"memory": "32GB",
"storage": "320GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-52-3",
"location": "Helsinki",
"cpu": 16,
"memory": "32GB",
"storage": "320GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-52-4",
"location": "Helsinki",
"cpu": 16,
"memory": "32GB",
"storage": "320GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-52-5",
"location": "Helsinki",
"cpu": 16,
"memory": "32GB",
"storage": "320GB",
"vm_type": "cx-xlarge"
},
{
"name": "cx-52-6",
"location": "Helsinki",
"cpu": 16,
"memory": "32GB",
"storage": "320GB",
"vm_type": "cx-xlarge"
}
]
}
]

View File

@@ -79,14 +79,6 @@ app.include_router(k8s.router)
app.include_router(export.router)
app.include_router(think.router)
#app.add_middleware(
# CORSMiddleware,
# allow_origins=["http://localhost:3000"],
# allow_credentials=True,
# allow_methods=["*"],
# allow_headers=["*"],
#)
@app.get("/")
def root():
return {"message": "Welcome to Metal Check API"}

View File

@@ -7,7 +7,6 @@ import json
router = APIRouter()
# Helper functions for conversions
def calculate_time_on_duty(creation_timestamp):
"""
Calculate the time on duty in hours, days, or minutes from the creation timestamp.
@@ -25,7 +24,6 @@ def calculate_time_on_duty(creation_timestamp):
hours = delta.seconds // 3600
return f"{hours} hours" if hours > 1 else "1 hour"
# Otherwise, return days
return f"{delta.days} days" if delta.days > 1 else "1 day"
def convert_memory_to_gb(memory):
@@ -58,21 +56,19 @@ def convert_cpu_to_cores(cpu):
Handles units: n (nano), u (micro), m (milli), or none (cores).
Returns float values for cores, rounded appropriately.
"""
if "n" in cpu: # Nanocores to cores
if "n" in cpu:
return round(int(cpu.replace("n", "")) / 1e9, 4)
elif "u" in cpu: # Microcores to cores
elif "u" in cpu:
return round(int(cpu.replace("u", "")) / 1e6, 4)
elif "m" in cpu: # Millicores to cores
elif "m" in cpu:
return round(int(cpu.replace("m", "")) / 1000, 4)
return float(cpu) # Already in cores
return float(cpu)
# Fetch Kubernetes data with namespace resource usage
def fetch_k8s_data_with_usage():
config.load_incluster_config()
v1 = client.CoreV1Api()
metrics_client = client.CustomObjectsApi()
# Fetch nodes
nodes = []
for node in v1.list_node().items:
# Extract storage (ephemeral-storage) and instance type
@@ -80,7 +76,6 @@ def fetch_k8s_data_with_usage():
instance_type = node.metadata.labels.get("beta.kubernetes.io/instance-type", "N/A")
creation_timestamp = node.metadata.creation_timestamp
# Calculate time on duty
time_on_duty = calculate_time_on_duty(creation_timestamp) if creation_timestamp else "N/A"
nodes.append({
@@ -93,10 +88,8 @@ def fetch_k8s_data_with_usage():
"time_on_duty": time_on_duty, # Add time on duty
})
# Fetch namespaces
namespaces = [ns.metadata.name for ns in v1.list_namespace().items]
# Fetch pod metrics and calculate namespace resource usage
namespace_usage = {}
pod_metrics = metrics_client.list_cluster_custom_object(
group="metrics.k8s.io", version="v1beta1", plural="pods"
@@ -110,22 +103,19 @@ def fetch_k8s_data_with_usage():
cpu_usage = container["usage"]["cpu"]
memory_usage = container["usage"]["memory"]
# Convert CPU to cores and memory to MiB
namespace_usage[pod_namespace]["cpu"] += convert_cpu_to_cores(cpu_usage)
namespace_usage[pod_namespace]["memory"] += convert_memory_to_mib(memory_usage)
# Round and format usage for readability
namespace_usage = {
ns: {
"cpu": round(usage["cpu"], 4), # Round to 4 decimal places
"memory": round(usage["memory"], 2), # Memory in MiB
"cpu": round(usage["cpu"], 4),
"memory": round(usage["memory"], 2),
}
for ns, usage in namespace_usage.items()
}
return {"nodes": nodes, "namespaces": namespaces, "namespace_usage": namespace_usage}
# Export endpoint
@router.get("/export")
def export_data(format: str = "yaml"):
data = {

View File

@@ -9,14 +9,12 @@ def fetch_k8s_data_with_usage():
v1 = client.CoreV1Api()
metrics_client = client.CustomObjectsApi()
# Fetch nodes
nodes = []
for node in v1.list_node().items:
# Extract storage (ephemeral-storage) and instance type
ephemeral_storage = node.status.capacity.get("ephemeral-storage", "0")
instance_type = node.metadata.labels.get("beta.kubernetes.io/instance-type", "N/A")
# Calculate time on duty
creation_timestamp = node.metadata.creation_timestamp
if creation_timestamp:
time_on_duty = calculate_time_on_duty(creation_timestamp)
@@ -26,17 +24,15 @@ def fetch_k8s_data_with_usage():
nodes.append({
"node_name": node.metadata.name,
"cpu": node.status.capacity.get("cpu"),
"memory": round(convert_memory_to_mib(node.status.capacity.get("memory")), 2), # Convert to MiB
"memory": round(convert_memory_to_mib(node.status.capacity.get("memory")), 2),
"storage": f"{round(convert_memory_to_gb(ephemeral_storage), 2)} GB",
"instance_type": instance_type,
"pods_allocatable": node.status.allocatable.get("pods"),
"time_on_duty": time_on_duty, # Add time on duty
"time_on_duty": time_on_duty,
})
# Fetch namespaces
namespaces = [ns.metadata.name for ns in v1.list_namespace().items]
# Fetch pod metrics and calculate namespace resource usage
namespace_usage = {}
pod_metrics = metrics_client.list_cluster_custom_object(
group="metrics.k8s.io", version="v1beta1", plural="pods"
@@ -50,15 +46,13 @@ def fetch_k8s_data_with_usage():
cpu_usage = container["usage"]["cpu"]
memory_usage = container["usage"]["memory"]
# Convert CPU to cores and memory to MiB
namespace_usage[pod_namespace]["cpu"] += convert_cpu_to_cores(cpu_usage)
namespace_usage[pod_namespace]["memory"] += convert_memory_to_mib(memory_usage)
# Round and format usage for readability
namespace_usage = {
ns: {
"cpu": round(usage["cpu"], 4), # Round to 4 decimal places
"memory": round(usage["memory"], 2), # Memory in MiB
"cpu": round(usage["cpu"], 4),
"memory": round(usage["memory"], 2),
}
for ns, usage in namespace_usage.items()
}
@@ -73,17 +67,14 @@ def calculate_time_on_duty(creation_timestamp):
now = datetime.now(timezone.utc)
delta = now - creation_timestamp
# If less than an hour, return minutes
if delta.days < 1 and delta.seconds < 3600:
minutes = delta.seconds // 60
return f"{minutes} minutes" if minutes > 1 else "less than a minute"
# If less than a day, return hours
if delta.days < 1:
hours = delta.seconds // 3600
return f"{hours} hours" if hours > 1 else "1 hour"
# Otherwise, return days
return f"{delta.days} days" if delta.days > 1 else "1 day"

View File

@@ -45,7 +45,6 @@ def think_k8s():
cluster_name = "eks-staging"
# Format node data
nodes = []
for node in v1.list_node().items:
# Fetch ephemeral-storage and instance type
@@ -61,7 +60,6 @@ def think_k8s():
"namespaces": [ns.metadata.name for ns in v1.list_namespace().items]
})
# Fetch environment variables
api_url = os.getenv("AI_API_URL")
auth_token = os.getenv("AI_API_TOKEN")