Skip to content

Commit 2836b59

Browse files
committed
fix rebase
1 parent 3c0c3ac commit 2836b59

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scripts/functions.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -476,13 +476,13 @@ function edit_manifest() {
476476

477477
case "$1" in
478478
"sampling")
479-
"$YQ_BIN" e --inplace ".spec.template.spec.containers[0].env[] |= select(.name==\"SAMPLING\").value|=\"$2\"" "$3"
479+
"$YQ_BIN" e --inplace ".spec.template.spec.containers[0].env[] |= select(.name==\"SAMPLING\").value|=\"$2\"" "$manifest"
480480
;;
481481
"interfaces")
482482
"$YQ_BIN" e --inplace ".spec.template.spec.containers[0].env[] |= select(.name==\"INTERFACES\").value|=\"$2\"" "$manifest"
483483
;;
484484
"exclude_interfaces")
485-
"$YQ_BIN" e --inplace ".spec.template.spec.containers[0].env[] |= select(.name==\"EXCLUDE_INTERFACES\").value|=\"$2\"" "$3"
485+
"$YQ_BIN" e --inplace ".spec.template.spec.containers[0].env[] |= select(.name==\"EXCLUDE_INTERFACES\").value|=\"$2\"" "$manifest"
486486
;;
487487
"pkt_drop_enable")
488488
"$YQ_BIN" e --inplace ".spec.template.spec.containers[0].env[] |= select(.name==\"ENABLE_PKT_DROPS\").value|=\"$2\"" "$manifest"
@@ -683,16 +683,16 @@ function check_args_and_apply() {
683683
fi
684684
;;
685685
*sampling) # ebpf sampling
686-
if [[ "$3" == "flows" || "$3" == "metrics" ]]; then
687-
edit_manifest "sampling" "$value" "$2"
686+
if [[ "$command" == "flows" || "$command" == "metrics" ]]; then
687+
edit_manifest "sampling" "$value"
688688
else
689689
echo "--sampling is invalid option for packets"
690690
exit 1
691691
fi
692692
;;
693693
*exclude_interfaces) # ebpf exclude interfaces
694-
if [[ "$3" == "flows" || "$3" == "metrics" ]]; then
695-
edit_manifest "exclude_interfaces" "$value" "$2"
694+
if [[ "$command" == "flows" || "$command" == "metrics" ]]; then
695+
edit_manifest "exclude_interfaces" "$value"
696696
else
697697
echo "--exclude_interfaces is invalid option for packets"
698698
exit 1

0 commit comments

Comments
 (0)