Secret

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