Skip to content

Instantly share code, notes, and snippets.

View hexfusion's full-sized avatar
🐀
scampering

Sam Batschelet hexfusion

🐀
scampering
  • Red Hat
  • gRPC stream
View GitHub Profile
master-logs etcd etcd &> log
---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
creationTimestamp: null
labels:
machineconfiguration.openshift.io/role: master
name: 10-master-etcd
spec:
config:
@hexfusion
hexfusion / atop-monitor.yml
Last active August 12, 2020 19:46
atop monitor in machineconfig
---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
creationTimestamp: null
labels:
machineconfiguration.openshift.io/role: master
name: 10-atop-monitor
spec:
config:
mkdir etcd-storage-disk
cd $!
openshift-install create manifests
vi openshift/99_openshift-machineconfig_99-worker-ssh.yaml
openshift-install create ignition-configs
openshift-install create install-config
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE=$release openshift-installer create cluster --log-level debug
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@hexfusion
hexfusion / debug-etcd-operator.sh
Last active October 30, 2020 12:34 — forked from ironcladlou/debug-etcd-operator.sh
debug-etcd-operator.sh
#!/bin/bash
set -euo pipefail
function log {
local msg="$1"
echo -e "$\033[32m$(date +'%Y-%m-%d %H:%M:%S') $1 $\033[0;39m"
}
export KUBECONFIG=$(find $HOME/clusters -name kubeconfig | fzf)
#!/usr/bin/env bash
# https://grafana.com/docs/grafana/latest/http_api/auth/#create-api-token
GRAFANA_TOKEN=""
if [ "$1" = "" ]; then
echo "url to prometheus.tar required"
exit 1
fi
#!/usr/bin/env bash
CLUSTER_DOMAIN_1="uit-nonprod.pka.domain.com"
CLUSTER_DOMAIN_2="uit-nonprod.rz.domain.com"
NODE_IP="123.123.123.123"
init() {
if [ -d "$PWD/certs" ]; then
echo "$PWD/certs already exists please remove and retry"
exit 1
@hexfusion
hexfusion / tcpdump-pod
Last active May 5, 2020 17:28 — forked from ironcladlou/tcpdump-pod
OpenShift Network Helpers
#!/bin/bash
set -euo pipefail
NAMESPACE=$1
NAME=$2
IMAGE="${IMAGE:-quay.io/dmace/ditm}"
NODE_NAME="$(oc get --namespace $NAMESPACE pods $NAME -o go-template='{{ .spec.nodeName }}')"
CONTAINER_ID_URI="$(oc get --namespace $NAMESPACE pods $NAME -o go-template='{{ (index .status.containerStatuses 0).containerID }}')"
CONTAINER_ID="${CONTAINER_ID_URI:8}"
#!/bin/bash
export ETCDCTL_API=3
./etcdctl --cert ./etcd-client.crt --cacert ./etcd-ca-bundle.crt \
--key ./etcd-client.key \
--endpoints https://10.0.130.58:2379,https://10.0.138.124:2379,https://10.0.151.168:2379 $1