Skip to content

Instantly share code, notes, and snippets.

View TheRealJon's full-sized avatar

Jon Jackson TheRealJon

  • Red Hat
  • Raleigh, NC
  • 20:33 (UTC -04:00)
View GitHub Profile
@TheRealJon
TheRealJon / fake-idp.yaml
Last active September 25, 2023 13:57
Fake request header IDP and CA cert
apiVersion: v1
data:
ca.crt: |
-----BEGIN CERTIFICATE-----
MIIFazCCA1OgAwIBAgIUWtA3m5iBt3JlR3JIL4C854aiomkwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMzA5MjUxMzQ4MjRaFw0yNDA5
MjQxMzQ4MjRaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggIiMA0GCSqGSIb3DQEB
AQUAA4ICDwAwggIKAoICAQDZbvJvUaiU9EHgr3z8ED4nnphj0BNGaNus5qarsYmv
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: mock-resources.test.tectonic.com
spec:
group: test.tectonic.com
scope: Namespaced
names:
plural: mock-resources
singular: mock-resource
@TheRealJon
TheRealJon / README.md
Last active February 15, 2023 17:20
Click all unchecked "viewed" checkboxes in github PR file view

Execute this line in the browser console to click all of the unchecked "viewed" checkboxes in the "Files changed" tab of a github PR. Usefull when there are many changes in dependencies or generated files that do not need to be reviewed.

@TheRealJon
TheRealJon / oc-app_plane-vscale
Created August 26, 2021 19:38
Vertically scale app plane nodes
#!/bin/bash
instanceType=$1
function upgrade-machineset {
echo "Patching $1 with instanceType $instanceType"
oc patch $1 --type='merge' --patch="{\"spec\": { \"template\": { \"spec\": { \"providerSpec\": { \"value\": { \"instanceType\": \"$instanceType\"}}}}}}" -n openshift-machine-api
echo "Scaling $1 to 0"
oc scale $1 --replicas=0 -n openshift-machine-api
echo "Scaling $1 back to 1"
oc scale $1 --replicas=1 -n openshift-machine-api
@TheRealJon
TheRealJon / upgrade-machinesets.sh
Created March 25, 2021 15:49
A script to quickly upgrade OpenShift cluster worker machinesets to m5.2xlarge instance types
#!/bin/bash
function upgrade-machineset {
echo "Patching $1 with instanceType m5.2xlarge"
oc patch machineset $1 --type='merge' --patch='{"spec": { "template": { "spec": { "providerSpec": { "value": { "instanceType": "m5.2xlarge"}}}}}}' -n openshift-machine-api
echo "Scaling $1 to 0"
oc scale machineset $1 --replicas=0 -n openshift-machine-api
echo "Scaling $1 back to 1"
@TheRealJon
TheRealJon / crd.yaml
Last active April 27, 2023 19:46
OpenShift CustomResourceDefinition + ClusterServiceVersion + Operand used to exercise the OpenShift OLM descriptors
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: mock-resources.test.tectonic.com
spec:
group: test.tectonic.com
scope: Namespaced
names:
plural: mock-resources
singular: mock-resource