chore(kubectl): add kubectl diff command snippets

This commit is contained in:
Michele Cereda
2025-08-16 21:57:05 +02:00
parent 31057ad192
commit 9089c3c981
4 changed files with 20 additions and 2 deletions

View File

@@ -111,3 +111,6 @@ helm template 'chartName' \
# Check that the 'backend.url key' in a 'Pulumi.yaml' file is not 'file://' and fail otherwise
yq -e '(.backend.url|test("^file://")?)|not' 'Pulumi.yaml'
# Apply formatting to the same file you read from
yq -iY --explicit-start '.' 'external-snapshotter/crds.yml'

View File

@@ -84,3 +84,8 @@ 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"'
# Show changes from the live version against a would-be applied version
kubectl kustomize 'https://github.com/kubernetes-csi/external-snapshotter/deploy/kubernetes/snapshot-controller' \
| kubectl diff -f -
kubectl diff -k 'external-snapshotter'