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
| import asyncio | |
| import json | |
| import logging | |
| import os | |
| from urllib import error, parse, request | |
| import kopf | |
| import urllib3 | |
| from kubernetes import client as k8s_client, config as k8s_config |
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
| import asyncio | |
| import logging | |
| import os | |
| import kopf | |
| import urllib3 | |
| from kubernetes import client as k8s_client, config as k8s_config | |
| LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO").upper() |
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
| # Benutzerdokumentation - Test Operator | |
| Diese Anleitung beschreibt die Nutzung des Test Operators im Alltag. | |
| ## Was der Operator macht | |
| Der Operator verwaltet temporaere Subproject-Namespaces in Kubernetes. | |
| - Erstellt einen eindeutigen Namespace pro `SubProject`-Ressource | |
| - Kopiert gruppenbasierte RBAC-Bindings aus dem Parent-Namespace |
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
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: prometheus | |
| namespace: prometheus-gpu | |
| spec: | |
| selector: | |
| app: prometheus | |
| ports: | |
| - name: web |
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
| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: prometheus-config | |
| namespace: prometheus-gpu | |
| data: | |
| prometheus.yml: | | |
| global: | |
| scrape_interval: 30s | |
| evaluation_interval: 30s |
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
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: prometheus | |
| namespace: prometheus-gpu | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: prometheus |
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 python3 | |
| """ | |
| Catchpoint to VictoriaMetrics Data Exporter | |
| Fetches performance metrics from Catchpoint API and pushes them to VictoriaMetrics | |
| """ | |
| import os | |
| import sys | |
| import time | |
| import requests |
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
| your_command | awk '{ | |
| $(NF-2)=sprintf("%.2f", $(NF-2)/1024/1024/1024); | |
| $(NF-1)=sprintf("%.2f", $(NF-1)/1024/1024/1024); | |
| $NF=sprintf("%.2f", $NF/1024/1024/1024); | |
| }' |