Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ export INSTALLATION_SOURCE=Internal
export LOKI_OPERATOR=Released
# will use '1x.extra-small' if not set
export LOKISTACK_SIZE=1x.extra-small
# will use '6' if not set
# will use '6' if not set
export TOPIC_PARTITIONS=48
Comment on lines +7 to 8

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Default-value comment is stale.

Line 7 says default is '6', but Line 8 sets TOPIC_PARTITIONS=48. Please align the comment with actual behavior.

Proposed fix
-# will use '6' if not set
+# will use '48' if not set
 export TOPIC_PARTITIONS=48
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# will use '6' if not set
export TOPIC_PARTITIONS=48
# will use '48' if not set
export TOPIC_PARTITIONS=48
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/env.sh` around lines 7 - 8, The inline comment above TOPIC_PARTITIONS
is incorrect — it says the default is '6' while the variable is exported as 48;
update the comment to reflect the actual default (change the comment text to
'will use "48" if not set') or if the intended default is 6, change the export
to export TOPIC_PARTITIONS=6; locate the TOPIC_PARTITIONS export in the env.sh
snippet and make the comment and value consistent.

# will use '2' if not set
export INGESTER_REPLICAS=2
Comment thread
coderabbitai[bot] marked this conversation as resolved.


4 changes: 3 additions & 1 deletion scripts/loki/lokistack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ objects:
value: reserved
effect: NoExecute
ingester:
replicas: 2
replicas: ${INGESTER_REPLICAS}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can we set this config only for 1x.demo size? could we do more templating around this config?

nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
Expand Down Expand Up @@ -158,3 +158,5 @@ parameters:
value: "1x.extra-small"
- name: DEFAULT_SC
value: "gp3-csi"
- name: INGESTER_REPLICAS
value: "2"
8 changes: 7 additions & 1 deletion scripts/netobserv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,14 @@ deploy_lokistack() {
SIZE="1x.extra-small"
fi

if [[ -z $INGESTER_REPLICAS ]]; then
echo "====> No ingester replicas config was found - using '2'"
echo "====> To set config, set INGESTER_REPLICAS variable to desired number"
export INGESTER_REPLICAS=2
fi
Comment on lines +319 to +323

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we set this only for 1x.demo?


echo "====> Creating LokiStack"
oc process --ignore-unknown-parameters=true -f $SCRIPTS_DIR/loki/lokistack.yaml -p SIZE=$SIZE DEFAULT_SC=$DEFAULT_SC NAMESPACE=$LOKI_NS -n default -o yaml >"$ARTIFACT_DIR"/lokiStack.yaml
oc process --ignore-unknown-parameters=true -f $SCRIPTS_DIR/loki/lokistack.yaml -p SIZE=$SIZE DEFAULT_SC=$DEFAULT_SC NAMESPACE=$LOKI_NS INGESTER_REPLICAS=$INGESTER_REPLICAS -n default -o yaml >"$ARTIFACT_DIR"/lokiStack.yaml
oc apply -f "$ARTIFACT_DIR"/lokiStack.yaml -n $LOKI_NS
sleep 30
echo "====> Waiting lokistack to be ready"
Expand Down