Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Commit

Permalink
fix(app) setting variable before add_sample fixing UnboundLocalError (#9
Browse files Browse the repository at this point in the history
)
  • Loading branch information
deadc authored Oct 4, 2018
1 parent ae10546 commit 77b72b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ def collect(self):
for pod in pods.get('items', []):
pod_name = pod['metadata']['name']
pod_namespace = pod['metadata']['namespace']

pod_container_mem = 0
pod_container_cpu = 0
pod_container_name = ""

for container in pod['containers']:
pod_container_name = container['name']
pod_container_cpu = container['usage']['cpu']
Expand All @@ -85,4 +90,3 @@ def collect(self):
start_http_server(8000)
while True:
time.sleep(5)

0 comments on commit 77b72b8

Please sign in to comment.