16 lines
269 B
Bash
16 lines
269 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
if [[ $1 == "--config" ]] ; then
|
||
|
cat <<EOF
|
||
|
configVersion: v1
|
||
|
kubernetes:
|
||
|
- apiVersion: v1
|
||
|
kind: Pod
|
||
|
executeHookOnEvent: ["Added"]
|
||
|
EOF
|
||
|
else
|
||
|
podName=$(jq -r .[0].object.metadata.name $BINDING_CONTEXT_PATH)
|
||
|
echo "Pod '${podName}' added"
|
||
|
fi
|
||
|
|