Skip to content

Instantly share code, notes, and snippets.

View rjhowe's full-sized avatar

Ryan Howe rjhowe

  • Red Hat
  • Raleigh
View GitHub Profile
@rjhowe
rjhowe / unsafesysctl.md
Last active February 2, 2024 16:24
Unsafe sysctl pod level
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: recreate-backingfsblockdev
spec:
config:
ignition:
version: 3.2.0
@rjhowe
rjhowe / gist:414883db726f1396bf54d1c858f846f8
Created February 7, 2023 21:44
kubectl-dev_tool example
# kubectl-dev_tool audit --subresource="*" --verb=list -o top --by=user -f audit-2023-02-07T15-02-18.917.log
count: 9201, first: 2023-02-07T09:46:41-05:00, last: 2023-02-07T10:02:18-05:00, duration: 15m37.691882s
4071x system:serviceaccount:sysdig-agent:sysdig-agent
574x system:serviceaccount:openshift-machine-config-operator:machine-config-daemon
543x system:serviceaccount:openshift-dns:dns
456x system:apiserver
360x system:serviceaccount:openshift-cluster-node-tuning-operator:tuned
286x system:serviceaccount:openshift-monitoring:prometheus-k8s
275x system:serviceaccount:openshift-operator-lifecycle-manager:olm-operator-serviceaccount
177x system:serviceaccount:openshift-operators:jaeger-operator
oc get nodes -o template --template='{{ range .items }}{{ $desired := index .metadata.annotations "machineconfiguration.openshift.io/desiredConfig" }}{{ $current := index .metadata.annotations "machineconfiguration.openshift.io/currentConfig" }} {{ if $current }} {{ if eq $current $desired }} Node Name: {{ .metadata.name }} {{"\t"}}Machine Config: {{ index .metadata.annotations "machineconfiguration.openshift.io/currentConfig" }} {{ println }}{{ end }}{{ if ne $current $desired }} Current != Desired {{"\t"}} Node Name: {{ .metadata.name }} {{"\t"}} Current: {{ index .metadata.annotations "machineconfiguration.openshift.io/currentConfig" }} {{"\t"}} Desired: {{ index .metadata.annotations "machineconfiguration.openshift.io/desiredConfig" }}{{ println }}{{ end }}{{ end }}{{ end }}'
@rjhowe
rjhowe / Containerfile
Created September 1, 2022 15:37
Just a basic Containerfile template.
FROM quay.io/fedora/fedora
RUN dnf -y update && dnf clean all && \
INSTALL_PKGS="\
ncat \
openssl \
&& \
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \

ROUGH NOT FULLY TESTED

  1. Create and Attach volume to masters at /dev/vdb via OpenStack

  2. Create test machine-config

apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:

4.8 +

# oc patch ingresscontroller default -n openshift-ingress-operator -p '[{"op": "add", "path": "/spec/tuningOptions/threadCount", "value" : 8}]' --type=json

4.7 and below

#/bin/bash
#USAGE
# `ocpkg 4.8.34`` or with out y release and latest will be chosen `ocpkg 4.8``
DEPENDENCIES=("oc" "jq" "skopeo")
IFS=. read -r Ver4 VerX VerY <<< ${1}
STREAM=fast
CHANNEL="${STREAM}-4.${VerX}"
@rjhowe
rjhowe / hello-openshift.yaml
Last active May 21, 2021 16:50
hello-openshift.yaml
kind: List
apiVersion: v1
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
labels:
name: hello-openshift
app: hello-openshift
name: hello-openshift
@rjhowe
rjhowe / gist:a1fbb0af52b20b6c91e5d65d4ab56cae
Last active March 11, 2021 20:52
default-router.yaml
apiVersion: operator.openshift.io/v1
kind: IngressController
metadata:
name: default
namespace: openshift-ingress-operator
spec:
replicas: 3
endpointPublishingStrategy:
type: HostNetwork
nodePlacement: