I hereby claim:
- I am brancz on github.
- I am brancz (https://keybase.io/brancz) on keybase.
- I have a public key ASDCk1EoKCq2Z_dzuRM8suxa7qivP6oofgEIFo0BMtMR4Ao
To claim this, I am signing this object:
| package main | |
| import ( | |
| "bytes" | |
| "io/ioutil" | |
| "math/rand" | |
| "reflect" | |
| "testing" | |
| "time" |
| (kube_node_status_allocatable_memory_bytes * on(node) group_left() (kube_node_role{role="worker"} unless ignoring(role) kube_node_role{role="infra"}) - on(node) sum by(node) (kube_pod_container_resource_requests_memory_bytes * on(node) group_left() (kube_node_role{role="worker"} unless ignoring(role) kube_node_role{role="infra"}))) / 1e9 |
I hereby claim:
To claim this, I am signing this object:
| (sum by(role) (kube_pod_container_resource_requests_cpu_cores * on(node) group_left(role) kube_node_role)) / (sum by(role) (kube_node_status_allocatable_cpu_cores * on(node) group_left(role) kube_node_role)) |
| scrape_configs: | |
| - job_name: "node" | |
| scrape_interval: "1s" | |
| static_configs: | |
| - targets: ["localhost:9100"] | |
| remote_write: | |
| - url: "http://localhost:1234/receive" | |
| write_relabel_configs: | |
| - source_labels: ["job"] | |
| action: "hashmod" |
| kubectl get --insecure-skip-tls-verify --server https://192.168.99.100:10250 --raw /pods |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: ordinal-test | |
| labels: | |
| name: ordinal-test | |
| spec: | |
| clusterIP: None | |
| ports: | |
| - name: http-metrics |
| local cm = { | |
| binPack(data, maxSize, nameTemplate):: | |
| self.innerBinPack(data, maxSize, nameTemplate, std.objectFields(data), maxSize, 0), | |
| innerBinPack(data, maxSize, nameTemplate, items, remainingSize, count):: | |
| if std.length(items) == 0 then | |
| {} | |
| else | |
| local curName = items[0]; | |
| local cur = { [curName]: data[curName] }; | |
| // Size is the sum of the length of the key + length of the content plus |
| #!/bin/bash | |
| grafanaapi="http://localhost:8001/api/v1/proxy/namespaces/tectonic-system/services/grafana:3000/api" | |
| dir="./assets/grafana/" | |
| dashboards=`curl $grafanaapi/search | jq -r ".[] .uri"` | |
| while read -r d; do | |
| name=`echo $d | cut -c 3-` | |
| curl "$grafanaapi/dashboards/$d" | jq -r ".dashboard" | jq -r '. + {"__inputs":[{"name": "DS_PROMETHEUS","label": "prometheus","description": "","type": "datasource","pluginId": "prometheus","pluginName": "Prometheus"}]}' > "./assets/grafana/$name-dashboard.json" |
| package main | |
| import ( | |
| "flag" | |
| ) | |
| func main() { | |
| flag.Parse() | |
| flag.Lookup("logtostderr").Value.Set("true") | |
| flag.Lookup("v").Value.Set("10") |