This file contains hidden or 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
| FROM python:3.9-slim | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install -r requirements.txt | |
| COPY src/main.py . | |
| CMD ["python", "main.py"] |
This file contains hidden or 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
| Chart.yaml | |
| apiVersion: v2 | |
| name: cluster-metrics | |
| description: Prometheus exporters for node and pod metrics collection | |
| version: 1.0.0 | |
| appVersion: "1.0.0" | |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'bundler' | |
| Bundler.require | |
| require 'sinatra' | |
| set :bind, '0.0.0.0' | |
| set :port, 80 | |
| def show_credentials(request) | |
| <<-EOF |
This file contains hidden or 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
| 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) |