Skip to content

Instantly share code, notes, and snippets.

View therevoman's full-sized avatar

Nate Revo therevoman

  • Red Hat, Inc
  • Utah
View GitHub Profile
@therevoman
therevoman / openshift_authn_authz.md
Created November 1, 2024 15:33 — forked from acsulli/openshift_authn_authz.md
Supporting information for the OpenShift.tv live stream here: https://www.youtube.com/watch?v=RG6xt2q72nw

Configuring Active Directory authentication with OpenShift 4

  1. Understand AD LDAP structure and naming. Read the docs on the components

    Refer to the OpenShift docs for the LDAP identity provider and LDAP group syncing.

  2. Create the OAuth config

    # create a secret for the bindDN user password
@therevoman
therevoman / show top pods by cpu
Last active December 9, 2023 05:40
Show pod list sorted on openshift node with crictl
# `ssh` or `debug node/` into node and run this command
watch -n 0.3 'body() { IFS= read -r header; printf '"'"'%s\n'"'"' "$header"; "$@"; } ; crictl stats | body sort -k3nr | head -n 20'
@therevoman
therevoman / create-existing-folder-permissions.sh
Created December 8, 2023 20:28 — forked from davoult/create-existing-folder-permissions.sh
openshift vsphere permissions with govc
#!/bin/bash
#######################################################################
# Borrowed from the following gist and updated for 4.14
# https://gist.github.com/davoult/2259f17579f19e9618f48f92aa9740cd
######################
set -e
set -x
--- a/src/etc/inc/dyndns.class 2022-10-21 22:11:05.836183000 +0000
+++ b/src/etc/inc/dyndns.class 2022-10-26 19:13:32.756072000 +0000
@@ -1209,11 +1209,11 @@
$post_data['hostname'] = $this->_dnsHost;
$post_data['myip'] = $this->_dnsIP;
$post_data['offline'] = 'no';
- $server = "https://domains.google.com/nic/update";
+ $server = "https://domains.google.com/nic/update?hostname=" . $this->_dnsHost;
$port = "";
- curl_setopt($ch, CURLOPT_URL, 'https://domains.google.com/nic/update');
/*
* Aeon HEM Gen5(zwave plus)
*
* Copyright 2016 Dillon A. Miller
*
* v0.8 of Aeon HEM Gen5(zwave plus) code, released 04/15/2016 for Aeotec Model zw095-a
* This Gen5 device handler is not backward compatible with the Aeon V1 or V2 device. If your model number is not zw095-a, don't use it.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
@therevoman
therevoman / .bashrc
Created September 19, 2022 18:50
deduped_bash_history
HISTCONTROL=ignorespace:ignoredups:erasedups
shopt -s histappend
HISTSIZE=-1
HISTFILESIZE=-1
#HISTTIMEFORMAT="[%Y%m%d %H%M%S] "
HISTTIMEFORMAT="[%b %d,%Y %T] "
PROMPT_COMMAND="history -a;${PROMPT_COMMAND}"
echo "Finding drive with name that contains 'MP600'"
$device_id = (GET-CimInstance -query "SELECT deviceid from Win32_DiskDrive WHERE Caption like '%MP600%'").DeviceID
echo "Mounting drive $device_id to WSL"
C:\Users\nrevo\AppData\Local\Microsoft\WindowsApps\wsl.exe --mount $device_id --bare
pause
@therevoman
therevoman / quay all in one
Created March 9, 2022 07:36 — forked from ralvares/quay all in one
Quay - All in One - Using podman pod
podman login registry.redhat.io
export domain=quay.ralvares.local
export QUAY=/data/quay
mkdir -p $QUAY/postgres-quay
mkdir $QUAY/clair
mkdir -p $QUAY/config/extra_ca_certs
mkdir $QUAY/storage
@therevoman
therevoman / mac-vendor.txt
Created December 9, 2021 20:26 — forked from aallan/mac-vendor.txt
List of MAC addresses with vendors identities
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?
@therevoman
therevoman / convert-deploymentconfig-to-deployment.md
Created October 2, 2021 04:51 — forked from bmaupin/convert-deploymentconfig-to-deployment.md
Convert OpenShift DeploymentConfig to Kubernetes Deployment
  1. Change apiVersion from:

    - apiVersion: v1

    (or apiVersion: apps.openshift.io/v1)

    to: