Skip to content

Instantly share code, notes, and snippets.

View joelanford's full-sized avatar

Joe Lanford joelanford

  • Red Hat
  • Washington, DC
View GitHub Profile
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
declare -a TMPROOT
declare -a CLUSTER_NAME
# We're going to do file manipulation, so let's work in a temp dir
@joelanford
joelanford / query.sh
Last active May 6, 2021 18:13
OLMs Ready To Review PRs
#!/usr/bin/env bash
gql='query {
operatorLifecycleManager: repository(owner:"operator-framework", name:"operator-lifecycle-manager") {
...repoPullRequests
}
operatorRegistry: repository(owner:"operator-framework", name:"operator-registry") {
...repoPullRequests
}
@joelanford
joelanford / gist:33cc49a44ff214987ec1aa17c440e6f8
Created March 25, 2021 17:37
`./channelizer redhat-operator-index-v4.6 servicemeshoperator`
2021/03/25 13:34:23 Bundle "servicemeshoperator.v2.0.2" replaces "servicemeshoperator.v2.0.1.1" in channel "v2"
2021/03/25 13:34:23 Bundle "servicemeshoperator.v2.0.2" replaces "servicemeshoperator.v2.0.1.1" in channel "v2.0"
2021/03/25 13:34:23 Bundle "servicemeshoperator.v2.0.1.1" replaces "servicemeshoperator.v2.0.1" in channel "v2"
2021/03/25 13:34:23 Bundle "servicemeshoperator.v2.0.1.1" replaces "servicemeshoperator.v2.0.1" in channel "v2.0"
2021/03/25 13:34:23 Bundle "servicemeshoperator.v2.0.1" replaces "servicemeshoperator.v2.0.0.2" in channel "v2"
2021/03/25 13:34:23 Bundle "servicemeshoperator.v2.0.1" replaces "servicemeshoperator.v2.0.0.2" in channel "v2.0"
2021/03/25 13:34:23 Bundle "servicemeshoperator.v2.0.0.2" replaces "servicemeshoperator.v2.0.0.1" in channel "v2"
2021/03/25 13:34:23 Bundle "servicemeshoperator.v2.0.0.2" replaces "servicemeshoperator.v2.0.0.1" in channel "v2.0"
2021/03/25 13:34:23 Bundle "servicemeshoperator.v2.0.0.1" replaces "servicemeshoperator.v2.0.0" in channel "v2"
2021
@joelanford
joelanford / use-go
Last active October 29, 2020 13:50
#!/usr/bin/env zsh
function setup-go-env() {
CUSTOM_GO_DIR="/usr/local/go"
[[ -d "$CUSTOM_GO_DIR/bin" ]] && path+="$CUSTOM_GO_DIR/bin"
if command -v go >/dev/null 2>&1; then
GOPATH=$(go env GOPATH)
path=("$GOPATH/bin" $path)
#!/usr/bin/env bash
DEFAULT_VERSION="v1.18.2"
if [[ -z "$KUBERNETES_VERSION" ]]; then
echo "KUBERNETES_VERSION not set. Using '$DEFAULT_VERSION'."
fi
KUBERNETES_VERSION="${KUBERNETES_VERSION:-$DEFAULT_VERSION}"
export MINIKUBE_IN_STYLE=false
export CHANGE_MINIKUBE_NONE_USER=true
@joelanford
joelanford / setup-operator-bundle-index.sh
Last active May 1, 2020 14:33
Setup script for github.com/joelanford/bundle-runner example
#!/bin/bash
set -ex
QUAY_PROJECT=joelanford
OPERATOR_NAME=example-operator
#
# 1. Create the project
#
operator-sdk new --type=go ${OPERATOR_NAME} --repo=github.com/${QUAY_PROJECT}/${OPERATOR_NAME}

Keybase proof

I hereby claim:

  • I am joelanford on github.
  • I am joelanford (https://keybase.io/joelanford) on keybase.
  • I have a public key ASDZW-vaRNxFjFmbAziee2FUx3T2d0ZzycDtFAH7rzfvNwo

To claim this, I am signing this object:

@joelanford
joelanford / gitversion.groovy
Last active August 2, 2017 19:48
A (not quite working) groovy script to generate a sane version string from a git repository
#!/usr/bin/env groovy
class GitVersion {
static String initialVersion = "0.0.1"
String repoDir
Boolean isGitRepository
Boolean hasCommit
Boolean isClean