Skip to content

Instantly share code, notes, and snippets.

View StevenACoffman's full-sized avatar

Steve Coffman StevenACoffman

View GitHub Profile
@StevenACoffman
StevenACoffman / argo_vs_brigade.md
Last active August 30, 2018 22:31
argo vs brigade

Argo vs. Brigade some of the key differences are

  • K8s CRD vs. javascript execution service

  • Declarative YAML vs. javascript

  • Argo has built-in artifact support for input/output handling

  • Argo does not have event handling yet (working on it :-)

    As of dec 2017

@StevenACoffman
StevenACoffman / kubernetes_add_service_account_kubeconfig.sh
Last active November 1, 2019 21:12 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the service account, and RBAC
#!/bin/bash -e
# NOTE: CHANGE THE S3_PREFIX!!!
# Add user to k8s 1.6+ using service account, RBAC for jobs and extensions only
if [[ -z "$1" ]] || [[ -z "$2" ]];then
echo "usage: $0 <service-account> <namespace (stg|prod)>"
exit 1
fi
SERVICE_ACCOUNT_NAME=$1
#!/bin/bash
# Check if a value exists in an array
# @param $1 mixed Needle
# @param $2 array Haystack
# @return Success (0) if value exists, Failure (1) otherwise
# Usage: in_array "$needle" "${haystack[@]}"
# See: http://fvue.nl/wiki/Bash:_Check_if_array_element_exists
in_array() {
@StevenACoffman
StevenACoffman / Makefile
Last active May 14, 2018 16:22
For Ryan
NAME := acmecorp/foo
TAG := $$(git log -1 --pretty=%!H(MISSING))
IMG := ${NAME}:${TAG}
LATEST := ${NAME}:latest
build:
@docker build -t ${IMG} .
@docker tag ${IMG} ${LATEST}
push:
@StevenACoffman
StevenACoffman / Programmer Quotes.md
Last active May 24, 2025 17:54
Programmer quotes.md

That being said, I think that, as engineers, we tend to discount the complexity we build ourselves vs. complexity we need to learn.

— Joe Beda

Don't spend more time discussing a reversible change than it would take to make (& potentially reverse) the change

Kent Beck

@StevenACoffman
StevenACoffman / golang_kinesis.go
Created May 9, 2018 00:16 — forked from coboshm/golang_kinesis.go
Golang + Kinesis firehose
package main
import (
"log"
"encoding/json"
"fmt"
"os"
"math/rand"
@StevenACoffman
StevenACoffman / streams_to_firehose.go
Created May 9, 2018 00:09 — forked from harlow/streams_to_firehose.go
Golang lambda function to send Streams data to Firehose
package main
import (
"github.com/apex/go-apex"
"github.com/apex/go-apex/kinesis"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/firehose"
)
package main
import (
"fmt"
"reflect"
)
func main() {
a := []int{1, 2, 3, 4}
#!/bin/bash -e
# Usage ./k8s-service-account-kubeconfig.sh ( namespace ) ( service account name )
TEMPDIR=$( mktemp -d )
trap "{ rm -rf $TEMPDIR ; exit 255; }" EXIT
SA_SECRET=$( kubectl get sa -n $1 $2 -o jsonpath='{.secrets[0].name}' )