Skip to content

Instantly share code, notes, and snippets.

View stewartshea's full-sized avatar

Shea Stewart stewartshea

View GitHub Profile
@tuxfight3r
tuxfight3r / openshift_cli_tricks.MD
Last active March 30, 2023 18:02
openshift cli tricks - using go templates

openshift list all pods and thier specs (requests/limits)

oc get pod -o jsonpath='{range .items[*]}{"SPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n"}{end}'

openshift list all pods and thier specs with name (requests /limits)

oc get pod -o jsonpath='{range .items[*]}{"NAME:  "}{.metadata.name}{"\nSPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n\n"}{end}'
@snobear
snobear / cancel-pulp-tasks.sh
Last active June 21, 2019 12:54
script to cancel all pulp tasks
#!/bin/bash
#
# Cancel all pulp tasks that are just in a specifiedstate
tmpfile=/tmp/tasks
read -p "Enter task state to kill, e.g. Waiting: " ans
echo ""
if [ "${#ans}" -gt 0 ]
then