Skip to content

Instantly share code, notes, and snippets.

View chandraS's full-sized avatar

shicha1203 chandraS

  • Texas A&M University
  • Dallas
View GitHub Profile
@chandraS
chandraS / Dockerfile
Last active January 11, 2025 03:13
visibility cluster
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY src/main.py .
CMD ["python", "main.py"]
@chandraS
chandraS / Chart.yaml
Last active January 11, 2025 03:12
customer-cluster
Chart.yaml
apiVersion: v2
name: cluster-metrics
description: Prometheus exporters for node and pod metrics collection
version: 1.0.0
appVersion: "1.0.0"
#!/usr/bin/env ruby
require 'bundler'
Bundler.require
require 'sinatra'
set :bind, '0.0.0.0'
set :port, 80
def show_credentials(request)
<<-EOF
def extract_values(obj, key):
"""Recursively pull values of specified key from nested JSON."""
arr = []
def extract(obj, arr, key):
"""Return all matching values in an object."""
if isinstance(obj, dict):
for k, v in obj.items():
if isinstance(v, (dict, list)):
extract(v, arr, key)