Skip to content

Instantly share code, notes, and snippets.

Lucas Roesler LucasRoesler

Block or report user

Report or block LucasRoesler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
LucasRoesler /
Created Jul 28, 2019
Running OpenFaaS Certifier for faas-netes in KinD
  1. Start the KinD env and disable auth. In the faas-netes project
make start-kind
export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"

helm upgrade openfaas --install ./chart/openfaas \
    --namespace openfaas  \
    --set basic_auth=false \
    --set openfaasImagePullPolicy=IfNotPresent \
#!/usr/bin/env bash
# reset environment variables that could interfere with normal usage
# put all utility functions here
# make a temporary file
git_extra_mktemp() {
mktemp -t "$(basename "$0")".XXX
LucasRoesler / graceful_servers.go
Last active May 10, 2019
Two possible call signatures for gracefully starting and ending the health server
View graceful_servers.go
// ListenAndServeMonitoring starts up an HTTP server serving /metrics and /health.
// When the context is cancelled, the server will be gracefully shutdown.
func ListenAndServeMonitoring(ctx context.Context, addr string, healthHandler http.Handler) error {
srv := monitoringServer(addr, healthHandler)
go func() {
shutdownContext, cancel := context.WithTimeout(context.Background(), 1*time.Second)
defer cancel()
LucasRoesler /
Last active Aug 17, 2019
Create a new dev environment using KinD and immediately forward the Gateway port
kind create cluster --name "$DEVENV"
export KUBECONFIG="$(kind get kubeconfig-path --name="$DEVENV")"
kubectl rollout status deploy coredns --watch -n kube-system
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name:

#!/usr/bin/env bash
echo "[0] Install the OF namespaces"
kubectl apply -f
echo "[1] Setup basic auth"
kubectl -n openfaas create secret generic basic-auth \
--from-literal=basic-auth-user=admin \
echo "[2] update helm chart cache"
helm repo update
  1. Install openfaas using these images
  • Replace the gateway with theaxer/gateway:loggerhandler
  • Replace your provider with theaxer/faas-netes:loggerhandler or theaxer/swarm:loggerhandler

Export the base url to your gateway, e.g.

export gateway=http://localhost:31112
  1. install openfaas with my fork
kubectl apply -f
helm upgrade openfaas --install openfaas/openfaas \
    --namespace openfaas  \
    --set basic_auth=true \
    --set faasnetesd.image=theaxer/faas-netes:logger \
    --set faasnetesd.imagePullPolicy=IfNotPresent \
LucasRoesler /
Created Feb 17, 2019 — forked from burtonr/
OpenFaaS on KinD quickstart
echo "> Be KinD with OpenFaaS"
# First, check if docker is available
docker version | 2>/dev/null
if [ $? -ne 0 ]; then
echo "> Docker is required for running OpenFaaS on KinD"
echo "> Install with: 'curl -sLS | sudo sh'"
LucasRoesler /
Created Feb 11, 2019
read docker logs directly from the socket
curl -sN --unix-socket /var/run/docker.sock \
You can’t perform that action at this time.