This file contains hidden or 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
$ KUBECONFIG=~/.kube/config ./hack/conformance-test.sh -ginkgo.dryRun -ginkgo.randomizeAllSpecs=false | |
Conformance test using current-context of /Users/karl/.kube/config | |
Conformance test run date:Mon Nov 30 16:21:19 PST 2015 | |
Conformance test SHA:e7a2d3090f83bc0860d8c64945e9986c453a003e | |
Conformance test version tag(s): | |
Conformance test checking conformance with Kubernetes version 1.0 | |
Conformance test: not doing test setup. | |
I1130 16:21:20.178892 96376 e2e_test.go:106] The --provider flag is not set. Treating as a conformance test. Some tests may not be run. | |
Nov 30 16:21:20.180: INFO: >>> testContext.KubeConfig: /Users/karl/.kube/config |
This file contains hidden or 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 bash | |
# Resizing a vagrant centos disk... the hard way | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
set -o xtrace | |
vagrant up |
This file contains hidden or 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 bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
# org/repo (e.g. karlkfi/probe) | |
REPO=$1 | |
# range (e.g. 1.8.4..1.8.5) | |
RANGE=$2 |
This file contains hidden or 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
# return 0 if version A >= version B using semanatic versioning | |
function semver_gte() { | |
VERISON_A="${1}" | |
VERISON_B="${2}" | |
SEMVER_PATTERN="[^0-9]*\([0-9][0-9]*\)[.]\([0-9][0-9]*\)[.]\([0-9][0-9]*\).*" | |
SEG1_A="$(echo "${VERISON_A}" | sed -e "s#${SEMVER_PATTERN}#\1#")" | |
SEG1_B="$(echo "${VERISON_B}" | sed -e "s#${SEMVER_PATTERN}#\1#")" | |
[[ ${SEG1_A} < ${SEG1_B} ]] && return 1 | |
[[ ${SEG1_A} > ${SEG1_B} ]] && return 0 | |
SEG2_A="$(echo "${VERISON_A}" | sed -e "s#${SEMVER_PATTERN}#\2#")" |
This file contains hidden or 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 bash | |
# Exit on error, unset variable, or error in pipe chain | |
set -o errexit -o nounset -o pipefail | |
# For setenforce & xfs_info | |
PATH=$PATH:/usr/sbin:/sbin | |
echo "Validating distro..." | |
distro="$(source /etc/os-release && echo "${ID}")" |
This file contains hidden or 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: kind.x-k8s.io/v1alpha4 | |
kind: Cluster | |
networking: | |
# expose to private network | |
apiServerAddress: "0.0.0.0" | |
# fixed port so Vault auth backend can find the API | |
apiServerPort: 32769 | |
kubeadmConfigPatchesJSON6902: | |
- group: kubeadm.k8s.io |
This file contains hidden or 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 bash | |
# Convert a bash script into an asciicast recording | |
set -o errexit -o nounset -o pipefail | |
USER=karl | |
WORKDIR="~/workspace" | |
PROMPT="\u001b]0;Cloud Shell\u0007${USER}@cloudshell:\u001b[1;34m${WORKDIR}\u001b[00m$ \u001bkcloudshell\u001b\\\\" |
This file contains hidden or 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 bash | |
# Convert a bash script into an asciinema recording | |
set -o errexit -o nounset -o pipefail | |
INPUT_FILE=${1:-} | |
if [[ -z "${INPUT_FILE}" ]]; then | |
echo "Syntax: $0 <path/to/bash-scipt.sh> <path/to/out.cast>" | |
exit 1 |
This file contains hidden or 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 bash | |
set -o errexit -o nounset -o pipefail | |
PKG_PATH="${1:-.}" | |
if ! hash jq 2>/dev/null; then | |
echo >&2 "Error: jq not found. Please install jq: https://stedolan.github.io/jq/download/" | |
fi |
This file contains hidden or 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
# In a Starlark context that doesn't support json or recursion, | |
# you might become desperate enough to do something crazy like this... | |
def quoteIfString(obj): | |
if type(obj) == "string": | |
return '"' + obj + '"' | |
else: | |
return obj | |
def jsonEncode(obj): |