Skip to content

Instantly share code, notes, and snippets.

View jer's full-sized avatar

Jeremiah Wuenschel jer

View GitHub Profile
@jer
jer / metricerror.txt
Created June 7, 2019 20:21
An example of a large label value from pilot's istio metrics
Error adding/updating cluster(s) outbound|50052||clientservice.clientnamespace.svc.cluster.local: Invalid path: /etc/certs/cert-chain.pem, outbound|50052||clientservice.clientnamespace.svc.cluster.local: Invalid path: /etc/certs/cert-chain.pem, outbound|50052||clientservice.clientnamespace.svc.cluster.local: Invalid path: /etc/certs/cert-chain.pem, outbound|50052||clientservice.clientnamespace.svc.cluster.local: Invalid path: /etc/certs/cert-chain.pem, outbound|50052||clientservice.clientnamespace.svc.cluster.local: Invalid path: /etc/certs/cert-chain.pem, outbound|8443||aservice.somenamespace.svc.cluster.local: Invalid path: /etc/certs/cert-chain.pem, outbound|50051||anotherservice.anotherservicenamespace.svc.cluster.local: Invalid path: /etc/certs/cert-chain.pem, outbound|9091||service3.yetanotherservicenamespace.svc.cluster.local: Invalid path: /etc/certs/cert-chain.pem, outbound|50051||service4.yetanotherservicenamespace.svc.cluster.local: Invalid path: /etc/certs/cert-chain.pem, outbound|9000||service4.y
@jer
jer / divergence.tick
Last active October 10, 2017 23:12
Attempt at calculating divergence from a mean
var latest = stream
|from()
.measurement('prom_last')
.groupBy(*)
|window()
.period(11s)
.every(1s)
.align()
|last('value')
.as('last')
@jer
jer / roles.yaml
Created September 2, 2016 21:52
k8s RBAC role for kubelet
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
name: kubelet-role
rules:
- apiGroups: ["*"]
resources: ["pods", "nodes"]
verbs: ["*"]
nonResourceURLs: ["*"]
- apiGroups: ["*"]
@jer
jer / kubesetup.txt
Created August 18, 2016 20:58
Kube Issue
> export KUBERNETES_PROVIDER=aws; wget -q -O - https://get.k8s.io | bash
Downloading kubernetes release v1.3.5 to /Users/<redacted>/dev/kubernetes/upstream/cluster/kubernetes.tar.gz
--2016-08-18 13:55:05-- https://storage.googleapis.com/kubernetes-release/release/v1.3.5/kubernetes.tar.gz
Resolving storage.googleapis.com... 216.58.216.48, 2607:f8b0:4007:80a::2010
Connecting to storage.googleapis.com|216.58.216.48|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1487521607 (1.4G) [application/x-tar]
Saving to: 'kubernetes.tar.gz'
kubernetes.tar.gz 100%[==============================================================================================>] 1.38G 20.0MB/s in 81s
@jer
jer / swagger.json
Created July 21, 2016 04:17
Example with bad required fields
{
"paths" : {
"/v3/platforms/{id}" : {
"get" : {
"parameters" : [
{
"required" : true,
"description" : "Identifier of this platform",
"in" : "path",
"name" : "id",
apiVersion: batch/v1
kind: Job
metadata:
name: sdrunner
spec:
template:
metadata:
name: sdrunner
spec:
restartPolicy: Never
@jer
jer / keybase.md
Last active February 8, 2016 22:22
Keybase proof

Keybase proof

I hereby claim:

  • I am jer on github.
  • I am jwuenschel (https://keybase.io/jwuenschel) on keybase.
  • I have a public key ASAL3esftjuksgXaz5vwdJQhYfXhnNHEjY3x0foBsyRcAgo

To claim this, I am signing this object:

@jer
jer / gist:6fe6373482a8588eb6c2
Created September 29, 2014 05:52
Valgrind after the fix
> cat test.rb
require 'chess'
game = Chess::Game.new
puts game.to_s
> valgrind --partial-loads-ok=yes --undef-value-errors=no ruby test.rb
==60898== Memcheck, a memory error detector
==60898== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==60898== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==60898== Command: ruby test.rb
@jer
jer / gist:882015c81a39984f107a
Created September 29, 2014 05:50
Valgrind before fix
> cat test.rb
require 'chess'
game = Chess::Game.new
puts game.to_s
> valgrind --partial-loads-ok=yes --undef-value-errors=no ruby test.rb
==55403== Memcheck, a memory error detector
==55403== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==55403== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==55403== Command: ruby test.rb