Skip to content

Instantly share code, notes, and snippets.

View clcollins's full-sized avatar

Christopher Collins clcollins

View GitHub Profile
@clcollins
clcollins / restrictive_allowedSourceRanges.json
Last active April 1, 2024 20:55
Generic allowedSourceRanges ServiceLog
{
"severity": "Error",
"service_name": "SREManualAction",
"log_type": "cluster-configuration",
"summary":"Action required: Network misconfiguration",
"description": "Your cluster requires rou to take action. SRE has observed that there have been changes made to network configuration which impact normal working of the cluster: Default Ingress Controller allowedSourceRanges have been modified to exclude the IP(s) of the default router, ${IP}, causing the Console and OAuth routes to become inaccessible. Please allow the IP of service 'router-default' in namespace 'openshift-ingress' in the default Ingress Controller's allowedSourceRanges field.",
"internal_only": false
}
@clcollins
clcollins / proxy.txt
Last active November 22, 2023 21:01
Proxy Conditions
[SwitchyOmega Conditions]
; Require: SwitchyOmega >= 2.3.2
; Date: 3/7/2023
; Usage: https://github.com/FelisCatus/SwitchyOmega/wiki/RuleListUsage
!cloudfront.net
!*.cloudfront.net
*.console.aws.amazon.com
console.aws.amazon.com
amazonaws.com
*.amazonaws.com
@clcollins
clcollins / kube-verify.yaml
Last active April 20, 2021 23:01
Kube Verify deployment
---
apiVersion: v1
kind: Namespace
metadata:
labels:
kubernetes.io/metadata.name: kube-verify
name: kube-verify
spec:
---
apiVersion: apps/v1
@clcollins
clcollins / fio.yaml
Created April 5, 2021 18:30
Deploy Openshift File Integrity Operator
---
apiVersion: v1
kind: Namespace
metadata:
name: openshift-file-integrity
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
@clcollins
clcollins / piday_countdown_changes.md
Last active March 16, 2021 19:54
PiDay Countdown Article Changes

In the section "Countdown Logic", replace the code example with this:

def countdown(now):
    piday = datetime(now.year, 3, 14)

    # Add a year if we're past PiDay
    if piday < now:
        piday = datetime((now.year + 1), 3, 14)
@clcollins
clcollins / rpidentify.sh
Created June 26, 2020 15:48
Raspberry Pi LED Identifier
#!/bin/bash
set -o errexit
set -o nounset
trap quit INT TERM
COUNT=0
if ! [ $(id -u) = 0 ]; then
@clcollins
clcollins / manual_account_cleanup.py
Last active July 13, 2020 17:40
AWS Account Cleanup
#!/usr/bin/env python3
#
# This script written for python3.7
# If running on hive, you will need a virtualenv.
#
# $ virtualenv venv -p python3.7
# $ pip install boto3
#
# Then you should be able to run this script.
@clcollins
clcollins / dmesg.log
Created May 13, 2020 13:36
RPi 4 Raspbian dmesg log
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.19.97-v7l+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1294 SMP Thu Jan 30 13:21:14 GMT 2020
[ 0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 4 Model B Rev 1.1
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] cma: Reserved 256 MiB at 0x000000001ec00000
[ 0.000000] On node 0 totalpages: 1012736
[ 0.000000] DMA zone: 1728 pages used for memmap
@clcollins
clcollins / aws-account-operator-env
Last active April 15, 2020 20:43
GVM Project Config
#!/usr/bin/env bash
# The name of the project
name='aws-account-operator'
# The path to be used in the Go /src/ dir
project_source_path="github.com/openshift/${name}"
# Set Go version you want to use
go_version='1.13.1'
@clcollins
clcollins / get_unowned_accounts.py
Created March 9, 2020 21:21
Identify accounts without legalEntities that are claimed and have a claimLink, but do not have a corresponding account claim
#!/usr/bin/env python
from subprocess import Popen, PIPE
import json
def get_data_from_hive():
# Get a list of all accounts
acct_cmd = [
"oc",
"get",