This file contains 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
NAMESPACE=(servicebinding-system korifi-gateway korifi kpack cert-manager cf) | |
killall kubectl | |
for n in ${NAMESPACE[@]}; do | |
kubectl proxy & kubectl get namespace $n -o json |jq '.spec = {"finalizers":[]}' >temp.json | |
curl -k -H "Content-Type: application/json" -X PUT --data-binary @temp.json 127.0.0.1:8001/api/v1/namespaces/$n/finalize | |
rm -rf temp.json | |
done |
This file contains 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 | |
CODES=("Error" "ContainerStatusUnknown" "Evicted" "CrashLoopBackOff" "Completed" "OOMKilled" "ImagePullBackOff" "ErrImagePull") | |
for code in "${CODES[@]}"; do | |
echo "Looking for pods that are in ${code} status" | |
PODS=($(kubectl get pods --all-namespaces | grep ${code} | awk '{print $2 "|" $1}')) | |
for pod in "${PODS[@]}"; do | |
echo "$pod" | awk -F"|" '{print $1 " --namespace=" $2}' | xargs kubectl delete pod; | |
done |
This file contains 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 | |
###### For generate_certs.sh script ###### | |
export COUNTRY=US | |
export STATE=California | |
export CITY=Irvine | |
export ORGANIZATION=YourCompany | |
export UNIT=YourBU | |
export COMMON_NAME=server.example.com | |
export SAN_NAME_1=server.example.com |
This file contains 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 -ex | |
GITLAB_URL=https://gitlab.<hello>.com/ | |
GITLAB_TOKEN= | |
if [ -z "$GITLAB_URL" ]; then | |
echo "Missing environment variable: GITLAB_URL (e.g. https://gitlab.com)" | |
exit 1 | |
fi |
This file contains 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
resource_types: | |
- name: pivnet | |
type: docker-image | |
source: | |
repository: pivotalcf/pivnet-resource | |
tag: latest-final | |
- name: static | |
type: docker-image | |
source: | |
repository: eugenmayer/concourse-static-resource |
This file contains 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 | |
export DOCKER_CONTENT_TRUST=0 | |
export HARBOR_HOST=harbor.pks.homelab.io | |
export HARBOR_USERNAME=admin | |
export HARBOR_PASSWORD=welcome | |
export HARBOR_REPO=$HARBOR_HOST/prometheus-operator | |
docker login $HARBOR_HOST -u $HARBOR_USERNAME -p $HARBOR_PASSWORD |
This file contains 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 | |
read -e -p "Enter the git directory:" FOLDER | |
pushd $FOLDER | |
while read -r line; do | |
pushd $line | |
git pull | |
popd |
This file contains 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 -x | |
export GIT_USER= | |
export GIT_TOKEN= | |
export ORG_NAME= | |
export NEW_ORG_NAME= | |
export OUTPUT_FILE=repos.json | |
rm -rf $OUTPUT_FILE |
This file contains 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 -e | |
# Determine latest ruby version | |
DEFAULT_RUBY_VERSION=$(curl https://cache.ruby-lang.org/pub/ruby/index.txt | tail -1 | awk '{split($0,a," "); print a[1]}' | cut -d'-' -f2) | |
# Install homebrew | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
# Install gpg | |
brew install gnupg |
This file contains 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 -e | |
SERVICE_PRINCIPAL_NAME=http://rj-BOSHAzureCPI | |
read -s -p "Enter Password for service principal user $SERVICE_PRINCIPAL_NAME: " CLIENT_SECRET | |
AZ_ACCOUNT=$(az login) | |
SUBSCRIPTION_ID=$(echo "$AZ_ACCOUNT" | jq -r '.[] | .id') | |
TENANT_ID=$(echo "$AZ_ACCOUNT" | jq -r '.[] | .tenantId') |
NewerOlder