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 | |
#set -x | |
IMAGE_NAME="$1" | |
RELEASE="$2" | |
TAG="$3" | |
if [ "$IMAGE_NAME" == "" ]; then | |
echo "IMAGE_NAME is required. example cluster-etcd-operator" |
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
#!/usr/bin/env bash | |
set -euox pipefail | |
GO_VERSION=1.16.3 | |
PORT=8181 | |
function log { | |
local msg="$1" | |
echo -e "$\033[32m$(date +'%Y-%m-%d %H:%M:%S') $1 $\033[0;39m" | |
} |
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
func ensureDesiredUpgradeVersion(_ context.Context, clusterVersionLister configv1listers.ClusterVersionLister) (string, error){ | |
config, err := clusterVersionLister.Get("version") | |
if err != nil { | |
return "", err | |
} | |
desiredUpdate := config.Spec.DesiredUpdate | |
// Wait for CVO to populate desired status if empty | |
//TODO ensure desired update is expected to be always populated | |
if desiredUpdate == nil { |
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 | |
ARTIFACT_DIR=$PWD | |
mkdir -p $ARTIFACT_DIR/metrics | |
echo "Snapshotting prometheus ..." | |
oc --insecure-skip-tls-verify exec -n openshift-monitoring prometheus-k8s-0 -- tar cvzf - -C /prometheus . >$ARTIFACT_DIR/metrics/prometheus.tar.gz |
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
apiVersion: monitoring.coreos.com/v1 | |
kind: ServiceMonitor | |
metadata: | |
labels: | |
k8s-app: vmware-exporter | |
name: vmware-exporter-monitor | |
namespace: openshift-vsphere-infra | |
spec: | |
endpoints: | |
- interval: 30s |
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/sh -ex | |
IMG_URL=$1 | |
IMAGE='/tmp/image.iso' | |
BASE_URL='http://192.168.2.160:8080' | |
IPXE_DIR='/tmp/ipxe' | |
KERNEL_OPTS='random.trust_cpu=on rd.luks.options=discard ignition.firstboot ignition.platform.id=metal console=tty0 console=ttyS0,115200n8' | |
ISO_MNT=`mktemp -d` | |
mkdir -p $IPXE_DIR |
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 | |
#set -x | |
# usage example | |
# ./script.sh \ | |
# /subscriptions/8XXXba4b-XXXX-446a-XXXX-a9XXXXXe3d/resourceGroups/SBATSCHE-METRICS-2020-NSW5W-RG/providers/Microsoft.Compute/virtualMachines/sbatsche-metrics-2020-nsw5w-master-0 \ | |
# date +%FT%TZ -d "3 day ago" \ | |
# date +%FT%TZ -d "2 day ago" | |
if ! command -v az &> /dev/null |
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 | |
choice=$(oc get --namespace openshift-etcd --selector etcd pods -o json | jq -r '.items[] | .spec.nodeName + " " + (.status.containerStatuses[] | select(.name=="etcd") | .containerID[8:])' | fzf) | |
IFS=' ' read node container_id <<< "$choice" | |
pid=$(oc debug --quiet nodes/$node -- chroot /host crictl inspect -o go-template --template '{{.info.pid}}' $container_id) | |
oc debug --quiet nodes/$node -- chroot /host strace -Tfe inject=fdatasync:delay_enter=800000 -e trace=fdatasync -p $pid |
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
#!/usr/bin/env bash | |
function queue() { | |
local TARGET="${1}" | |
shift | |
local LIVE | |
LIVE="$(jobs | wc -l)" | |
while [[ "${LIVE}" -ge 45 ]]; do | |
sleep 1 | |
LIVE="$(jobs | wc -l)" |
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
test upgrade openshift/cluster-version-operator#411 4.6.0-0.ci gcp |