Skip to content

Commit

Permalink
Merge branch 'main' into k8spg-372-cluster-wide-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
inelpandzic authored Oct 12, 2023
2 parents 874fbe7 + c47011f commit b759e29
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion e2e-tests/functions
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,22 @@ get_pod_by_role() {
}

check_passwords_leak() {
local secrets
local passwords
local pods

secrets=$(kubectl -n "${NAMESPACE}" get secrets -o json | jq -r '.items[] | select(.data."password"? != null) | .data."password"' ; kubectl -n "${NAMESPACE}" get secrets -o json | jq -r '.items[] | select(.data."pgbouncer-password"? != null) | .data."pgbouncer-password"')
secrets=$(
kubectl -n "${NAMESPACE}" get secrets -o json | jq -r '.items[] | select(.data."password"? != null) | .data."password"'
kubectl -n "${NAMESPACE}" get secrets -o json | jq -r '.items[] | select(.data."pgbouncer-password"? != null) | .data."pgbouncer-password"'
)

passwords="$(for i in $secrets; do base64 -d <<< $i; echo; done) $secrets"
pods=$(kubectl -n "${NAMESPACE}" get pods -o name | awk -F "/" '{print $2}')

collect_logs() {
local containers
local count

NS=$1
for p in $pods; do
containers=$(kubectl -n "$NS" get pod $p -o jsonpath='{.spec.containers[*].name}')
Expand Down

0 comments on commit b759e29

Please sign in to comment.