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
| #!/bin/bash | |
| # shellcheck disable=SC2016 | |
| set -e | |
| # Validates all Rancher and AWS infrastructure resources required for provisioning an RKE2/K3s cluster using the AWS | |
| # out-of-tree external cloud-provider | |
| display_help() { |
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
| #!/bin/bash | |
| set -e | |
| if [ $# -ne 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then | |
| echo "usage: update-go <version>" | |
| exit 1 | |
| fi | |
| cur_version="$(go version | awk '{print $3}' | sed 's/go//')" |
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 zsh | |
| # This script will get all of the resources for a rancher v2prov (rke2/k3s) cluster, and optionally generate a tar ball containing the resources. | |
| set -e | |
| BASE="$(basename $0)" | |
| function display_help() { | |
| echo "Usage: ${BASE}" |
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 zsh | |
| set -e | |
| GIST_ROOT=${GIST_ROOT:-${HOME}/.gist} | |
| GIST_LIMIT=${GIST_LIMIT:-100} | |
| BASE="$(basename $0)" | |
| function display_help() { |
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 zsh | |
| set -e | |
| function display_help() { | |
| echo "Usage: $(basename $0) --source [source tag] --dest [dest tag]" | |
| echo | |
| echo ' -s, --source [Required] source image and tag' | |
| echo ' -d, --dest [Required] destination image and tag' | |
| echo ' -p, --push [Optional] push files to docker hub' |
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
| #!/bin/bash | |
| # | |
| # Given a command, rancher server url, rancher admin token, namespace and name of a v2prov cluster: | |
| # 1. Get the management cluster name | |
| # 2. Download the kubeconfig | |
| # 3. Get the list of CAPI machines | |
| # 4. For each CAPI machine: | |
| # a. Download the ssh keys to a temp directory | |
| # b. Get the IP address of the node | |
| # b. Run a command on the node via ssh |
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
| #!/bin/bash | |
| REGION="us-east-2" | |
| PREFIX="jhyde" | |
| question () { | |
| while true; do | |
| read -p "$1" yn | |
| case $yn in | |
| [Yy]* ) break;; |
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
| #!/bin/bash | |
| set -ex | |
| KUBECTL_CMD=kubectl | |
| build() { | |
| echo "Building cluster.yml..." | |
| IFS='' | |
| while read line |
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/zsh | |
| echo "Deleting droplets" | |
| name=$1 | |
| while read -r entry; | |
| do | |
| if [[ -z $(echo $entry | xargs) ]]; | |
| then |
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
| #!/bin/bash | |
| PATCH=NO | |
| NAMESPACE=$1 | |
| NODE=$2 | |
| NODEJSON=$(kubectl get -n $NAMESPACE node.management.cattle.io $NODE -o json) | |
| echo $NODEJSON | jq -r '.metadata.finalizers += ["clusterscoped.controller.cattle.io/user-node-remove_abcde"]' | jq -r '.metadata.annotations += { cleanup.cattle.io/user-node-remove: null }' > node-0.json |
NewerOlder