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: apps/v1 | |
kind: Deployment | |
metadata: | |
name: metrics-load-test | |
namespace: metrics-load-test | |
spec: | |
replicas: 5 | |
selector: | |
matchLabels: | |
name: metrics-load-test |
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 | |
NAMESPACE=default | |
NODE_NAME=nmalik-dev-ts2v9-worker-eastus21-lnktj | |
TOKEN_SECRET_NAME=$(oc -n $NAMESPACE get sa default -o json | jq -r '.secrets[] | select(.name | contains("token")) | .name') | |
DOCKERCFG_SECRET_NAME=$(oc -n $NAMESPACE get sa default -o json | jq -r '.secrets[] | select(.name | contains("dockercfg")) | .name') | |
IMAGE=quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:3f968cb0ca3116a7869cb41b4bfcb5ac537ff9d0ea21b3c4b69d8248881a1408 | |
cat << EOF | kubectl create -f - | |
apiVersion: v1 |
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 | |
# assumes bluetooth is turned on | |
# assumes name of device | |
# sudo dnf install python3-bluez | |
# pip3 install bluetooth_battery --user | |
BOSE_CONNECT=$(bt-device -l | egrep -e "Bose QC 35" -e "PLT BBFIT3150" | sort | sed 's/.*[(]\(.*\)[)].*/connect \1 \n/g') |
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 | |
# simple script to dump node-logs to the current directory | |
echo "Downloading audit log files.." | |
NODES=$(oc get nodes | grep master | awk '{print $1}') | |
# create dirs for each node | |
# collect all the logs, do in parallel | |
for LOG_PATH in openshift-apiserver kube-apiserver; |
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 | |
DEFAULT_PORT=3000 | |
PORT=${1:-$DEFAULT_PORT} | |
CONTAINER_ENGINE=${CONTAINER_ENGINE:-docker} | |
SA_NAME=prometheus-k8s | |
SA_NAMESPACE=openshift-monitoring | |
SA_TOKEN=$(oc -n $SA_NAMESPACE sa get-token $SA_NAME) |
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: project.openshift.io/v1 | |
kind: Project | |
metadata: | |
name: nmalik-prometheus | |
--- | |
apiVersion: operators.coreos.com/v1alpha1 | |
kind: CatalogSource | |
metadata: | |
name: operatorhubio-catalog |
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
global: | |
resolve_timeout: 5m | |
pagerduty_url: https://events.pagerduty.com/v2/enqueue | |
route: | |
receiver: "null" | |
group_by: | |
- job | |
routes: | |
- receiver: "null" | |
group_by: |
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
python -c 'import json, sys, yaml ; y=yaml.safe_load(sys.stdin.read()) ; print(json.dumps(y))' |
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
import re | |
from kubernetes import client, config | |
from kubernetes.client import ApiClient | |
# based on initial 4.3.0 installation using 3 tiers of crd name possible: | |
# oc get crds -o json | jq -r '.items[].metadata.name' | sed 's/.*\(\.[^.]*\.[^.]*\.[^.]*\)$/\1/g' | sed 's/^[^.]*\(\.[^.]*\.[^.]*\)/\1/g' | sort -u | |
RE_DENYLIST = [ | |
r".*\.authorization\.openshift\.io", |
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
# Useful link for how to discover API's: https://github.com/operator-framework/operator-registry/issues/33#issuecomment-473671805 | |
# get tools | |
go get github.com/fullstorydev/grpcurl/... | |
go install github.com/fullstorydev/grpcurl/cmd/grpcurl | |
# constants for what we're investigating | |
NAMESPACE=openshift-marketplace | |
LOCAL_PORT=50051 | |
REMOTE_PORT=50051 |
NewerOlder