This file contains 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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: fortune-teller-app | |
labels: | |
k8s-app: fortune-teller-app | |
spec: | |
replicas: 1 | |
template: |
This file contains 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 React, { useState, useEffect, useRef } from 'react'; | |
import fetch from 'fetch-hoc'; | |
import classNames from 'classnames'; | |
import { useHotkeys } from 'react-hotkeys-hook'; | |
const scrollOpts = { behavior: "smooth", block: "nearest" }; | |
const Row = props => { | |
const {data, selected} = props; | |
const [visible, setVisible] = useState(true); |
This file contains 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
--- | |
kind: TrafficTarget | |
apiVersion: access.smi-spec.io/v1alpha1 | |
metadata: | |
name: path-specific | |
namespace: default | |
destination: | |
# Note: no service account name | |
name: service-a | |
# Note: no namespace, these policies should live in the namespace they are matching. |
This file contains 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
#!/bin/ash | |
github_changelog_generator $@ | |
# If CHANGELOG.md exits, copy it to an env var | |
if [[ -e 'CHANGELOG.md' ]]; then | |
export CHANGELOG="$(cat CHANGELOG.md | sed ':a;N;$!ba;s/%/%25/g' | sed ':a;N;$!ba;s/\n/%0A/g' | sed ':a;N;$!ba;s/\r/%0D/g)" | |
fi | |
echo "$CHANGELOG" | |
echo ::set-output name=changelog::"${CHANGELOG}" |
This file contains 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
func routes() []string { | |
raw := reflect.ValueOf(http.DefaultServeMux).Elem().FieldByName("m") | |
raw = reflect.NewAt(raw.Type(), unsafe.Pointer(raw.UnsafeAddr())).Elem() | |
var rts []string | |
for _, k := range raw.MapKeys() { | |
rts = append(rts, k.String()) | |
} | |
sort.Strings(rts) |
This file contains 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
# Get iptables dumps for *every* namespace currently on the host | |
# NOTE: k8s services go into the host network namespace so they're inherited by everyone | |
# pod ip addresses go into their own network namespace | |
lsns | grep net | awk '{ print $4 }' | xargs -IX nsenter -t X -n iptables-save | curl -F 'f:1=<-' ix.io |
This file contains 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
INSTALLS ?= nginx-linkerd nginx-bare | |
define getsvc | |
kubectl get svc --all-namespaces -l app=nginx-ingress \ | |
--no-headers | |
endef | |
define lbip | |
$(call getsvc) \ |
This file contains 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 | |
import io | |
import re | |
import subprocess | |
import sys | |
import uuid | |
from contextlib import contextmanager |
This file contains 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
function expandSibling(el) { | |
var chevron = el.querySelector("td:first-child > i").classList; | |
chevron.toggle("fa-angle-down"); | |
chevron.toggle("fa-angle-right"); | |
el.nextElementSibling.classList.toggle("hide"); | |
} |
This file contains 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: Namespace | |
metadata: | |
name: tracing | |
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: oc-agent |