chore: add findings from various usage

This commit is contained in:
Michele Cereda
2025-03-19 17:42:21 +01:00
parent ee65ec9424
commit e5165a8160
5 changed files with 122 additions and 19 deletions

View File

@@ -362,6 +362,9 @@ aws kms decrypt --key-id 'arn:aws:kms:eu-west-1:123456789012:key/d74f5077-811b-4
--output 'text' --query 'Plaintext' \
| base64 --decode > 'decryptedKey.bin'
aws kms list-aliases --query 'Aliases[?AliasName.contains(@,`staging`)]'
aws kms list-aliases --query 'Aliases[?AliasName.contains(@,`prod`)]|[*].{"Alias":@.AliasName,"KeyId":@.TargetKeyId}'
###
# RDS

View File

@@ -74,3 +74,8 @@ kubectl get --raw "/api/v1/nodes/ip-172-31-69-42.eu-west-1.compute.internal/prox
# Get ephemeral storage usage for pods
kubectl get --raw "/api/v1/nodes/ip-172-31-69-42.eu-west-1.compute.internal/proxy/stats/summary" \
| jq '.pods[] | select(.podRef.name == "gitlab-runner-59dd68c5cb-9vcp4")."ephemeral-storage"'
# Dynamic way for the same action
POD_NAME='gitlab-runner-6ddd58fcb6-c9swk' POD_NAMESPACE='gitlab' \
&& kubectl get pods -n "$POD_NAMESPACE" "$POD_NAME" -o jsonpath='{.status.hostIP}' | tr '.' '-' \
| xargs -I '%%' kubectl get --raw '/api/v1/nodes/ip-%%.eu-west-1.compute.internal/proxy/stats/summary' \
| jq --arg 'podName' "$POD_NAME" '.pods[] | select(.podRef.name == $podName)."ephemeral-storage"'