Skip to content

Commit

Permalink
fix grep for check resource quota
Browse files Browse the repository at this point in the history
  • Loading branch information
kvaps committed Jan 22, 2024
1 parent 07e606c commit 76cc9c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kubectl-node_shell
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ resources_json='"resources": {
"limits": { "cpu": "'${container_cpu}'", "memory": "'${container_memory}'" },
"requests": { "cpu": "'${container_cpu}'", "memory": "'${container_memory}'" }
}'
$kubectl run test --image test --dry-run=server 2>&1 | grep 'failed quota' --quiet || resources_json='"resources": {}'
$kubectl run --image "$image" "$pod" --dry-run=server 2>&1 | grep -q 'failed quota' || resources_json='"resources": {}'

overrides="$(
cat <<EOT
Expand Down

0 comments on commit 76cc9c4

Please sign in to comment.