OpenShift

GNU/Linux OpenShift Where is My Secret Used?

A simple bash-script for OpenShift to determine which deployment configs make use of a specific secret (within the active project).

#!/bin/bash

oc get dc -o custom-columns="Name:metadata.name,readyReplicas:status.availableReplicas,Volumes:spec.template.spec.volumes,env:spec.template.spec.containers[].env,envFrom:spec.template.spec.containers[].envFrom,Volumes:spec.template.spec.volumes" | grep -E "($1)" | grep -oE "^[a-z0-9-]{3,99}"

$ os-sec-usage.sh secretname

[Other] Start DevOps Tools From Command line

Some commands I regularly use to start tools from the command line when I need them to start with elevated privileges.

My Frequently Used CLI Commands / Admin Tools (QuickRef)Description
dsa.msc / adsiedit.msc / virtmgmt.msc Active Directory Users & Computers / ADSI Edit / Hyper-V Manager
start-process powershell -verb runasStart PowerShell with Elevated Privileges
rundll32 sysdm.cpl,EditEnvironmentVariablesEdit Windows system environment variables
cacls “C:\Path\To\File.TXT” /E /G username@example.com:CQuick way to add write permission to a filesystem resource
java -Djavax.net.debug=ssl:handshake -jar target/packagename-1.0.0-SNAPSHOT.jarStart package with TLS handshake debugging enabled